From 82f2d91978527d499526c2814e3a323b477b0009 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 28 Sep 2001 17:54:31 +0000 Subject: [PATCH] fixed wxGTK fullscreen mode, broken by my previous change to gtk/toplevel.cpp git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/toplevel.h | 2 +- include/wx/gtk1/toplevel.h | 2 +- src/gtk/toplevel.cpp | 16 +++++++++++----- src/gtk1/toplevel.cpp | 16 +++++++++++----- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/include/wx/gtk/toplevel.h b/include/wx/gtk/toplevel.h index a0e96cdc10..c7bf590b52 100644 --- a/include/wx/gtk/toplevel.h +++ b/include/wx/gtk/toplevel.h @@ -85,7 +85,7 @@ public: bool m_insertInClientArea; /* not from within OnCreateXXX */ bool m_fsIsShowing; /* full screen */ - long m_fsSaveStyle; + long m_fsSaveGdkFunc, m_fsSaveGdkDecor; long m_fsSaveFlag; wxRect m_fsSaveFrame; diff --git a/include/wx/gtk1/toplevel.h b/include/wx/gtk1/toplevel.h index a0e96cdc10..c7bf590b52 100644 --- a/include/wx/gtk1/toplevel.h +++ b/include/wx/gtk1/toplevel.h @@ -85,7 +85,7 @@ public: bool m_insertInClientArea; /* not from within OnCreateXXX */ bool m_fsIsShowing; /* full screen */ - long m_fsSaveStyle; + long m_fsSaveGdkFunc, m_fsSaveGdkDecor; long m_fsSaveFlag; wxRect m_fsSaveFrame; diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 483af5d4e4..98315756b0 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -304,10 +304,13 @@ static void wxInsertChildInTopLevelWindow( wxTopLevelWindowGTK* parent, wxWindow else { /* these are inside the client area */ + int x = child->m_x, y = child->m_y; + child->AdjustForParentClientOrigin(x, y, 0); + gtk_pizza_put( GTK_PIZZA(parent->m_wxwindow), GTK_WIDGET(child->m_widget), - child->m_x, - child->m_y, + x, + y, child->m_width, child->m_height ); } @@ -524,7 +527,8 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style ) if (show) { - m_fsSaveStyle = m_windowStyle; + m_fsSaveGdkFunc = m_gdkFunc; + m_fsSaveGdkDecor = m_gdkDecor; m_fsSaveFlag = style; GetPosition( &m_fsSaveFrame.x, &m_fsSaveFrame.y ); GetSize( &m_fsSaveFrame.width, &m_fsSaveFrame.height ); @@ -532,7 +536,8 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style ) gtk_widget_hide( m_widget ); gtk_widget_unrealize( m_widget ); - m_windowStyle = wxSIMPLE_BORDER; + m_gdkDecor = (long) GDK_DECOR_BORDER; + m_gdkFunc = (long) GDK_FUNC_MOVE; int x; int y; @@ -547,7 +552,8 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style ) gtk_widget_hide( m_widget ); gtk_widget_unrealize( m_widget ); - m_windowStyle = m_fsSaveStyle; + m_gdkFunc = m_fsSaveGdkFunc; + m_gdkDecor = m_fsSaveGdkDecor; SetSize( m_fsSaveFrame.x, m_fsSaveFrame.y, m_fsSaveFrame.width, m_fsSaveFrame.height ); diff --git a/src/gtk1/toplevel.cpp b/src/gtk1/toplevel.cpp index 483af5d4e4..98315756b0 100644 --- a/src/gtk1/toplevel.cpp +++ b/src/gtk1/toplevel.cpp @@ -304,10 +304,13 @@ static void wxInsertChildInTopLevelWindow( wxTopLevelWindowGTK* parent, wxWindow else { /* these are inside the client area */ + int x = child->m_x, y = child->m_y; + child->AdjustForParentClientOrigin(x, y, 0); + gtk_pizza_put( GTK_PIZZA(parent->m_wxwindow), GTK_WIDGET(child->m_widget), - child->m_x, - child->m_y, + x, + y, child->m_width, child->m_height ); } @@ -524,7 +527,8 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style ) if (show) { - m_fsSaveStyle = m_windowStyle; + m_fsSaveGdkFunc = m_gdkFunc; + m_fsSaveGdkDecor = m_gdkDecor; m_fsSaveFlag = style; GetPosition( &m_fsSaveFrame.x, &m_fsSaveFrame.y ); GetSize( &m_fsSaveFrame.width, &m_fsSaveFrame.height ); @@ -532,7 +536,8 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style ) gtk_widget_hide( m_widget ); gtk_widget_unrealize( m_widget ); - m_windowStyle = wxSIMPLE_BORDER; + m_gdkDecor = (long) GDK_DECOR_BORDER; + m_gdkFunc = (long) GDK_FUNC_MOVE; int x; int y; @@ -547,7 +552,8 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style ) gtk_widget_hide( m_widget ); gtk_widget_unrealize( m_widget ); - m_windowStyle = m_fsSaveStyle; + m_gdkFunc = m_fsSaveGdkFunc; + m_gdkDecor = m_fsSaveGdkDecor; SetSize( m_fsSaveFrame.x, m_fsSaveFrame.y, m_fsSaveFrame.width, m_fsSaveFrame.height ); -- 2.45.2