]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/window.cpp
Patch 559673 and 561053
[wxWidgets.git] / src / gtk1 / window.cpp
index 948e88e8b39bc01960ed60de0b3006bc5be93d6f..392a1095f5195ed420bcb4f33ccd81f0f87f1e34 100644 (file)
@@ -509,6 +509,10 @@ static int gtk_window_expose_callback( GtkWidget *widget,
                                   gdk_event->area.y,
                                   gdk_event->area.width,
                                   gdk_event->area.height );
+    win->m_clearRegion.Union( gdk_event->area.x,
+                                  gdk_event->area.y,
+                                  gdk_event->area.width,
+                                  gdk_event->area.height );
 
     // Actual redrawing takes place in idle time.
     win->GtkUpdate();
@@ -1975,7 +1979,8 @@ static void gtk_window_vscroll_callback( GtkAdjustment *adjust,
 
     win->m_oldVerticalPos = adjust->value;
 
-    wxEventType command = GtkScrollWinTypeToWx(GET_SCROLL_TYPE(win->m_widget));
+    GtkScrolledWindow   *sw = GTK_SCROLLED_WINDOW(win->m_widget);
+    wxEventType         command = GtkScrollWinTypeToWx(GET_SCROLL_TYPE(sw->vscrollbar));
 
     int value = (int)(adjust->value+0.5);
 
@@ -2003,7 +2008,8 @@ static void gtk_window_hscroll_callback( GtkAdjustment *adjust,
     float diff = adjust->value - win->m_oldHorizontalPos;
     if (fabs(diff) < 0.2) return;
 
-    wxEventType command = GtkScrollWinTypeToWx(GET_SCROLL_TYPE(win->m_widget));
+    GtkScrolledWindow   *sw = GTK_SCROLLED_WINDOW(win->m_widget);
+    wxEventType         command = GtkScrollWinTypeToWx(GET_SCROLL_TYPE(sw->hscrollbar));
 
     win->m_oldHorizontalPos = adjust->value;
 
@@ -2524,6 +2530,9 @@ wxWindowGTK::~wxWindowGTK()
     if (g_activeFrame == this)
         g_activeFrame = NULL;
 
+    if ( g_delayedFocus == this )
+        g_delayedFocus = NULL;
+
     m_isBeingDeleted = TRUE;
     m_hasVMT = FALSE;
 
@@ -3258,7 +3267,7 @@ void wxWindowGTK::SetFocus()
         }
     }
 
-    (void)DoSendFocusEvents(this);
+    (void)DoSendFocusEvents((wxWindow*)this);
 }
 
 bool wxWindowGTK::AcceptsFocus() const
@@ -3480,7 +3489,7 @@ void wxWindowGTK::GtkSendPaintEvents()
         while (parent && !parent->IsTopLevel())
             parent = parent->GetParent();
         if (!parent)
-            parent = this;
+            parent = (wxWindow*)this;
     
         wxRegionIterator upd( m_updateRegion );
         while (upd)
@@ -4236,7 +4245,6 @@ void wxWindowGTK::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) )
         GetClientSize( &cw, &ch );
         m_clearRegion.Intersect( 0, 0, cw, ch );
     }
-
     m_clipPaintRegion = TRUE;
 
     gtk_pizza_scroll( GTK_PIZZA(m_wxwindow), -dx, -dy );
@@ -4325,3 +4333,4 @@ void wxWinModule::OnExit()
         gdk_gc_unref( g_eraseGC );
 }
 
+// vi:sts=4:sw=4:et