gint client_x, client_y, root_x, root_y;
gint width, height;
- if (method == wxX11_FS_GENERIC)
+ if (method != wxX11_FS_WMSPEC)
{
// don't do it always, Metacity hates it
m_fsSaveGdkFunc = m_gdkFunc;
}
else
{
- if (method == wxX11_FS_GENERIC)
+ if (method != wxX11_FS_WMSPEC)
{
// don't do it always, Metacity hates it
m_gdkFunc = m_fsSaveGdkFunc;
gint client_x, client_y, root_x, root_y;
gint width, height;
- if (method == wxX11_FS_GENERIC)
+ if (method != wxX11_FS_WMSPEC)
{
// don't do it always, Metacity hates it
m_fsSaveGdkFunc = m_gdkFunc;
}
else
{
- if (method == wxX11_FS_GENERIC)
+ if (method != wxX11_FS_WMSPEC)
{
// don't do it always, Metacity hates it
m_gdkFunc = m_fsSaveGdkFunc;
}
// it is neccessary to unmap the window, otherwise kwin will ignore us:
+ XSync(display, False);
+
bool wasMapped = IsMapped(display, w);
if (wasMapped)
+ {
XUnmapWindow(display, w);
+ XSync(display, False);
+ }
+
XChangeProperty(display, w, _NET_WM_WINDOW_TYPE, XA_ATOM, 32,
PropModeReplace, (unsigned char *) &data, lng);
+ XSync(display, False);
+
if (wasMapped)
+ {
XMapRaised(display, w);
+ XSync(display, False);
+ }
wxWMspecSetState(display, rootWnd, w,
fullscreen ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE,
_NET_WM_STATE_STAYS_ON_TOP);
+ XSync(display, False);
if (!fullscreen)
{
XMoveResizeWindow(display, w,
origRect->x, origRect->y,
origRect->width, origRect->height);
+ XSync(display, False);
}
}