]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
Don't force the child's m_isShown state to match that of the parent in CocoaAddChild.
[wxWidgets.git] / src / gtk / window.cpp
index fed52353e4409d319d633cfcb57d9269f2db4173..eb36d67c61930c4f0919275393d07a9d185ef585 100644 (file)
@@ -2002,9 +2002,10 @@ gtk_scrollbar_event_after(GtkRange* range, GdkEvent* event, wxWindow* win)
 
         const int orient = wxWindow::OrientFromScrollDir(
                                         win->ScrollDirFromRange(range));
-        wxScrollWinEvent event(wxEVT_SCROLLWIN_THUMBRELEASE, win->GetScrollPos(orient), orient);
-        event.SetEventObject(win);
-        win->GTKProcessEvent(event);
+        wxScrollWinEvent evt(wxEVT_SCROLLWIN_THUMBRELEASE,
+                                win->GetScrollPos(orient), orient);
+        evt.SetEventObject(win);
+        win->GTKProcessEvent(evt);
     }
 }
 
@@ -2839,7 +2840,7 @@ void wxWindowGTK::OnInternalIdle()
         }
     }
 
-    if (wxUpdateUIEvent::CanUpdate(this))
+    if (wxUpdateUIEvent::CanUpdate(this) && IsShown())
         UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
 }
 
@@ -2897,7 +2898,7 @@ void wxWindowGTK::DoGetPosition( int *x, int *y ) const
 
     int dx = 0;
     int dy = 0;
-    if (m_parent && m_parent->m_wxwindow)
+    if (!IsTopLevel() && m_parent && m_parent->m_wxwindow)
     {
         GtkPizza *pizza = GTK_PIZZA(m_parent->m_wxwindow);
         dx = gtk_pizza_get_xoffset( pizza );