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.
|
- 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
|
- Rotated displays are currently updated via full blits. This
|
||||||
is slower than a normal oprientated display. Debug mode will
|
is slower than a normal oprientated display. Debug mode will
|
||||||
|
|
|
@ -682,34 +682,37 @@ hostx_get_event(EphyrHostXEvent *ev)
|
||||||
XUngrabPointer (HostX.dpy, CurrentTime);
|
XUngrabPointer (HostX.dpy, CurrentTime);
|
||||||
grabbed = False;
|
grabbed = False;
|
||||||
hostx_set_win_title("( ctrl+shift grabs mouse and keyboard )");
|
hostx_set_win_title("( ctrl+shift grabs mouse and keyboard )");
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* Attempt grab */
|
||||||
if (XGrabKeyboard (HostX.dpy, HostX.win, True,
|
if (XGrabKeyboard (HostX.dpy, HostX.win, True,
|
||||||
GrabModeAsync,
|
GrabModeAsync,
|
||||||
GrabModeAsync,
|
GrabModeAsync,
|
||||||
CurrentTime))
|
CurrentTime) == 0)
|
||||||
break;
|
{
|
||||||
|
if (XGrabPointer (HostX.dpy, HostX.win, True,
|
||||||
if (XGrabPointer (HostX.dpy, HostX.win, True,
|
NoEventMask,
|
||||||
NoEventMask,
|
GrabModeAsync,
|
||||||
GrabModeAsync,
|
GrabModeAsync,
|
||||||
GrabModeAsync,
|
HostX.win, None, CurrentTime) == 0)
|
||||||
HostX.win, None, CurrentTime))
|
{
|
||||||
break;
|
grabbed = True;
|
||||||
|
hostx_set_win_title("( ctrl+shift releases mouse and keyboard )");
|
||||||
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;
|
return 1;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue