aboutsummaryrefslogtreecommitdiff
path: root/rootston/xdg_shell_v6.c
diff options
context:
space:
mode:
Diffstat (limited to 'rootston/xdg_shell_v6.c')
-rw-r--r--rootston/xdg_shell_v6.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/rootston/xdg_shell_v6.c b/rootston/xdg_shell_v6.c
index cb2a9eab..b80ea38d 100644
--- a/rootston/xdg_shell_v6.c
+++ b/rootston/xdg_shell_v6.c
@@ -87,21 +87,20 @@ static void popup_unconstrain(struct roots_xdg_popup_v6 *popup) {
struct wlr_output *output =
wlr_output_layout_output_at(layout, dest_x, dest_y);
-
if (output == NULL) {
return;
}
- int width = 0, height = 0;
- wlr_output_effective_resolution(output, &width, &height);
+ struct wlr_box *output_box =
+ wlr_output_layout_get_box(view->desktop->layout, output);
// the output box expressed in the coordinate system of the toplevel parent
// of the popup
struct wlr_box output_toplevel_sx_box = {
- .x = output->lx - view->box.x,
- .y = output->ly - view->box.y,
- .width = width,
- .height = height
+ .x = output_box->x - view->box.x,
+ .y = output_box->y - view->box.y,
+ .width = output_box->width,
+ .height = output_box->height,
};
wlr_xdg_popup_v6_unconstrain_from_box(popup->wlr_popup, &output_toplevel_sx_box);