From d1dea842a06344bef9500b372463c0d1f94f7701 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Thu, 23 Nov 2000 21:38:41 +0000 Subject: [PATCH] Busy cursor don't need wxYield(), SendIdleEvents() is enough and safe. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/cursor.cpp | 7 +++++-- src/gtk1/cursor.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/gtk/cursor.cpp b/src/gtk/cursor.cpp index 61a8c8f0b6..25b07ea391 100644 --- a/src/gtk/cursor.cpp +++ b/src/gtk/cursor.cpp @@ -14,6 +14,7 @@ #include "wx/cursor.h" #include "wx/utils.h" +#include "wx/app.h" #include #include @@ -204,7 +205,8 @@ void wxEndBusyCursor() wxSetCursor( gs_savedCursor ); gs_savedCursor = wxNullCursor; - wxYield(); + if (wxTheApp) + wxTheApp->SendIdleEvents(); } void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) ) @@ -219,7 +221,8 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) ) wxSetCursor( wxCursor(wxCURSOR_WATCH) ); - wxYield(); + if (wxTheApp) + wxTheApp->SendIdleEvents(); } bool wxIsBusy() diff --git a/src/gtk1/cursor.cpp b/src/gtk1/cursor.cpp index 61a8c8f0b6..25b07ea391 100644 --- a/src/gtk1/cursor.cpp +++ b/src/gtk1/cursor.cpp @@ -14,6 +14,7 @@ #include "wx/cursor.h" #include "wx/utils.h" +#include "wx/app.h" #include #include @@ -204,7 +205,8 @@ void wxEndBusyCursor() wxSetCursor( gs_savedCursor ); gs_savedCursor = wxNullCursor; - wxYield(); + if (wxTheApp) + wxTheApp->SendIdleEvents(); } void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) ) @@ -219,7 +221,8 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) ) wxSetCursor( wxCursor(wxCURSOR_WATCH) ); - wxYield(); + if (wxTheApp) + wxTheApp->SendIdleEvents(); } bool wxIsBusy() -- 2.45.2