git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit54e9816ca2b3cdacfc40c494773ecbcf64e8c9bf
parent4cd3b97840
authortiosgz <[email protected]>
date2022-07-18 18:15
XdgPopup: fix unconstrain rect with layer surfaces

The used coordinates store where the layer is on the output, but we
need the opposite.

 river/XdgPopup.zig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/river/XdgPopup.zig b/river/XdgPopup.zig
index 6fb1cd6..8ac250f 100644
--- a/river/XdgPopup.zig
+++ b/river/XdgPopup.zig
@@ -69,8 +69,8 @@ pub fn create(wlr_xdg_popup: *wlr.XdgPopup, parent: Parent) void {
             const output_dimensions = layer_surface.output.getEffectiveResolution();
             // The output box relative to the parent of the xdg_popup
             var box = wlr.Box{
-                .x = layer_surface.box.x,
-                .y = layer_surface.box.y,
+                .x = -layer_surface.box.x,
+                .y = -layer_surface.box.y,
                 .width = @intCast(c_int, output_dimensions.width),
                 .height = @intCast(c_int, output_dimensions.height),
             };