Xephyr grab fix
This commit is contained in:
parent
2854fa438f
commit
d7f46f71d8
|
@ -47,6 +47,8 @@ Caveats
|
|||
=======
|
||||
|
||||
- Depth is limited to being the same as the host.
|
||||
*Update* As of 8/11/2004. Xephyr can now do 8bpp & 16bpp
|
||||
on 24bpp host.
|
||||
|
||||
- Rotated displays are currently updated via full blits. This
|
||||
is slower than a normal oprientated display. Debug mode will
|
||||
|
|
|
@ -682,34 +682,37 @@ hostx_get_event(EphyrHostXEvent *ev)
|
|||
XUngrabPointer (HostX.dpy, CurrentTime);
|
||||
grabbed = False;
|
||||
hostx_set_win_title("( ctrl+shift grabs mouse and keyboard )");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Attempt grab */
|
||||
if (XGrabKeyboard (HostX.dpy, HostX.win, True,
|
||||
GrabModeAsync,
|
||||
GrabModeAsync,
|
||||
CurrentTime))
|
||||
break;
|
||||
|
||||
if (XGrabPointer (HostX.dpy, HostX.win, True,
|
||||
NoEventMask,
|
||||
GrabModeAsync,
|
||||
GrabModeAsync,
|
||||
HostX.win, None, CurrentTime))
|
||||
break;
|
||||
|
||||
grabbed = True;
|
||||
hostx_set_win_title("( ctrl+shift releases mouse and keyboard )");
|
||||
|
||||
CurrentTime) == 0)
|
||||
{
|
||||
if (XGrabPointer (HostX.dpy, HostX.win, True,
|
||||
NoEventMask,
|
||||
GrabModeAsync,
|
||||
GrabModeAsync,
|
||||
HostX.win, None, CurrentTime) == 0)
|
||||
{
|
||||
grabbed = True;
|
||||
hostx_set_win_title("( ctrl+shift releases mouse and keyboard )");
|
||||
}
|
||||
else /* Failed pointer grabm ungrab keyboard */
|
||||
XUngrabKeyboard (HostX.dpy, CurrentTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ev->type = EPHYR_EV_KEY_RELEASE;
|
||||
ev->data.key_up.scancode = xev.xkey.keycode;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Still send the release event even if above has happened
|
||||
* server will get confused with just an up event.
|
||||
* Maybe it would be better to just block shift+ctrls getting to
|
||||
* kdrive all togeather.
|
||||
*/
|
||||
ev->type = EPHYR_EV_KEY_RELEASE;
|
||||
ev->data.key_up.scancode = xev.xkey.keycode;
|
||||
return 1;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue
Block a user