]> git.mdlowis.com Git - proto/labwc.git/commitdiff
cursor: fix layer subsurface focus bug
authorJohan Malm <jgm323@gmail.com>
Mon, 2 Oct 2023 21:04:40 +0000 (22:04 +0100)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Mon, 2 Oct 2023 22:03:35 +0000 (00:03 +0200)
...by simply not focusing layer-shell subsurfaces on button press.

This is a temporary patch to fix a regression.

Fixes: issue #1131
src/cursor.c

index 773cd76a18e5dab6186fcb1c03ed77bbe6bee9d7..f100a9c99349f3153a2796c07fdadb9b289e8fd1 100644 (file)
@@ -914,9 +914,12 @@ cursor_button_press(struct seat *seat, struct wlr_pointer_button_event *event)
                        seat_set_focus_layer(seat, layer);
                }
        }
-       if (ctx.type == LAB_SSD_LAYER_SUBSURFACE) {
-               seat_focus_surface(seat, ctx.surface);
-       }
+
+       /*
+        * TODO: We may need to handle press on layer-shell subsurfaces here,
+        * but need to check keyboard interactivity before focusing them
+        * otherwise we break waybar. See issue #1131
+        */
 
        if (ctx.type != LAB_SSD_CLIENT && ctx.type != LAB_SSD_LAYER_SUBSURFACE
                        && wlr_seat_pointer_has_grab(seat->seat)) {