[PATCH wayland 2/4] server: fix wl_seat_set_keyboard

Pekka Paalanen ppaalanen at gmail.com
Tue Jul 10 03:05:01 PDT 2012


This makes wl_seat_set_keyboard similar to wl_seat_set_pointer in that
it's a no-op, if you try to set keyboard to NULL when it already is
NULL, instead of refusing to set it to NULL ever.

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

diff --git a/src/wayland-server.c b/src/wayland-server.c
index 82ed326..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;
-- 
1.7.8.6



More information about the wayland-devel mailing list