]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/timer.cpp
Return NULL from wxWindow::GetCapture() when the capture is being lost.
[wxWidgets.git] / src / gtk / timer.cpp
index 628ede1a184036807f7cbd8b4351ab92b56e0cdd..5e819097eb19c30063836868dbc81356ba168a3b 100644 (file)
@@ -1,8 +1,7 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        gtk/timer.cpp
+// Name:        src/gtk/timer.cpp
 // Purpose:     wxTimer implementation
 // Author:      Robert Roebling
-// Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -13,6 +12,7 @@
 #if wxUSE_TIMER
 
 #include "wx/gtk/private/timer.h"
+#include "wx/app.h"
 
 #include <gtk/gtk.h>
 
@@ -40,6 +40,10 @@ static gboolean timeout_callback(gpointer data)
     // Release lock again.
     gdk_threads_leave();
 
+    wxApp* app = wxTheApp;
+    if (app)
+        app->WakeUpIdle();
+
     return keepGoing;
 }
 
@@ -50,7 +54,7 @@ bool wxGTKTimerImpl::Start(int millisecs, bool oneShot)
     if ( !wxTimerImpl::Start(millisecs, oneShot) )
         return false;
 
-    wxASSERT_MSG( !m_sourceId, _T("shouldn't be still running") );
+    wxASSERT_MSG( !m_sourceId, wxT("shouldn't be still running") );
 
     m_sourceId = g_timeout_add(m_milli, timeout_callback, this);
 
@@ -59,7 +63,7 @@ bool wxGTKTimerImpl::Start(int millisecs, bool oneShot)
 
 void wxGTKTimerImpl::Stop()
 {
-    wxASSERT_MSG( m_sourceId, _T("should be running") );
+    wxASSERT_MSG( m_sourceId, wxT("should be running") );
 
     g_source_remove(m_sourceId);
     m_sourceId = 0;