diff options
Diffstat (limited to 'sway/input/cursor.c')
-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, | |||
178 | } else { | 178 | } else { |
179 | struct sway_container *next_focus = | 179 | struct sway_container *next_focus = |
180 | seat_get_focus_inactive(cursor->seat, &root_container); | 180 | seat_get_focus_inactive(cursor->seat, &root_container); |
181 | if (next_focus) { | 181 | if (next_focus && next_focus->type == C_VIEW && |
182 | if (!sway_assert(next_focus->type == C_VIEW, | 182 | view_is_visible(next_focus->sway_view)) { |
183 | "focus inactive container is not a view")) { | 183 | seat_set_focus_warp(cursor->seat, next_focus, false); |
184 | return; | ||
185 | } | ||
186 | if (view_is_visible(next_focus->sway_view)) { | ||
187 | seat_set_focus_warp(cursor->seat, next_focus, false); | ||
188 | } | ||
189 | } | 184 | } |
190 | } | 185 | } |
191 | } | 186 | } |