fixed ShowFullScreen after somebody broke it by naively using gtk_show_fullscreen without checking if the WM supports it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -626,19 +626,26 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
|
||||
|
||||
m_fsIsShowing = show;
|
||||
|
||||
#if GTK_CHECK_VERSION(2,2,0)
|
||||
wxX11FullScreenMethod method =
|
||||
wxGetFullScreenMethodX11((WXDisplay*)GDK_DISPLAY(),
|
||||
(WXWindow)GDK_ROOT_WINDOW());
|
||||
|
||||
#if GTK_CHECK_VERSION(2,2,0)
|
||||
// NB: gtk_window_fullscreen() uses freedesktop.org's WMspec extensions
|
||||
// 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 (show)
|
||||
gtk_window_fullscreen( GTK_WINDOW( m_widget ) );
|
||||
else
|
||||
gtk_window_unfullscreen( GTK_WINDOW( m_widget ) );
|
||||
|
||||
}
|
||||
else
|
||||
#else
|
||||
|
||||
{
|
||||
GdkWindow *window = m_widget->window;
|
||||
wxX11FullScreenMethod method =
|
||||
wxGetFullScreenMethodX11((WXDisplay*)GDK_DISPLAY(),
|
||||
(WXWindow)GDK_ROOT_WINDOW());
|
||||
|
||||
if (show)
|
||||
{
|
||||
@@ -693,6 +700,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
|
||||
SetSize(m_fsSaveFrame.x, m_fsSaveFrame.y,
|
||||
m_fsSaveFrame.width, m_fsSaveFrame.height);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
|
@@ -626,19 +626,26 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
|
||||
|
||||
m_fsIsShowing = show;
|
||||
|
||||
#if GTK_CHECK_VERSION(2,2,0)
|
||||
wxX11FullScreenMethod method =
|
||||
wxGetFullScreenMethodX11((WXDisplay*)GDK_DISPLAY(),
|
||||
(WXWindow)GDK_ROOT_WINDOW());
|
||||
|
||||
#if GTK_CHECK_VERSION(2,2,0)
|
||||
// NB: gtk_window_fullscreen() uses freedesktop.org's WMspec extensions
|
||||
// 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 (show)
|
||||
gtk_window_fullscreen( GTK_WINDOW( m_widget ) );
|
||||
else
|
||||
gtk_window_unfullscreen( GTK_WINDOW( m_widget ) );
|
||||
|
||||
}
|
||||
else
|
||||
#else
|
||||
|
||||
{
|
||||
GdkWindow *window = m_widget->window;
|
||||
wxX11FullScreenMethod method =
|
||||
wxGetFullScreenMethodX11((WXDisplay*)GDK_DISPLAY(),
|
||||
(WXWindow)GDK_ROOT_WINDOW());
|
||||
|
||||
if (show)
|
||||
{
|
||||
@@ -693,6 +700,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
|
||||
SetSize(m_fsSaveFrame.x, m_fsSaveFrame.y,
|
||||
m_fsSaveFrame.width, m_fsSaveFrame.height);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
|
Reference in New Issue
Block a user