diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-09-30 14:43:24 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-09-30 14:43:24 -0400 |
commit | a471ed3ed0915ee3dd0afd1b686d6cec975f89f4 (patch) | |
tree | c3f4799a84f4a44a4cf421817602b50b138e2f80 /rootston | |
parent | bfb6914cdf725d9a614e5ae7f6b3f189aa3bd89e (diff) |
Reverse loop in view_at
Looks for the top-most view now.
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/desktop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rootston/desktop.c b/rootston/desktop.c index fcfc0ccf..8d1d34d6 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -86,7 +86,7 @@ static struct wlr_subsurface *subsurface_at(struct wlr_surface *surface, struct roots_view *view_at(struct roots_desktop *desktop, double lx, double ly, struct wlr_surface **surface, double *sx, double *sy) { - for (size_t i = 0; i < desktop->views->length; ++i) { + for (int i = desktop->views->length - 1; i >= 0; --i) { struct roots_view *view = desktop->views->items[i]; double view_sx = lx - view->x; |