Wait Curser and gSystem->ProcessEvents()

I have an application built with win32gdk 3.10/0 (10/02/03). Some of the controls carry out lengthy operations - so I make calls to gSystem->ProcessEvents() - otherwise the gui does’nt repaint itself if it gets uncovered by another window. On the other hand, I’d like to let the user know that the application is busy - so I call gPad->SetCursor(kWatch). The problem is, when the cursor is moved AND gSystem->ProcessEvents() is called, the cursor reverts back its normal state. Is there a way to avoid this behavior? Thanks

Ed Oltman

Hello Ed,

Try this way :


lengthy operations;


Hope it helps,

Hi Bertrand, Ed,
there is “hard coded” setting of cursor in
root.cern.ch/root/htmldoc/src/TC … vas:Update
Probably we need to add new data member to TCanavas/TPad
class i.e. fCursor (?) to fix it.

Regards. Valeriy


I used Bertrand’s presription, [quote]gVirtualX->SetCursor(YourPad->GetId(),gVirtualX->CreateCursor(kWatch));

lengthy operations;

There are two problems here:

  1. When the cursor passes over the TRootEmbeddedCanvas, it reverts back to a + or pointer, etc… Is it possible to make it so that it stays a watch cursor then too? If the user moves the curser over the canvas (and she does!) this usefull feedback hint is lost.

  2. When the lengthy operation is finished, the cursor (assuming its not positioned on the canvas!) remains a watch until after the user moves it. Is there another command to follow the gVirtualX->SetCursor() command that “updates” the displayed state?