]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/win_gtk.cpp
use wxWindow::GetClientSize() instead of ::GetClientRect() in wxActiveXContainer...
[wxWidgets.git] / src / gtk / win_gtk.cpp
index 5f37b12dead833bd3e2a296980881982bdbc8f14..7243df8692f4983997cf1522135155fa1c9142a2 100644 (file)
@@ -78,8 +78,8 @@ static void size_allocate(GtkWidget* widget, GtkAllocation* alloc)
                 // otherwise they will not be erased/redrawn properly
                 const GtkAllocation& a1 = widget->allocation;
                 const GtkAllocation& a2 = *alloc;
                 // otherwise they will not be erased/redrawn properly
                 const GtkAllocation& a1 = widget->allocation;
                 const GtkAllocation& a2 = *alloc;
-                const GdkRectangle r1 = { a1.x, a1.y, a1.width, a1.height };
-                const GdkRectangle r2 = { a2.x, a2.y, a2.width, a2.height };
+                GdkRectangle r1 = { a1.x, a1.y, a1.width, a1.height };
+                GdkRectangle r2 = { a2.x, a2.y, a2.width, a2.height };
                 gdk_window_invalidate_rect(widget->parent->window, &r1, false);
                 gdk_window_invalidate_rect(widget->parent->window, &r2, false);
             }
                 gdk_window_invalidate_rect(widget->parent->window, &r1, false);
                 gdk_window_invalidate_rect(widget->parent->window, &r2, false);
             }
@@ -339,10 +339,11 @@ extern "C" {
 static void scroll_adjust(GtkWidget* widget, void* data)
 {
     const AdjustData* p = static_cast<AdjustData*>(data);
 static void scroll_adjust(GtkWidget* widget, void* data)
 {
     const AdjustData* p = static_cast<AdjustData*>(data);
+    widget->allocation.x += p->dx;
+    widget->allocation.y += p->dy;
+    
     if (widget->window == p->window)
     {
     if (widget->window == p->window)
     {
-        widget->allocation.x += p->dx;
-        widget->allocation.y += p->dy;
         // GtkFrame requires a queue_resize, otherwise parts of
         // the frame newly exposed by the scroll are not drawn.
         // To be safe, do it for all widgets.
         // GtkFrame requires a queue_resize, otherwise parts of
         // the frame newly exposed by the scroll are not drawn.
         // To be safe, do it for all widgets.