#include "wx/colour.h"
#endif // WX_PRECOMP
-#include "wx/gtk/private.h" //for idle stuff
+#include <gtk/gtk.h>
//-----------------------------------------------------------------------------
// wxCursor
case wxCURSOR_ARROWWAIT:
case wxCURSOR_WAIT:
case wxCURSOR_WATCH: gdk_cur = GDK_WATCH; break;
- case wxCURSOR_SIZING: gdk_cur = GDK_FLEUR; break;
+ case wxCURSOR_SIZING: gdk_cur = GDK_SIZING; break;
case wxCURSOR_SPRAYCAN: gdk_cur = GDK_SPRAYCAN; break;
case wxCURSOR_IBEAM: gdk_cur = GDK_XTERM; break;
case wxCURSOR_PENCIL: gdk_cur = GDK_PENCIL; break;
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,
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];
// 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;
void wxSetCursor( const wxCursor& cursor )
{
- if (g_isIdle)
- wxapp_install_idle_handler();
-
g_globalCursor = cursor;
+ wxTheApp->WakeUpIdle();
}