Minor fixes to wxGTK3 with Broadway backend build.

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
This commit is contained in:
Vadim Zeitlin
2012-07-14 20:10:50 +00:00
parent 0e1e0ea90a
commit fe943278df
3 changed files with 16 additions and 20 deletions

View File

@@ -871,11 +871,21 @@ bool wxTopLevelWindowGTK::Show( bool show )
{ {
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
screen = gtk_widget_get_screen(m_widget); screen = gtk_widget_get_screen(m_widget);
GdkAtom atom = gdk_atom_intern("_NET_REQUEST_FRAME_EXTENTS", false); #ifdef __WXGTK3__
deferShow = gdk_x11_screen_supports_net_wm_hint(screen, atom) != 0; if ( GDK_IS_X11_SCREEN(screen) )
#else
deferShow = false;
#endif #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 // If _NET_REQUEST_FRAME_EXTENTS not supported, don't allow changes
// to m_decorSize, it breaks saving/restoring window size with // to m_decorSize, it breaks saving/restoring window size with
// GetSize()/SetSize() because it makes window bigger between each // GetSize()/SetSize() because it makes window bigger between each

View File

@@ -504,17 +504,3 @@ wxGUIAppTraits::GetStandardCmdLineOptions(wxArrayString& names,
} }
#endif // __UNIX__ #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

View File

@@ -854,6 +854,8 @@ bool wxGetKeyState(wxKeyCode key)
return key_vector[keyCode >> 3] & (1 << (keyCode & 7)); return key_vector[keyCode >> 3] & (1 << (keyCode & 7));
} }
#endif // !defined(__WXGTK__) || defined(GDK_WINDOWING_X11)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Launch document with default app // Launch document with default app
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -930,6 +932,4 @@ bool wxDoLaunchDefaultBrowser(const wxString& url, int flags)
return false; return false;
} }
#endif // !defined(__WXGTK__) || defined(GDK_WINDOWING_X11)
#endif // __WXX11__ || __WXGTK__ || __WXMOTIF__ #endif // __WXX11__ || __WXGTK__ || __WXMOTIF__