XdgPopup: fix unconstrainFromBox coordinates
This commit is contained in:
parent
a672738603
commit
e7442e53c1
1 changed files with 7 additions and 3 deletions
|
@ -47,9 +47,13 @@ pub fn init(self: *Self, output: *Output, parent_box: *const Box, wlr_xdg_popup:
|
||||||
};
|
};
|
||||||
|
|
||||||
// The output box relative to the parent of the popup
|
// The output box relative to the parent of the popup
|
||||||
var box = output.root.output_layout.getBox(output.wlr_output).?.*;
|
const output_dimensions = output.getEffectiveResolution();
|
||||||
box.x -= parent_box.x;
|
var box = wlr.Box{
|
||||||
box.y -= parent_box.y;
|
.x = -parent_box.x,
|
||||||
|
.y = -parent_box.y,
|
||||||
|
.width = @intCast(c_int, output_dimensions.width),
|
||||||
|
.height = @intCast(c_int, output_dimensions.height),
|
||||||
|
};
|
||||||
wlr_xdg_popup.unconstrainFromBox(&box);
|
wlr_xdg_popup.unconstrainFromBox(&box);
|
||||||
|
|
||||||
wlr_xdg_popup.base.events.destroy.add(&self.destroy);
|
wlr_xdg_popup.base.events.destroy.add(&self.destroy);
|
||||||
|
|
Loading…
Reference in a new issue