X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9f556d1dd6a06524c0d5419862836b9f0e9e6e1d..35bb3cb155917b4287fb2a3841bea22919a3d499:/src/gtk/cursor.cpp diff --git a/src/gtk/cursor.cpp b/src/gtk/cursor.cpp index 56d699feb7..b8d86c2037 100644 --- a/src/gtk/cursor.cpp +++ b/src/gtk/cursor.cpp @@ -19,7 +19,7 @@ #include "wx/colour.h" #endif // WX_PRECOMP -#include "wx/gtk/private.h" //for idle stuff +#include //----------------------------------------------------------------------------- // wxCursor @@ -178,7 +178,6 @@ wxCursor::wxCursor( const wxImage & image ) bool bHasMask = image.HasMask(); int imagebitcount = (w*h)/8; -#if GTK_CHECK_VERSION(2,2,0) if ( gdk_display_supports_cursor_color(gdk_display_get_default()) ) { unsigned char rMask = 0, @@ -217,15 +216,14 @@ wxCursor::wxCursor( const wxImage & image ) m_refData = new wxCursorRefData; M_CURSORDATA->m_cursor = gdk_cursor_new_from_pixbuf - ( - gdk_display_get_default(), - pixbuf, - hotSpotX, hotSpotY - ); + ( + gdk_display_get_default(), + pixbuf, + hotSpotX, hotSpotY + ); g_object_unref (pixbuf); return; } -#endif // GTK+ 2.2+ unsigned char * bits = new unsigned char [imagebitcount]; unsigned char * maskBits = new unsigned char [imagebitcount]; @@ -376,7 +374,9 @@ GdkCursor *wxCursor::GetCursor() const // busy cursor routines //----------------------------------------------------------------------------- -extern wxCursor g_globalCursor; +/* Current cursor, in order to hang on to + * cursor handle when setting the cursor globally */ +wxCursor g_globalCursor; static wxCursor gs_savedCursor; static int gs_busyCount = 0; @@ -428,8 +428,6 @@ bool wxIsBusy() void wxSetCursor( const wxCursor& cursor ) { - if (g_isIdle) - wxapp_install_idle_handler(); - g_globalCursor = cursor; + wxTheApp->WakeUpIdle(); }