1. undid wxGTK timer hack, corrected bug in my code

2. clip wxPaintDC to the client area


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-09-12 16:20:34 +00:00
parent e45a8e8b4e
commit 6e6616f755
9 changed files with 48 additions and 89 deletions

View File

@@ -16,18 +16,6 @@
#include "gtk/gtk.h"
// ----------------------------------------------------------------------------
// This is a hack to work around a crash in wxGTK which happens (sometimes)
// when the timer is deleted from the GTK event handler. In this case even
// though the timer is stopped in its dtor, it is apparently too late to
// prevent the dead timer from being called from g_timeout_dispatch() during
// the same iteration of g_main_dispatch(). A better solution must be found,
// possibly by deferring the timer deletion until later, this is only a
// temporary hack! (VZ)
// ----------------------------------------------------------------------------
static wxTimer *gs_timerDead = (wxTimer *)NULL;
// ----------------------------------------------------------------------------
// wxTimer
// ----------------------------------------------------------------------------
@@ -37,13 +25,6 @@ IMPLEMENT_ABSTRACT_CLASS(wxTimer,wxObject)
static gint timeout_callback( gpointer data )
{
wxTimer *timer = (wxTimer*)data;
if ( timer == gs_timerDead )
{
// shouldn't be called more than once for the dead timer anyhow
gs_timerDead = NULL;
return FALSE;
}
/* when getting called from GDK's timer handler we
are no longer within GDK's grab on the GUI
@@ -69,8 +50,6 @@ void wxTimer::Init()
wxTimer::~wxTimer()
{
gs_timerDead = this;
wxTimer::Stop();
}