]> git.saurik.com Git - wxWidgets.git/commitdiff
wxX11:
authorRobert Roebling <robert@roebling.de>
Sat, 16 Feb 2002 10:59:55 +0000 (10:59 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 16 Feb 2002 10:59:55 +0000 (10:59 +0000)
    Made timer compile and maybe work.
    Fixed display bug in wxListCtrl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/listctrl.h
src/generic/listctrl.cpp
src/x11/timer.cpp
src/x11/window.cpp

index 535b9f577681da27daa40407070b186abe2485ec..be16f28626bcba43089ea006656edc7d59fee4a9 100644 (file)
@@ -203,7 +203,7 @@ protected:
 
 private:
     // Virtual function hiding supression
-    virtual void Update() { wxWindowBase::Update(); }
+    virtual void Update() { wxWindow::Update(); }
 
     // create the header window
     void CreateHeaderWindow();
index 76b34f650b0d7230581372e56cce67d36b8aa46d..d5e1cb9e8e2ef45d1e5f43b1d93762e05ee90ab8 100644 (file)
@@ -4581,7 +4581,7 @@ bool wxListCtrl::Create(wxWindow *parent,
         style = style | wxLC_LIST;
     }
 
-    if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) )
+    if ( !wxControl::Create( parent, id, pos, size, style, validator, "listctrl" ) )
         return FALSE;
 
     // don't create the inner window with the border
index 8de4e9a9a62346f47e31b40ca1a8a05de7ebd3a7..adf095d4aba90bd2703bf523342a19ca9a8ecb69 100644 (file)
@@ -63,11 +63,11 @@ void wxTimerScheduler::QueueTimer(wxTimerDesc *desc, unsigned long when)
     if ( desc->running )
         return; // already scheduled
       
-#pragma 
-#if 0
     if ( when == 0 )
-        when = wxGetLocalTimeMillis() + desc->timer->GetInterval();
-#endif
+    {
+        unsigned long local = wxGetLocalTimeMillis().ToLong();
+        when = local + desc->timer->GetInterval();
+    }
     desc->shotTime = when;
     desc->running = TRUE;
 
@@ -109,11 +109,7 @@ void wxTimerScheduler::NotifyTimers()
     {
         bool oneShot;
         volatile bool timerDeleted;
-#pragma        
-        unsigned long now;
-#if 0
-        now = wxGetLocalTimeMillis();
-#endif
+        unsigned long now = wxGetLocalTimeMillis().ToLong();
         wxTimerDesc *desc;
 
         while ( m_timers && m_timers->shotTime <= now )
index 296ceb73c768849aef753cec00a46cc2c329c61a..744cdd6b1d6be79dd43bf19c89e232895a40adcc 100644 (file)
@@ -933,7 +933,6 @@ void wxWindowX11::X11SendPaintEvents()
     
         if (!GetEventHandler()->ProcessEvent(erase_event))
         {
-            printf( "Hallo!\n" );
             Window xwindow = (Window) GetMainWindow();
             Display *xdisplay = wxGlobalDisplay();
             GC xgc = XCreateGC( xdisplay, xwindow, 0, NULL );
@@ -946,6 +945,7 @@ void wxWindowX11::X11SendPaintEvents()
                                 upd.GetX(), upd.GetY(), upd.GetWidth(), upd.GetHeight() );
                 upd ++;
             }
+            XFreeGC( xdisplay, xgc );
         }
         m_clearRegion.Clear();
     }