Merge pull request #860 from emersion/fix-xdg-popup-at

Fix wlr_xdg_surface_surface_at for popups
This commit is contained in:
Drew DeVault 2018-04-12 19:04:43 -04:00 committed by GitHub
commit 5c2d923718
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -1644,8 +1644,8 @@ struct wlr_surface *wlr_xdg_surface_surface_at(
wlr_xdg_surface_popup_get_position(popup, &popup_sx, &popup_sy); wlr_xdg_surface_popup_get_position(popup, &popup_sx, &popup_sy);
struct wlr_surface *sub = wlr_xdg_surface_surface_at(popup, struct wlr_surface *sub = wlr_xdg_surface_surface_at(popup,
sx - popup_sx + popup->geometry.x, sx - popup_sx,
sy - popup_sy + popup->geometry.y, sy - popup_sy,
sub_x, sub_y); sub_x, sub_y);
if (sub != NULL) { if (sub != NULL) {
return sub; return sub;

View File

@ -1608,8 +1608,8 @@ struct wlr_surface *wlr_xdg_surface_v6_surface_at(
wlr_xdg_surface_v6_popup_get_position(popup, &popup_sx, &popup_sy); wlr_xdg_surface_v6_popup_get_position(popup, &popup_sx, &popup_sy);
struct wlr_surface *sub = wlr_xdg_surface_v6_surface_at(popup, struct wlr_surface *sub = wlr_xdg_surface_v6_surface_at(popup,
sx - popup_sx + popup->geometry.x, sx - popup_sx,
sy - popup_sy + popup->geometry.y, sy - popup_sy,
sub_x, sub_y); sub_x, sub_y);
if (sub != NULL) { if (sub != NULL) {
return sub; return sub;