diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-04 11:31:25 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-06-04 11:31:25 +1000 |
commit | bcdb676abb34de49c57a11059658427f675ccec4 (patch) | |
tree | d604a6b22f195ab4b7f806c7a7fa02381f359b49 | |
parent | Restore focus when unmapping layer shell surfaces (diff) | |
download | sway-bcdb676abb34de49c57a11059658427f675ccec4.tar.gz sway-bcdb676abb34de49c57a11059658427f675ccec4.tar.zst sway-bcdb676abb34de49c57a11059658427f675ccec4.zip |
Don't set focus to NULL when clicking a surface which has no container
-rw-r--r-- | sway/input/cursor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 16e5427b..d6e17ae1 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -264,7 +264,7 @@ void dispatch_cursor_button(struct sway_cursor *cursor, | |||
264 | if (new_ws != old_ws) { | 264 | if (new_ws != old_ws) { |
265 | seat_set_focus(cursor->seat, cont); | 265 | seat_set_focus(cursor->seat, cont); |
266 | } | 266 | } |
267 | } else { | 267 | } else if (cont) { |
268 | seat_set_focus(cursor->seat, cont); | 268 | seat_set_focus(cursor->seat, cont); |
269 | } | 269 | } |
270 | 270 | ||