]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/toplevel.cpp
Consider native data format, zero out buffer before use in case it doesn't get filled...
[wxWidgets.git] / src / gtk1 / toplevel.cpp
index c8705377dc76da3aa56c38960f6876f0d37d6307..d13acd7d6827f0ce965f5c27dae6a9afea5273e0 100644 (file)
@@ -37,6 +37,7 @@
 #include "wx/gtk/private.h"
 #include "wx/timer.h"
 #include "wx/settings.h"
+#include "wx/evtloop.h"
 
 #include <glib.h>
 #include <gdk/gdk.h>
@@ -683,7 +684,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
     //     to switch to fullscreen, which is not always available. We must
     //     check if WM supports the spec and use legacy methods if it
     //     doesn't.
-    if (method == wxX11_FS_WMSPEC)
+    if ( (method == wxX11_FS_WMSPEC) && !gtk_check_version(2,2,0) )
     {
         if (show)
             gtk_window_fullscreen( GTK_WINDOW( m_widget ) );
@@ -1202,7 +1203,7 @@ void wxTopLevelWindowGTK::AddGrab()
     {
         m_grabbed = TRUE;
         gtk_grab_add( m_widget );
-        gtk_main();
+        wxEventLoop().Run();
         gtk_grab_remove( m_widget );
     }
 }