dtwm: fix hourglass not showing up where it should
This commit is contained in:
@@ -391,9 +391,6 @@ Initialize (DtPanelShellWidget panel_shell)
|
||||
Screen * screen = XtScreen (panel_shell);
|
||||
Display * display = XtDisplay (panel_shell);
|
||||
|
||||
Pixmap busy_pixmap;
|
||||
Pixmap busy_pixmap_mask;
|
||||
|
||||
Pixel black_pixel = BlackPixelOfScreen (screen);
|
||||
Pixel white_pixel = WhitePixelOfScreen (screen);
|
||||
|
||||
@@ -408,7 +405,7 @@ Initialize (DtPanelShellWidget panel_shell)
|
||||
|
||||
/* Create busy cursor. */
|
||||
|
||||
_DtGetHourGlassCursor(display);
|
||||
panel.busy_cursor = _DtGetHourGlassCursor(display);
|
||||
|
||||
panel.resolution = (int) (intptr_t) panel.element_values[PANEL_RESOLUTION].parsed_value;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ extern void PaintFeedbackWindow (WmScreenData *pSD);
|
||||
extern void ShowFeedbackWindow (WmScreenData *pSD, int x, int y,
|
||||
unsigned int width, unsigned int height,
|
||||
unsigned long style);
|
||||
extern void ShowWaitState (Boolean flag);
|
||||
extern void EnterWaitState(void);
|
||||
extern void LeaveWaitState(void);
|
||||
extern void UpdateFeedbackInfo (WmScreenData *pSD, int x, int y,
|
||||
unsigned int width, unsigned int height);
|
||||
extern void UpdateFeedbackText (WmScreenData *pSD, int x, int y,
|
||||
|
||||
@@ -495,7 +495,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
|
||||
|
||||
InitCursorInfo ();
|
||||
InitWmDisplayEnv ();
|
||||
ShowWaitState (TRUE);
|
||||
EnterWaitState();
|
||||
|
||||
/*
|
||||
* Initialize support for BMenu virtual mouse binding
|
||||
@@ -628,7 +628,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
|
||||
if (!(wmGD.Screens = (WmScreenData *)
|
||||
XtCalloc (wmGD.numScreens, sizeof(WmScreenData))))
|
||||
{
|
||||
ShowWaitState (FALSE);
|
||||
LeaveWaitState();
|
||||
Warning (((char *)GETMESSAGE(40, 2, "Insufficient memory for Screen data")));
|
||||
ExitWM (WM_ERROR_EXIT_VALUE);
|
||||
}
|
||||
@@ -748,7 +748,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
|
||||
dpy2Argv);
|
||||
if (!wmGD.display1)
|
||||
{
|
||||
ShowWaitState (FALSE);
|
||||
LeaveWaitState();
|
||||
Warning(((char *)GETMESSAGE(40, 4, "Could not open second display connection.")));
|
||||
ExitWM (WM_ERROR_EXIT_VALUE);
|
||||
}
|
||||
@@ -820,7 +820,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
|
||||
/*
|
||||
* No screens for me to manage, give up.
|
||||
*/
|
||||
ShowWaitState (FALSE);
|
||||
LeaveWaitState();
|
||||
Warning (((char *)GETMESSAGE(40, 5, "Unable to manage any screens on display.")));
|
||||
ExitWM (WM_ERROR_EXIT_VALUE);
|
||||
}
|
||||
@@ -857,7 +857,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
|
||||
|
||||
if (fcntl (ConnectionNumber (DISPLAY), F_SETFD, 1) == -1)
|
||||
{
|
||||
ShowWaitState (FALSE);
|
||||
LeaveWaitState();
|
||||
Warning (((char *)GETMESSAGE(40, 6, "Cannot configure X connection")));
|
||||
ExitWM (WM_ERROR_EXIT_VALUE);
|
||||
}
|
||||
@@ -1138,7 +1138,7 @@ XFlush (DISPLAY);
|
||||
|
||||
InitKeyboardFocus ();
|
||||
|
||||
ShowWaitState (FALSE);
|
||||
LeaveWaitState();
|
||||
|
||||
/*
|
||||
* Tell the rest of DT that we're up
|
||||
@@ -2077,7 +2077,7 @@ void InitScreenNames (void)
|
||||
if (!(wmGD.screenNames =
|
||||
(unsigned char **) XtMalloc (numScreens * sizeof(char *))))
|
||||
{
|
||||
ShowWaitState (FALSE);
|
||||
LeaveWaitState();
|
||||
Warning (((char *)GETMESSAGE(40, 12, "Insufficient memory for screen names")));
|
||||
ExitWM (WM_ERROR_EXIT_VALUE);
|
||||
}
|
||||
@@ -2087,7 +2087,7 @@ void InitScreenNames (void)
|
||||
if (!(wmGD.screenNames[num] =
|
||||
(unsigned char *) XtMalloc (4*sizeof(char))))
|
||||
{
|
||||
ShowWaitState (FALSE);
|
||||
LeaveWaitState();
|
||||
Warning (((char *)GETMESSAGE(40, 13, "Insufficient memory for screen names")));
|
||||
ExitWM (WM_ERROR_EXIT_VALUE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user