X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d6764050d805a7e7575ba7126e2f78bd64db8117..79b7701c0bc547dc4b579258c7116700e5925162:/src/gtk/cursor.cpp diff --git a/src/gtk/cursor.cpp b/src/gtk/cursor.cpp index a939e16fe4..6da4ba4d96 100644 --- a/src/gtk/cursor.cpp +++ b/src/gtk/cursor.cpp @@ -72,13 +72,13 @@ wxCursor::wxCursor(const wxString& cursor_file, wxImage img; if (!img.LoadFile(cursor_file, type)) return; - + // eventually set the hotspot: - if (!image.HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_X)) + if (!img.HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_X)) img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, hotSpotX); - if (!image.HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y)) + if (!img.HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y)) img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, hotSpotY); - + InitFromImage(img); } @@ -374,7 +374,7 @@ const wxCursor wxBusyCursor::GetBusyCursor() return wxCursor(wxCURSOR_WATCH); } -static void InternalIdle(const wxWindowList& list, GdkDisplay*& display) +static void UpdateCursors(const wxWindowList& list, GdkDisplay*& display) { wxWindowList::const_iterator i = list.begin(); for (size_t n = list.size(); n--; ++i) @@ -382,8 +382,8 @@ static void InternalIdle(const wxWindowList& list, GdkDisplay*& display) wxWindow* win = *i; if (display == NULL && win->m_widget && win->m_widget->window) display = gdk_drawable_get_display(win->m_widget->window); - win->OnInternalIdle(); - InternalIdle(win->GetChildren(), display); + win->GTKUpdateCursor(true, false); + UpdateCursors(win->GetChildren(), display); } } @@ -395,7 +395,7 @@ void wxEndBusyCursor() g_globalCursor = gs_savedCursor; gs_savedCursor = wxNullCursor; GdkDisplay* unused = NULL; - InternalIdle(wxTopLevelWindows, unused); + UpdateCursors(wxTopLevelWindows, unused); } void wxBeginBusyCursor(const wxCursor* cursor) @@ -409,7 +409,7 @@ void wxBeginBusyCursor(const wxCursor* cursor) gs_savedCursor = g_globalCursor; g_globalCursor = *cursor; GdkDisplay* display = NULL; - InternalIdle(wxTopLevelWindows, display); + UpdateCursors(wxTopLevelWindows, display); if (display) gdk_display_flush(display); } @@ -422,5 +422,6 @@ bool wxIsBusy() void wxSetCursor( const wxCursor& cursor ) { g_globalCursor = cursor; - wxTheApp->WakeUpIdle(); + GdkDisplay* unused = NULL; + UpdateCursors(wxTopLevelWindows, unused); }