aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-12 19:04:43 -0400
committerGitHub <noreply@github.com>2018-04-12 19:04:43 -0400
commit5c2d92371857140d7b752633e996f2e269e6e58a (patch)
tree49aea277d1bac31514e1aa31bd4f9416a263e3cf
parent7efd9885b65d0115e30f2253a30f165c12a07d2a (diff)
parentfa0be972bb770b11593ba1990393007e39b7e423 (diff)
Merge pull request #860 from emersion/fix-xdg-popup-at
Fix wlr_xdg_surface_surface_at for popups
-rw-r--r--types/wlr_xdg_shell.c4
-rw-r--r--types/wlr_xdg_shell_v6.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/types/wlr_xdg_shell.c b/types/wlr_xdg_shell.c
index d4848e35..1aa964a6 100644
--- a/types/wlr_xdg_shell.c
+++ b/types/wlr_xdg_shell.c
@@ -1644,8 +1644,8 @@ struct wlr_surface *wlr_xdg_surface_surface_at(
wlr_xdg_surface_popup_get_position(popup, &popup_sx, &popup_sy);
struct wlr_surface *sub = wlr_xdg_surface_surface_at(popup,
- sx - popup_sx + popup->geometry.x,
- sy - popup_sy + popup->geometry.y,
+ sx - popup_sx,
+ sy - popup_sy,
sub_x, sub_y);
if (sub != NULL) {
return sub;
diff --git a/types/wlr_xdg_shell_v6.c b/types/wlr_xdg_shell_v6.c
index f1258f0f..3bd845d3 100644
--- a/types/wlr_xdg_shell_v6.c
+++ b/types/wlr_xdg_shell_v6.c
@@ -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);
struct wlr_surface *sub = wlr_xdg_surface_v6_surface_at(popup,
- sx - popup_sx + popup->geometry.x,
- sy - popup_sy + popup->geometry.y,
+ sx - popup_sx,
+ sy - popup_sy,
sub_x, sub_y);
if (sub != NULL) {
return sub;