X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce7fe42e848cc0c9058dae906c3a7bded50681e6..bed99c22560c0b308e2e70af7d0e615b312dd04b:/src/gtk/window.cpp?ds=sidebyside diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 462cc9d5d6..e6d8aeba8a 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -1649,6 +1649,7 @@ window_scroll_event(GtkWidget*, GdkEventScroll* gdk_event, wxWindow* win) // FIXME: Get these values from GTK or GDK event.m_linesPerAction = 3; + event.m_columnsPerAction = 3; event.m_wheelDelta = 120; // Determine the scroll direction. @@ -1924,6 +1925,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 +1938,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)