]> git.saurik.com Git - wxWidgets.git/commitdiff
update position for widgets in native containers, fixes #15231
authorPaul Cornett <paulcor@bullseye.com>
Sat, 1 Jun 2013 17:06:14 +0000 (17:06 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Sat, 1 Jun 2013 17:06:14 +0000 (17:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp

index 462cc9d5d659cab86a0f76b94373b60364d52097..52e2c2354171716d4b3972afe8ff7e2cf552fedf 100644 (file)
@@ -1924,6 +1924,12 @@ size_allocate(GtkWidget*, GtkAllocation* alloc, wxWindow* win)
         if (w < 0) w = 0;
         if (h < 0) h = 0;
     }
+    GtkAllocation a;
+    gtk_widget_get_allocation(win->m_widget, &a);
+    // update position for widgets in native containers, such as wxToolBar
+    // (for widgets in a wxPizza, the values should already be the same)
+    win->m_x = a.x;
+    win->m_y = a.y;
     win->m_useCachedClientSize = true;
     if (win->m_clientWidth != w || win->m_clientHeight != h)
     {
@@ -1931,8 +1937,6 @@ size_allocate(GtkWidget*, GtkAllocation* alloc, wxWindow* win)
         win->m_clientHeight = h;
         // this callback can be connected to m_wxwindow,
         // so always get size from m_widget->allocation
-        GtkAllocation a;
-        gtk_widget_get_allocation(win->m_widget, &a);
         win->m_width  = a.width;
         win->m_height = a.height;
         if (!win->m_nativeSizeEvent)