diff options
author | emersion <contact@emersion.fr> | 2018-03-30 23:05:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-30 23:05:49 -0400 |
commit | f133170ff0187247b13c227bd2527a273c54f13f (patch) | |
tree | 3dd4cc0c4317d2da3a6791ecb631be270bd9e176 /rootston | |
parent | 2053a4c144bdde2df5cb7b6b7036cde008372493 (diff) | |
parent | e19ee6d469a98d2957e614243ea30674be1977f7 (diff) |
Merge pull request #787 from swaywm/input-point
Add wlr_surface_point_accepts_input
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/desktop.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/rootston/desktop.c b/rootston/desktop.c index 7ee2c69a..1d2e9549 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -622,9 +622,7 @@ static bool view_at(struct roots_view *view, double lx, double ly, return true; } - if (wlr_box_contains_point(&box, view_sx, view_sy) && - pixman_region32_contains_point(&view->wlr_surface->current->input, - view_sx, view_sy, NULL)) { + if (wlr_surface_point_accepts_input(view->wlr_surface, view_sx, view_sy)) { *sx = view_sx; *sy = view_sy; *surface = view->wlr_surface; @@ -668,16 +666,8 @@ static struct wlr_surface *layer_surface_at(struct roots_output *output, roots_surface->layer_surface->surface; double _sx = ox - roots_surface->geo.x; double _sy = oy - roots_surface->geo.y; - struct wlr_box box = { - .x = roots_surface->geo.x, - .y = roots_surface->geo.y, - .width = wlr_surface->current->width, - .height = wlr_surface->current->height, - }; // TODO: Test popups/subsurfaces - if (wlr_box_contains_point(&box, ox, oy) && - pixman_region32_contains_point(&wlr_surface->current->input, - _sx, _sy, NULL)) { + if (wlr_surface_point_accepts_input(wlr_surface, _sx, _sy)) { *sx = _sx; *sy = _sy; return wlr_surface; |