restructure fullscreen code dealing with hiding bars
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -390,7 +390,6 @@ void wxTopLevelWindowGTK::Init()
|
||||
m_mainWidget = (GtkWidget*) NULL;
|
||||
m_isIconized = false;
|
||||
m_fsIsShowing = false;
|
||||
m_fsSaveFlag = 0;
|
||||
m_themeEnabled = true;
|
||||
m_gdkDecor = m_gdkFunc = 0;
|
||||
m_grabbed = false;
|
||||
@@ -648,7 +647,7 @@ bool wxTopLevelWindowGTK::EnableCloseButton( bool enable )
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
|
||||
bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long)
|
||||
{
|
||||
if (show == m_fsIsShowing)
|
||||
return false; // return what?
|
||||
@@ -667,15 +666,9 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
|
||||
if ( (method == wxX11_FS_WMSPEC) && !gtk_check_version(2,2,0) )
|
||||
{
|
||||
if (show)
|
||||
{
|
||||
m_fsSaveFlag = style;
|
||||
gtk_window_fullscreen( GTK_WINDOW( m_widget ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_fsSaveFlag = 0;
|
||||
gtk_window_unfullscreen( GTK_WINDOW( m_widget ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif // GTK+ >= 2.2.0
|
||||
@@ -684,7 +677,6 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
|
||||
|
||||
if (show)
|
||||
{
|
||||
m_fsSaveFlag = style;
|
||||
GetPosition( &m_fsSaveFrame.x, &m_fsSaveFrame.y );
|
||||
GetSize( &m_fsSaveFrame.width, &m_fsSaveFrame.height );
|
||||
|
||||
@@ -718,7 +710,6 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
|
||||
}
|
||||
else // hide
|
||||
{
|
||||
m_fsSaveFlag = 0;
|
||||
if (method != wxX11_FS_WMSPEC)
|
||||
{
|
||||
// don't do it always, Metacity hates it
|
||||
@@ -740,7 +731,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
|
||||
|
||||
// documented behaviour is to show the window if it's still hidden when
|
||||
// showing it full screen
|
||||
if ( show && !IsShown() )
|
||||
if (show)
|
||||
Show();
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user