]> git.mdlowis.com Git - proto/labwc.git/commitdiff
cursor: Don't trigger cursor modifiers if we have a constraint
authorJoshua Ashton <joshua@froggi.es>
Sun, 17 Oct 2021 22:03:11 +0000 (22:03 +0000)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 17 Oct 2021 22:23:39 +0000 (23:23 +0100)
We are probably playing a game and we don't want to be resizing the window when trying to duck/jump whatever.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
src/cursor.c

index b81dbcc60080257869ac28059a931551a68d63de..a15578188e9b653d8542c42667991eadd330359f 100644 (file)
@@ -451,7 +451,7 @@ cursor_button(struct wl_listener *listener, void *data)
        /* handle alt + _press_ on view */
        struct wlr_input_device *device = seat->keyboard_group->input_device;
        uint32_t modifiers = wlr_keyboard_get_modifiers(device->keyboard);
-       if (modifiers & WLR_MODIFIER_ALT && event->state == WLR_BUTTON_PRESSED) {
+       if (modifiers & WLR_MODIFIER_ALT && event->state == WLR_BUTTON_PRESSED && !seat->current_constraint) {
                handle_cursor_button_with_meta_key(view, event->button,
                        server->seat.cursor->x, server->seat.cursor->y);
                return;