From 1cff04deb5c17c95bef9c83e72645f105b90e750 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 3 Feb 2003 23:23:05 +0000 Subject: [PATCH] fixes to ShowFullScreen (KDE 3.1) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/toplevel.cpp | 4 ++-- src/gtk1/toplevel.cpp | 4 ++-- src/unix/utilsx11.cpp | 13 +++++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index d77ae76a91..1e76307895 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -524,7 +524,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style ) 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; @@ -548,7 +548,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style ) } else { - if (method == wxX11_FS_GENERIC) + if (method != wxX11_FS_WMSPEC) { // don't do it always, Metacity hates it m_gdkFunc = m_fsSaveGdkFunc; diff --git a/src/gtk1/toplevel.cpp b/src/gtk1/toplevel.cpp index d77ae76a91..1e76307895 100644 --- a/src/gtk1/toplevel.cpp +++ b/src/gtk1/toplevel.cpp @@ -524,7 +524,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style ) 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; @@ -548,7 +548,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style ) } else { - if (method == wxX11_FS_GENERIC) + if (method != wxX11_FS_WMSPEC) { // don't do it always, Metacity hates it m_gdkFunc = m_fsSaveGdkFunc; diff --git a/src/unix/utilsx11.cpp b/src/unix/utilsx11.cpp index 8f3eb5dc7d..d2145aaa37 100644 --- a/src/unix/utilsx11.cpp +++ b/src/unix/utilsx11.cpp @@ -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); } } -- 2.45.2