]> git.saurik.com Git - wxWidgets.git/commitdiff
fixes to ShowFullScreen (KDE 3.1)
authorVáclav Slavík <vslavik@fastmail.fm>
Mon, 3 Feb 2003 23:23:05 +0000 (23:23 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Mon, 3 Feb 2003 23:23:05 +0000 (23:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/toplevel.cpp
src/gtk1/toplevel.cpp
src/unix/utilsx11.cpp

index d77ae76a911b0b7a692dcff0a01f37bd3533f3c9..1e76307895e2dd2c2b7374f1804915af721d077f 100644 (file)
@@ -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;
index d77ae76a911b0b7a692dcff0a01f37bd3533f3c9..1e76307895e2dd2c2b7374f1804915af721d077f 100644 (file)
@@ -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;
index 8f3eb5dc7d2c57c45ff860b7e22926aa36e2ca3f..d2145aaa37bd6d3a6da7c0ef875e8c5ecdbadfb2 100644 (file)
@@ -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);
     }
 }