]> git.saurik.com Git - wxWidgets.git/commitdiff
Minor fixes to wxGTK3 with Broadway backend build.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 14 Jul 2012 20:10:50 +0000 (20:10 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 14 Jul 2012 20:10:50 +0000 (20:10 +0000)
Reuse some functions for both Broadway and X11 backends. Fix invalid casts
from Broadway screen/display types to X11 ones.

Closes #14469.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72079 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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

index 57709a5eb003f4547f3d342a69ba9cfcb06d5cfc..ca5a23190cca95895e6ebe5795f0a626674d2b55 100644 (file)
@@ -871,11 +871,21 @@ bool wxTopLevelWindowGTK::Show( bool show )
         {
 #ifdef GDK_WINDOWING_X11
             screen = gtk_widget_get_screen(m_widget);
-            GdkAtom atom = gdk_atom_intern("_NET_REQUEST_FRAME_EXTENTS", false);
-            deferShow = gdk_x11_screen_supports_net_wm_hint(screen, atom) != 0;
-#else
-            deferShow = false;
+#ifdef __WXGTK3__
+            if ( GDK_IS_X11_SCREEN(screen) )
+#endif
+            {
+                GdkAtom atom = gdk_atom_intern("_NET_REQUEST_FRAME_EXTENTS", false);
+                deferShow = gdk_x11_screen_supports_net_wm_hint(screen, atom) != 0;
+            }
+#ifdef __WXGTK3__
+            else
 #endif
+#endif // GDK/X11
+            {
+                deferShow = false;
+            }
+
             // If _NET_REQUEST_FRAME_EXTENTS not supported, don't allow changes
             // to m_decorSize, it breaks saving/restoring window size with
             // GetSize()/SetSize() because it makes window bigger between each
index 728c9f6cb922e5ae16b1e262d3559c0dd5593dcd..f68fddcbf0e24ded25df7e90565204488367b80d 100644 (file)
@@ -504,17 +504,3 @@ wxGUIAppTraits::GetStandardCmdLineOptions(wxArrayString& names,
 }
 
 #endif // __UNIX__
-
-#ifdef GDK_WINDOWING_BROADWAY
-
-bool wxLaunchDefaultApplication(const wxString& document, int flags)
-{
-    return false;
-}
-
-bool wxDoLaunchDefaultBrowser(const wxString& url, int flags)
-{
-    return false;
-}
-
-#endif
index b111e2b9cdca35812416f53e71ab554aad7aab47..b84707d51cd55caf5676863f8c7e9f87bcd7e5bf 100644 (file)
@@ -854,6 +854,8 @@ bool wxGetKeyState(wxKeyCode key)
     return key_vector[keyCode >> 3] & (1 << (keyCode & 7));
 }
 
+#endif // !defined(__WXGTK__) || defined(GDK_WINDOWING_X11)
+
 // ----------------------------------------------------------------------------
 // Launch document with default app
 // ----------------------------------------------------------------------------
@@ -930,6 +932,4 @@ bool wxDoLaunchDefaultBrowser(const wxString& url, int flags)
     return false;
 }
 
-#endif // !defined(__WXGTK__) || defined(GDK_WINDOWING_X11)
-
 #endif // __WXX11__ || __WXGTK__ || __WXMOTIF__