diff options
author | Ivan Chebykin <ivan@chebykin.org> | 2018-05-25 17:45:41 +0300 |
---|---|---|
committer | Ivan Chebykin <ivan@chebykin.org> | 2018-05-25 17:45:41 +0300 |
commit | 740234a4bc9c8509c766f8feb9f7116bf8950c49 (patch) | |
tree | 4d56fcd2439600d293f6ed5fe653caa2e39c63f4 /sway/input/cursor.c | |
parent | 53516fa03fd291cdcedbd9e27457cf1cfd40f903 (diff) |
Break after first tabbed/stacked layout
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r-- | sway/input/cursor.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 4e01df70..0b6999ea 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -168,19 +168,18 @@ void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec, // inside tabbed/stacked layout we should skip them bool do_mouse_focus = true; struct sway_container *p = c->parent; - struct sway_container *first_tabbed_parent = c->parent; while (p) { if ((p->layout == L_TABBED || p->layout == L_STACKED) && !view_is_visible(c->sway_view)) { do_mouse_focus = false; - first_tabbed_parent = p; + break; } p = p->parent; } if (!do_mouse_focus) { struct sway_container *next_focus = seat_get_focus_inactive( - cursor->seat, first_tabbed_parent); - if (next_focus) { + cursor->seat, p); + if (next_focus && view_is_visible(next_focus->sway_view)) { seat_set_focus_warp(cursor->seat, next_focus, false); } } else { |