From 8ac7c5092401be067f7c727ad8e2bf7274c05866 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 16 Feb 2002 10:59:55 +0000 Subject: [PATCH] wxX11: 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 | 2 +- src/generic/listctrl.cpp | 2 +- src/x11/timer.cpp | 14 +++++--------- src/x11/window.cpp | 2 +- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h index 535b9f5776..be16f28626 100644 --- a/include/wx/generic/listctrl.h +++ b/include/wx/generic/listctrl.h @@ -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(); diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 76b34f650b..d5e1cb9e8e 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -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 diff --git a/src/x11/timer.cpp b/src/x11/timer.cpp index 8de4e9a9a6..adf095d4ab 100644 --- a/src/x11/timer.cpp +++ b/src/x11/timer.cpp @@ -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 ) diff --git a/src/x11/window.cpp b/src/x11/window.cpp index 296ceb73c7..744cdd6b1d 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -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(); } -- 2.45.2