Support wxFULLSCREEN_NOMENUBAR

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2006-10-18 19:02:29 +00:00
parent 40131743c6
commit 3a8b3bd159
2 changed files with 23 additions and 6 deletions

View File

@ -362,16 +362,17 @@ void wxFrame::GtkOnSize()
(GtkWidget*) NULL,
&geom,
(GdkWindowHints) flag );
// TODO
// Rewrite this terrible code to using GtkVBox
// I revert back to wxGTK's original behaviour. m_mainWidget holds
// the menubar, the toolbar and the client area, which is represented
// by m_wxwindow.
// This hurts in the eye, but I don't want to call SetSize()
// because I don't want to call any non-native functions here.
// m_mainWidget holds the menubar, the toolbar and the client
// area, which is represented by m_wxwindow.
#if wxUSE_MENUS_NATIVE
if (m_frameMenuBar)
if (m_frameMenuBar && !(m_fsIsShowing && (m_fsSaveFlag & wxFULLSCREEN_NOMENUBAR != 0)))
{
if (!GTK_WIDGET_VISIBLE(m_frameMenuBar->m_widget))
gtk_widget_show( m_frameMenuBar->m_widget );
int xx = m_miniEdge;
int yy = m_miniEdge + m_miniTitle;
int ww = m_width - 2*m_miniEdge;
@ -388,6 +389,14 @@ void wxFrame::GtkOnSize()
xx, yy, ww, hh );
client_area_y_offset += hh;
}
else
{
if (m_frameMenuBar)
{
if (GTK_WIDGET_VISIBLE(m_frameMenuBar->m_widget))
gtk_widget_hide( m_frameMenuBar->m_widget );
}
}
#endif // wxUSE_MENUS_NATIVE
#if wxUSE_TOOLBAR

View File

@ -443,6 +443,7 @@ void wxTopLevelWindowGTK::Init()
m_insertInClientArea = true;
m_isIconized = false;
m_fsIsShowing = false;
m_fsSaveFlag = 0;
m_themeEnabled = true;
m_gdkDecor = m_gdkFunc = 0;
m_grabbed = false;
@ -714,9 +715,15 @@ 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
@ -759,6 +766,7 @@ 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