Fix wlr_surface_subsurface_at, change it to be wlr_surface_surface_at

This commit is contained in:
emersion 2018-04-04 16:48:23 -04:00
parent 94d76ee485
commit d16127b3cb
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
4 changed files with 39 additions and 52 deletions

View file

@ -605,14 +605,13 @@ static bool view_at(struct roots_view *view, double lx, double ly,
}
}
double sub_x, sub_y;
struct wlr_subsurface *subsurface =
wlr_surface_subsurface_at(view->wlr_surface,
view_sx, view_sy, &sub_x, &sub_y);
if (subsurface) {
*sx = view_sx - sub_x;
*sy = view_sy - sub_y;
*surface = subsurface->surface;
double _sx, _sy;
struct wlr_surface *_surface = wlr_surface_surface_at(view->wlr_surface,
view_sx, view_sy, &_sx, &_sy);
if (surface != NULL) {
*sx = _sx;
*sy = _sy;
*surface = _surface;
return true;
}
@ -623,13 +622,6 @@ static bool view_at(struct roots_view *view, double lx, double ly,
return true;
}
if (wlr_surface_point_accepts_input(view->wlr_surface, view_sx, view_sy)) {
*sx = view_sx;
*sy = view_sy;
*surface = view->wlr_surface;
return true;
}
return false;
}