[PATCH wayland 2/4] server: fix wl_seat_set_keyboard
Kristian Høgsberg
hoegsberg at gmail.com
Tue Jul 10 11:08:12 PDT 2012
On Tue, Jul 10, 2012 at 01:05:01PM +0300, Pekka Paalanen wrote:
> 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.
Yup, looks right.
Kristian
> 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