diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-30 15:19:33 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-03-30 17:27:10 -0400 |
commit | 662f40b8ae2ccb449b13074317b59f0e53c1ccc5 (patch) | |
tree | 3de866e7d595f98523cc4a2680160104583d7050 /rootston/desktop.c | |
parent | 212d957c69b15e57a791eec52de34dcde4241e86 (diff) |
Refactor cursor event passhtrough
Diffstat (limited to 'rootston/desktop.c')
-rw-r--r-- | rootston/desktop.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/rootston/desktop.c b/rootston/desktop.c index 15e0e336..532e720b 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -657,6 +657,25 @@ struct roots_view *desktop_view_at(struct roots_desktop *desktop, double lx, return NULL; } +struct wlr_surface *desktop_surface_at(struct roots_desktop *desktop, + double lx, double ly, double *sx, double *sy, + struct roots_view **view) { + //struct wlr_output *wlr_output = + // wlr_output_layout_output_at(desktop->layout, lx, ly); + // TODO: Iterate over layers + *view = NULL; + struct roots_view *_view; + struct wlr_surface *surface = NULL; + if ((_view = desktop_view_at(desktop, lx, ly, &surface, sx, sy))) { + if (view) { + *view = _view; + } + return surface; + } + // TODO: Iterate over layers + return NULL; +} + static void handle_layout_change(struct wl_listener *listener, void *data) { struct roots_desktop *desktop = wl_container_of(listener, desktop, layout_change); |