aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwayland/xwayland-input.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-07-28 21:19:00 +0200
committermarha <marha@users.sourceforge.net>2014-07-28 21:19:00 +0200
commitb33b8d8ae86876b50df96881b96074b3fe177cce (patch)
treebcdfa896ef05643b7edc1cd06518cbb7fed72c72 /xorg-server/hw/xwayland/xwayland-input.c
parentd0c30e7945e76ac119f6d867e27137c8a76f7e15 (diff)
downloadvcxsrv-b33b8d8ae86876b50df96881b96074b3fe177cce.tar.gz
vcxsrv-b33b8d8ae86876b50df96881b96074b3fe177cce.tar.bz2
vcxsrv-b33b8d8ae86876b50df96881b96074b3fe177cce.zip
plink fontconfig libX11 libXext xserver xkeyboard-config mesa git update 28 July 2014
xserver commit 4afedf545b673282f2e214c0e2c759c9be9b9a2a xkeyboard-config commit 9010f6c0745f472b670c22340b5bbd36e33ce37e libX11 commit 0885cad1e4a9ed57266582be320be55259c881bf libXext commit efdcbb7634501e1117d422636a0a75d7ea84b16b fontconfig commit a9e7b0494e04b3925d1bccc140ff2500cfff9618 mesa commit cc1e1da24a6c535617d9fb38858d48d8c2999e68 plink revision 10211
Diffstat (limited to 'xorg-server/hw/xwayland/xwayland-input.c')
-rw-r--r--xorg-server/hw/xwayland/xwayland-input.c42
1 files changed, 27 insertions, 15 deletions
diff --git a/xorg-server/hw/xwayland/xwayland-input.c b/xorg-server/hw/xwayland/xwayland-input.c
index 990cb82d8..cc5f7df05 100644
--- a/xorg-server/hw/xwayland/xwayland-input.c
+++ b/xorg-server/hw/xwayland/xwayland-input.c
@@ -491,31 +491,43 @@ seat_handle_capabilities(void *data, struct wl_seat *seat,
{
struct xwl_seat *xwl_seat = data;
- if (caps & WL_SEAT_CAPABILITY_POINTER && xwl_seat->pointer == NULL) {
+ if (caps & WL_SEAT_CAPABILITY_POINTER && xwl_seat->wl_pointer == NULL) {
xwl_seat->wl_pointer = wl_seat_get_pointer(seat);
wl_pointer_add_listener(xwl_seat->wl_pointer,
&pointer_listener, xwl_seat);
- xwl_seat_set_cursor(xwl_seat);
- xwl_seat->pointer =
- add_device(xwl_seat, "xwayland-pointer", xwl_pointer_proc);
- }
- else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && xwl_seat->pointer) {
+
+ if (xwl_seat->pointer)
+ EnableDevice(xwl_seat->pointer, TRUE);
+ else {
+ xwl_seat_set_cursor(xwl_seat);
+ xwl_seat->pointer =
+ add_device(xwl_seat, "xwayland-pointer", xwl_pointer_proc);
+ }
+ } else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && xwl_seat->wl_pointer) {
wl_pointer_release(xwl_seat->wl_pointer);
- RemoveDevice(xwl_seat->pointer, FALSE);
- xwl_seat->pointer = NULL;
+ xwl_seat->wl_pointer = NULL;
+
+ if (xwl_seat->pointer)
+ DisableDevice(xwl_seat->pointer, TRUE);
}
- if (caps & WL_SEAT_CAPABILITY_KEYBOARD && xwl_seat->keyboard == NULL) {
+ if (caps & WL_SEAT_CAPABILITY_KEYBOARD && xwl_seat->wl_keyboard == NULL) {
xwl_seat->wl_keyboard = wl_seat_get_keyboard(seat);
wl_keyboard_add_listener(xwl_seat->wl_keyboard,
&keyboard_listener, xwl_seat);
- xwl_seat->keyboard =
- add_device(xwl_seat, "xwayland-keyboard", xwl_keyboard_proc);
- }
- else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && xwl_seat->keyboard) {
+
+ if (xwl_seat->keyboard)
+ EnableDevice(xwl_seat->keyboard, TRUE);
+ else {
+ xwl_seat->keyboard =
+ add_device(xwl_seat, "xwayland-keyboard", xwl_keyboard_proc);
+ }
+ } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && xwl_seat->wl_keyboard) {
wl_keyboard_release(xwl_seat->wl_keyboard);
- RemoveDevice(xwl_seat->keyboard, FALSE);
- xwl_seat->keyboard = NULL;
+ xwl_seat->wl_keyboard = NULL;
+
+ if (xwl_seat->keyboard)
+ DisableDevice(xwl_seat->keyboard, TRUE);
}
xwl_seat->xwl_screen->expecting_event--;