X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7f891ef1070ac4d98897e60158db1a088037c189..7960c7b4c5b44c2ea923f5acca38fd0fd269a159:/src/unix/utilsx11.cpp?ds=sidebyside diff --git a/src/unix/utilsx11.cpp b/src/unix/utilsx11.cpp index 8f3eb5dc7d..32f4ef60e7 100644 --- a/src/unix/utilsx11.cpp +++ b/src/unix/utilsx11.cpp @@ -6,7 +6,7 @@ // Created: 25.03.02 // RCS-ID: $Id$ // Copyright: (c) wxWindows team -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #if defined(__WXX11__) || defined(__WXGTK__) || defined(__WXMOTIF__) @@ -400,17 +400,29 @@ static void wxSetKDEFullscreen(Display *display, Window rootWnd, } // 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) { @@ -423,6 +435,7 @@ static void wxSetKDEFullscreen(Display *display, Window rootWnd, XMoveResizeWindow(display, w, origRect->x, origRect->y, origRect->width, origRect->height); + XSync(display, False); } }