diff options
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r-- | sway/tree/container.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 1664514a..f36fe4b0 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -358,7 +358,6 @@ struct sway_container *container_at(struct sway_workspace *workspace, | |||
358 | struct wlr_surface **surface, double *sx, double *sy) { | 358 | struct wlr_surface **surface, double *sx, double *sy) { |
359 | struct sway_container *c; | 359 | struct sway_container *c; |
360 | 360 | ||
361 | // Focused view's popups | ||
362 | struct sway_seat *seat = input_manager_current_seat(input_manager); | 361 | struct sway_seat *seat = input_manager_current_seat(input_manager); |
363 | struct sway_container *focus = seat_get_focused_container(seat); | 362 | struct sway_container *focus = seat_get_focused_container(seat); |
364 | bool is_floating = focus && container_is_floating_or_child(focus); | 363 | bool is_floating = focus && container_is_floating_or_child(focus); |
@@ -370,14 +369,11 @@ struct sway_container *container_at(struct sway_workspace *workspace, | |||
370 | } | 369 | } |
371 | *surface = NULL; | 370 | *surface = NULL; |
372 | } | 371 | } |
373 | // Cast a ray to handle floating windows | 372 | // Floating |
374 | for (int i = workspace->floating->length - 1; i >= 0; --i) { | 373 | if ((c = floating_container_at(lx, ly, surface ,sx ,sy))) { |
375 | struct sway_container *cn = workspace->floating->items[i]; | 374 | return c; |
376 | if (cn->view && (c = surface_at_view(cn, lx, ly, surface, sx, sy))) { | ||
377 | return c; | ||
378 | } | ||
379 | } | 375 | } |
380 | // If focused is tiling, focused view's non-popups | 376 | // Tiling (focused) |
381 | if (focus && focus->view && !is_floating) { | 377 | if (focus && focus->view && !is_floating) { |
382 | if ((c = surface_at_view(focus, lx, ly, surface, sx, sy))) { | 378 | if ((c = surface_at_view(focus, lx, ly, surface, sx, sy))) { |
383 | return c; | 379 | return c; |