diff options
author | Scott Leggett <scott@sl.id.au> | 2018-05-28 02:25:42 +1000 |
---|---|---|
committer | Scott Leggett <scott@sl.id.au> | 2018-05-28 02:25:42 +1000 |
commit | b57f88e7dbefcda5a49ea515b410dc170e642a58 (patch) | |
tree | 401540b13bcad5f45b05af88a9a6a581e9495e9b /sway/input | |
parent | 1b8de3928714950d715053523d99aa1572ac63e0 (diff) |
Avoid assert on container type.
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/cursor.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 3e8fd5d8..a0afd78a 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -178,14 +178,9 @@ void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec, } else { struct sway_container *next_focus = seat_get_focus_inactive(cursor->seat, &root_container); - if (next_focus) { - if (!sway_assert(next_focus->type == C_VIEW, - "focus inactive container is not a view")) { - return; - } - if (view_is_visible(next_focus->sway_view)) { - seat_set_focus_warp(cursor->seat, next_focus, false); - } + if (next_focus && next_focus->type == C_VIEW && + view_is_visible(next_focus->sway_view)) { + seat_set_focus_warp(cursor->seat, next_focus, false); } } } |