dtwm: fix hourglass not showing up where it should

This commit is contained in:
Chase
2025-11-27 22:16:31 -05:00
committed by Jon Trulson
parent f38cd20c5c
commit 5639630d61
4 changed files with 29 additions and 42 deletions

View File

@@ -872,17 +872,17 @@ void ConfirmAction (WmScreenData *pSD, int nbr)
/*************************************<->*************************************
*
* ShowWaitState (flag)
*
* EnterWaitState (void)
* LeaveWatState (void)
*
* Description:
* -----------
* Enter/Leave the wait state.
*
* Enter the wait state.
* Leave the wait state.
*
* Inputs:
* ------
* flag = TRUE for Enter, FALSE for Leave.
* None.
*
*
* Outputs:
@@ -896,33 +896,22 @@ void ConfirmAction (WmScreenData *pSD, int nbr)
*
*************************************<->***********************************/
void ShowWaitState (Boolean flag)
void EnterWaitState(void)
{
unsigned int width;
unsigned int height;
unsigned int xHotspot;
unsigned int yHotspot;
Pixmap pixmap;
Pixmap maskPixmap;
XColor xcolors[2];
waitCursor = _DtGetHourGlassCursor(DISPLAY);
_DtGetHourGlassCursor(DISPLAY);
XGrabPointer (DISPLAY, DefaultRootWindow(DISPLAY), FALSE,
0, GrabModeAsync, GrabModeAsync, None,
waitCursor, CurrentTime);
XGrabKeyboard (DISPLAY, DefaultRootWindow(DISPLAY), FALSE,
GrabModeAsync, GrabModeAsync, CurrentTime);
}
if (flag)
{
XGrabPointer (DISPLAY, DefaultRootWindow(DISPLAY), FALSE,
0, GrabModeAsync, GrabModeAsync, None,
waitCursor, CurrentTime);
XGrabKeyboard (DISPLAY, DefaultRootWindow(DISPLAY), FALSE,
GrabModeAsync, GrabModeAsync, CurrentTime);
}
else
{
XUngrabPointer (DISPLAY, CurrentTime);
XUngrabKeyboard (DISPLAY, CurrentTime);
}
} /* END OF FUNCTION ShowWaitState */
void LeaveWaitState(void)
{
XUngrabPointer (DISPLAY, CurrentTime);
XUngrabKeyboard (DISPLAY, CurrentTime);
}