]> git.saurik.com Git - wxWidgets.git/commitdiff
IsExposed() corrections in calendar.
authorRobert Roebling <robert@roebling.de>
Wed, 29 Dec 1999 21:03:36 +0000 (21:03 +0000)
committerRobert Roebling <robert@roebling.de>
Wed, 29 Dec 1999 21:03:36 +0000 (21:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/calctrl.cpp
src/gtk/window.cpp
src/gtk1/window.cpp

index b1a43f47e16ddbec1a3e535867ece714bd0848ba..5419de38ceb061378d5c8a715721cb798acdd23b 100644 (file)
@@ -354,13 +354,13 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& event)
     for ( size_t nWeek = 1; nWeek <= 6; nWeek++, y += m_heightRow )
     {
         // if the update region doesn't intersect this row, don't paint it
-        if ( !IsExposed(0, y, 7*m_widthCol, y + m_heightRow - 1) )
+        if ( !IsExposed(0, y, 7*m_widthCol, m_heightRow - 1) )
         {
             date += wxDateSpan::Week();
 
             continue;
         }
-
+        
         printf("painting week %d at y = %d\n", nWeek, y);
 
         for ( wd = wxDateTime::Sun; wd < wxDateTime::Inv_WeekDay; wxNextWDay(wd) )
index c7281b8230056025c78b8080191b8b2410dfa53c..6759913bbce7ac765d992ac85d4d9ff18872fae2 100644 (file)
@@ -598,9 +598,6 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
                                   gdk_event->area.width,
                                   gdk_event->area.height );
 
-    if (gdk_event->count > 0)
-        return;
-
 /*
     wxPrintf( "OnExpose from " );
     if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
@@ -611,6 +608,9 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
                                 (int)gdk_event->area.height );
 */
 
+    if (gdk_event->count > 0)
+        return;
+
     wxEraseEvent eevent( win->GetId() );
     eevent.SetEventObject( win );
     win->GetEventHandler()->ProcessEvent(eevent);
index c7281b8230056025c78b8080191b8b2410dfa53c..6759913bbce7ac765d992ac85d4d9ff18872fae2 100644 (file)
@@ -598,9 +598,6 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
                                   gdk_event->area.width,
                                   gdk_event->area.height );
 
-    if (gdk_event->count > 0)
-        return;
-
 /*
     wxPrintf( "OnExpose from " );
     if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
@@ -611,6 +608,9 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
                                 (int)gdk_event->area.height );
 */
 
+    if (gdk_event->count > 0)
+        return;
+
     wxEraseEvent eevent( win->GetId() );
     eevent.SetEventObject( win );
     win->GetEventHandler()->ProcessEvent(eevent);