Discussion:
wxBeginBusyCursor on MSW
(too old to reply)
Paarvai Naai
2009-05-01 04:39:39 UTC
Permalink
Hi all,

I am trying to use wxBeginBusyCursor and wxEndBusyCursor on MSW
(Windows XP) and am seeing some strange behavior. Specifically, when
I call wxBeginBusyCursor() I find that the mouse cursor changes to the
hourglass but then changes back to an arrow if I simply move the
mouse!

I should add that due to other architectural reasons for my
application, I am starting these operations upon a user click and then
I am manually running the event loop during this "busy period" before
I complete the handler for the original user click. The event loop is
being run as follows (in wxPython):

while self.app.Pending():
self.app.Dispatch()

The same behavior is seen if I set the cursor on a *specific* window
to wx.CURSOR_WAIT. It will turn into an hourglass but then change
back the moment the mouse is moved.

However, if I test a scenario where wxBeginBusyCursor is called in one
event handler, the app returns to the standard event loop, and then
wxEndBusyCursor is called from a subsequent event handler, the cursor
seems to behave properly.

Any hints would be much appreciated.

Thanks in advance,
Paarvai
personaje
2009-05-01 17:43:20 UTC
Permalink
Post by Paarvai Naai
Hi all,
I am trying to use wxBeginBusyCursor and wxEndBusyCursor on MSW
(Windows XP) and am seeing some strange behavior. Specifically, when
I call wxBeginBusyCursor() I find that the mouse cursor changes to the
hourglass but then changes back to an arrow if I simply move the
mouse!
I should add that due to other architectural reasons for my
application, I am starting these operations upon a user click and then
I am manually running the event loop during this "busy period" before
I complete the handler for the original user click. The event loop is
self.app.Dispatch()
The same behavior is seen if I set the cursor on a *specific* window
to wx.CURSOR_WAIT. It will turn into an hourglass but then change
back the moment the mouse is moved.
Hello, I am having a similar problem in MSW and C++. But in GTK it works as
expected.

Regards
Paarvai Naai
2009-05-01 21:01:53 UTC
Permalink
Yup, and the same thing happens with the mouse cursor if I do
self.app.Yield() instead of the code below.

Paarvai
Post by Paarvai Naai
I should add that due to other architectural reasons for my
application, I am starting these operations upon a user click and then
I am manually running the event loop during this "busy period" before
I complete the handler for the original user click.  The event loop is
           self.app.Dispatch()
Loading...