]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed wxGTK fullscreen mode, broken by my previous change to gtk/toplevel.cpp
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 28 Sep 2001 17:54:31 +0000 (17:54 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 28 Sep 2001 17:54:31 +0000 (17:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/toplevel.h
include/wx/gtk1/toplevel.h
src/gtk/toplevel.cpp
src/gtk1/toplevel.cpp

index a0e96cdc1077dc7778ed29c12e9cb3f0125fb524..c7bf590b523359374e01958efaab4a979903c6bb 100644 (file)
@@ -85,7 +85,7 @@ public:
     bool          m_insertInClientArea;  /* not from within OnCreateXXX */
 
     bool          m_fsIsShowing;         /* full screen */
     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;
     
     long          m_fsSaveFlag;
     wxRect        m_fsSaveFrame;
     
index a0e96cdc1077dc7778ed29c12e9cb3f0125fb524..c7bf590b523359374e01958efaab4a979903c6bb 100644 (file)
@@ -85,7 +85,7 @@ public:
     bool          m_insertInClientArea;  /* not from within OnCreateXXX */
 
     bool          m_fsIsShowing;         /* full screen */
     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;
     
     long          m_fsSaveFlag;
     wxRect        m_fsSaveFrame;
     
index 483af5d4e4aee7b0231190bba3f3b6e7be9436be..98315756b026df3db74a31dfd70c9237d98b2846 100644 (file)
@@ -304,10 +304,13 @@ static void wxInsertChildInTopLevelWindow( wxTopLevelWindowGTK* parent, wxWindow
     else
     {
         /* these are inside the client area */
     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),
         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 );
     }
                          child->m_width,
                          child->m_height );
     }
@@ -524,7 +527,8 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
 
     if (show)
     {
 
     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 );
         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 );
 
         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;
 
         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 );
 
         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 );
 
 
         SetSize( m_fsSaveFrame.x, m_fsSaveFrame.y, m_fsSaveFrame.width, m_fsSaveFrame.height );
 
index 483af5d4e4aee7b0231190bba3f3b6e7be9436be..98315756b026df3db74a31dfd70c9237d98b2846 100644 (file)
@@ -304,10 +304,13 @@ static void wxInsertChildInTopLevelWindow( wxTopLevelWindowGTK* parent, wxWindow
     else
     {
         /* these are inside the client area */
     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),
         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 );
     }
                          child->m_width,
                          child->m_height );
     }
@@ -524,7 +527,8 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long style )
 
     if (show)
     {
 
     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 );
         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 );
 
         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;
 
         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 );
 
         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 );
 
 
         SetSize( m_fsSaveFrame.x, m_fsSaveFrame.y, m_fsSaveFrame.width, m_fsSaveFrame.height );