[PATCH wayland 2/2] server: fix wl_seat_set_{keyboard,touch}

Pekka Paalanen ppaalanen at gmail.com
Thu Jul 5 03:31:11 PDT 2012


Looks like an exclamation mark had decided to run and hide on another
line.

This makes wl_seat_set_keyboard and wl_seat_set_touch similar to
wl_seat_set_pointer.

Signed-off-by: Pekka Paalanen <ppaalanen at gmail.com>
---
 src/wayland-server.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/wayland-server.c b/src/wayland-server.c
index 031c243..df9bd07 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -750,7 +750,7 @@ wl_seat_set_keyboard(struct wl_seat *seat, struct wl_keyboard *keyboard)
 {
 	if (keyboard && (seat->keyboard || keyboard->seat))
 		return; /* XXX: error? */
-	if (!keyboard && seat->keyboard)
+	if (!keyboard && !seat->keyboard)
 		return;
 
 	seat->keyboard = keyboard;
@@ -769,7 +769,7 @@ wl_seat_set_touch(struct wl_seat *seat, struct wl_touch *touch)
 		return;
 
 	seat->touch = touch;
-	if (!touch)
+	if (touch)
 		touch->seat = seat;
 
 	seat_send_updated_caps(seat);
-- 
1.7.8.6



More information about the wayland-devel mailing list