testWM: don't attach keyboard devices to the cursor
This commit is contained in:
+5
-2
@@ -243,7 +243,6 @@ static void on_new_output(void* data) {
|
||||
|
||||
static void on_new_input(void* data) {
|
||||
auto* dev = static_cast<struct wlr_input_device*>(data);
|
||||
S->cursor.attach_input_device(dev);
|
||||
if (dev->type == WLR_INPUT_DEVICE_KEYBOARD) {
|
||||
struct wlr_keyboard* kb = wlr_keyboard_from_input_device(dev);
|
||||
wlr::Keyboard k(kb);
|
||||
@@ -252,8 +251,12 @@ static void on_new_input(void* data) {
|
||||
S->seat.set_keyboard(k);
|
||||
S->key_sink.connect(&kb->events.key, on_key);
|
||||
S->caps |= WL_SEAT_CAPABILITY_KEYBOARD;
|
||||
} else if (dev->type == WLR_INPUT_DEVICE_POINTER) {
|
||||
} else {
|
||||
S->cursor.attach_input_device(dev);
|
||||
if (dev->type == WLR_INPUT_DEVICE_POINTER)
|
||||
S->caps |= WL_SEAT_CAPABILITY_POINTER;
|
||||
else if (dev->type == WLR_INPUT_DEVICE_TOUCH)
|
||||
S->caps |= WL_SEAT_CAPABILITY_TOUCH;
|
||||
}
|
||||
S->seat.set_capabilities((uint32_t)S->caps);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user