add missing ! for wl seat caps

This commit is contained in:
Zandr Martin 2017-03-18 11:29:02 -04:00
parent ec50b92bb4
commit 2d2ce91883
No known key found for this signature in database
GPG key ID: AA2BB8EF77F7BBDC

View file

@ -193,7 +193,7 @@ static void seat_handle_capabilities(void *data, struct wl_seat *seat,
if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !reg->keyboard) { if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !reg->keyboard) {
reg->keyboard = wl_seat_get_keyboard(reg->seat); reg->keyboard = wl_seat_get_keyboard(reg->seat);
wl_keyboard_add_listener(reg->keyboard, &keyboard_listener, reg); wl_keyboard_add_listener(reg->keyboard, &keyboard_listener, reg);
} else if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && reg->keyboard) { } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && reg->keyboard) {
wl_keyboard_destroy(reg->keyboard); wl_keyboard_destroy(reg->keyboard);
reg->keyboard = NULL; reg->keyboard = NULL;
} }