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

commit8cec39ff88a31525a9a67d285860a430ef034230
parenta88dfe5865
authorIsaac Freund <[email protected]>
date2020-03-28 20:27
Set xdg toplevels to tiled

This stops firefox from adding shadows around its window

 src/view.zig | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/view.zig b/src/view.zig
index e8d882d..62f5b60 100644
--- a/src/view.zig
+++ b/src/view.zig
@@ -38,6 +38,11 @@ pub const View = struct {
         self.root = root;
         self.wlr_xdg_surface = wlr_xdg_surface;
 
+        // Inform the xdg toplevel that it is tiled.
+        // For example this prevents firefox from drawing shadows around itself
+        _ = c.wlr_xdg_toplevel_set_tiled(self.wlr_xdg_surface, c.WLR_EDGE_LEFT |
+            c.WLR_EDGE_RIGHT | c.WLR_EDGE_TOP | c.WLR_EDGE_BOTTOM);
+
         self.mapped = false;
         self.current_state = ViewState{
             .x = 0,