diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-09-02 10:39:41 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-09-04 16:48:34 -1000 |
commit | 187306640ba8f2ab2f246a5030617ee985cf9223 (patch) | |
tree | 8df84318979258b737f6909a1dbd9547f417cf9c | |
parent | 0ad5e355bd8c5035f9219aa068418c38a6bbd4b8 (diff) |
seatop_default: only focus container on press
This matches i3's behavior of only focusing a container when pressed.
This allows for `bindsym button1 nop`, `bindsym BTN_LEFT nop`, or
`bindcode 272 nop` to be used to disable focusing when clicking on the
title (or with additional flags to bind{code,sym} other portions of
the container).
Without this additional condition, the user would need both
`bindsym button1 nop` and `bindsym --release button1 nop` to override
both the pressed and released behavior.
-rw-r--r-- | sway/input/seatop_default.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c index 11382276..9087434c 100644 --- a/sway/input/seatop_default.c +++ b/sway/input/seatop_default.c @@ -400,7 +400,7 @@ static void handle_button(struct sway_seat *seat, uint32_t time_msec, } // Handle clicking a container surface or decorations - if (cont) { + if (cont && state == WLR_BUTTON_PRESSED) { node = seat_get_focus_inactive(seat, &cont->node); seat_set_focus(seat, node); seat_pointer_notify_button(seat, time_msec, button, state); |