aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Events.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Events.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index 33eafa55b..40b30308c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -1728,14 +1728,11 @@ FIXME: Don't enqueue the KeyRelease event if the key was
nxagentLastEnteredWindow = NULL;
}
- if (nxagentPointerAndKeyboardGrabbed == 1)
+ if (X.xcrossing.window == nxagentDefaultWindows[0] &&
+ X.xcrossing.detail != NotifyInferior &&
+ X.xcrossing.mode == NotifyNormal)
{
- if (X.xcrossing.window == nxagentDefaultWindows[0] &&
- X.xcrossing.detail != NotifyInferior &&
- X.xcrossing.mode == NotifyNormal)
- {
- nxagentUngrabPointerAndKeyboard(&X);
- }
+ nxagentUngrabPointerAndKeyboard(&X);
}
if (X.xcrossing.detail != NotifyInferior)
@@ -2123,14 +2120,8 @@ FIXME: Don't enqueue the KeyRelease event if the key was
if (nxagentWMIsRunning)
{
- if (nxagentOption(Fullscreen))
- {
- nxagentMinimizeFromFullScreen(pScreen);
- }
- else
- {
- XIconifyWindow(nxagentDisplay, nxagentDefaultWindows[0], DefaultScreen(nxagentDisplay));
- }
+ XIconifyWindow(nxagentDisplay, nxagentDefaultWindows[0],
+ DefaultScreen(nxagentDisplay));
}
}
@@ -3791,6 +3782,11 @@ void nxagentGrabPointerAndKeyboard(XEvent *X)
int resource;
+ if (nxagentPointerAndKeyboardGrabbed == 1)
+ {
+ return;
+ }
+
#ifdef TEST
fprintf(stderr, "nxagentGrabPointerAndKeyboard: Grabbing pointer and keyboard with event at [%p].\n",
(void *) X);
@@ -3856,6 +3852,11 @@ void nxagentUngrabPointerAndKeyboard(XEvent *X)
{
unsigned long now;
+ if (nxagentPointerAndKeyboardGrabbed == 0)
+ {
+ return;
+ }
+
#ifdef TEST
fprintf(stderr, "nxagentUngrabPointerAndKeyboard: Ungrabbing pointer and keyboard with event at [%p].\n",
(void *) X);