]> git.saurik.com Git - wxWidgets.git/commitdiff
don't send paint events for exposures of the border-only GdkWindow, fix for bug 1894655
authorPaul Cornett <paulcor@bullseye.com>
Sat, 10 May 2008 17:30:56 +0000 (17:30 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Sat, 10 May 2008 17:30:56 +0000 (17:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp

index 5b92e382246a559dc4b781e48f14d36c7fc51a61..f31a76fe73ba58ff1014164d23c6c7270de1dcc6 100644 (file)
@@ -258,39 +258,15 @@ void wxgtk_window_size_request_callback(GtkWidget * WXUNUSED(widget),
 
 extern "C" {
 static gboolean
-gtk_window_expose_callback( GtkWidget*,
+gtk_window_expose_callback( GtkWidget* widget,
                             GdkEventExpose *gdk_event,
                             wxWindow *win )
 {
-#if 0
-    if (win->GetName())
+    if (gdk_event->window == widget->window)
     {
-        wxPrintf( wxT("OnExpose from ") );
-        if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
-            wxPrintf( win->GetClassInfo()->GetClassName() );
-        wxPrintf( wxT(" %d %d %d %d\n"), (int)gdk_event->area.x,
-                                         (int)gdk_event->area.y,
-                                         (int)gdk_event->area.width,
-                                         (int)gdk_event->area.height );
+        win->GetUpdateRegion() = wxRegion( gdk_event->region );
+        win->GtkSendPaintEvents();
     }
-
-    gtk_paint_box
-    (
-        win->m_wxwindow->style,
-        pizza->bin_window,
-        GTK_STATE_NORMAL,
-        GTK_SHADOW_OUT,
-        (GdkRectangle*) NULL,
-        win->m_wxwindow,
-        (char *)"button", // const_cast
-        20,20,24,24
-    );
-#endif
-
-    win->GetUpdateRegion() = wxRegion( gdk_event->region );
-
-    win->GtkSendPaintEvents();
-
     // Let parent window draw window-less widgets
     return FALSE;
 }