aboutsummaryrefslogtreecommitdiff
path: root/sway/tree
diff options
context:
space:
mode:
authorRyan Dwyer <RyanDwyer@users.noreply.github.com>2018-10-10 21:50:29 +1000
committerGitHub <noreply@github.com>2018-10-10 21:50:29 +1000
commited33d95b6ae8a2d231cdda554f364af7211c2527 (patch)
treead2feecb17cadccf71468d4f6b22d2ad6cf27d00 /sway/tree
parent41991542cac1d909a55fc834d231fe747097b1a4 (diff)
parent155e863ead0edca244e4c961ca80418edde81838 (diff)
Merge branch 'master' into mouse-warping-container
Diffstat (limited to 'sway/tree')
-rw-r--r--sway/tree/container.c12
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,
struct wlr_surface **surface, double *sx, double *sy) {
struct sway_container *c;
- // Focused view's popups
struct sway_seat *seat = input_manager_current_seat(input_manager);
struct sway_container *focus = seat_get_focused_container(seat);
bool is_floating = focus && container_is_floating_or_child(focus);
@@ -370,14 +369,11 @@ struct sway_container *container_at(struct sway_workspace *workspace,
}
*surface = NULL;
}
- // Cast a ray to handle floating windows
- for (int i = workspace->floating->length - 1; i >= 0; --i) {
- struct sway_container *cn = workspace->floating->items[i];
- if (cn->view && (c = surface_at_view(cn, lx, ly, surface, sx, sy))) {
- return c;
- }
+ // Floating
+ if ((c = floating_container_at(lx, ly, surface ,sx ,sy))) {
+ return c;
}
- // If focused is tiling, focused view's non-popups
+ // Tiling (focused)
if (focus && focus->view && !is_floating) {
if ((c = surface_at_view(focus, lx, ly, surface, sx, sy))) {
return c;