]> git.mdlowis.com Git - proto/labwc.git/commitdiff
cursor: send release event to CSD client before finishing window dragging
authortokyo4j <hrak1529@gmail.com>
Fri, 5 Apr 2024 09:01:06 +0000 (18:01 +0900)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Fri, 5 Apr 2024 09:37:52 +0000 (11:37 +0200)
This fixes that, when a CSD window is dragged into below waybar and the cursor
button is released, the cursor focus is moved from the CSD window to waybar and
a release event is sent to waybar, not original CSD window.

src/input/cursor.c

index 11b71b8297f66ecd6cc839f8b0c2e8c15a01013f..8f4f759e48874bfcf8270ac90c18135e9ce7c899 100644 (file)
@@ -1033,14 +1033,15 @@ cursor_button_release(struct seat *seat, uint32_t button,
        }
 
        if (server->input_mode != LAB_INPUT_STATE_PASSTHROUGH) {
-               /* Exit interactive move/resize mode */
-               interactive_finish(server->grabbed_view);
-
                if (pressed_surface) {
                        /* Ensure CSD clients see the release event */
                        wlr_seat_pointer_notify_button(seat->seat, time_msec,
                                button, button_state);
                }
+
+               /* Exit interactive move/resize mode */
+               interactive_finish(server->grabbed_view);
+
                return;
        }