aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStivvo <stivvo01@gmail.com>2020-09-04 17:09:12 +0200
committerStivvo <stivvo01@gmail.com>2020-09-04 17:09:42 +0200
commit4b1ab7804bdfd0f8351e70fcbd5778bb5d00c309 (patch)
tree83722285ed4bfcc29a04b7029ea313576f4a9346
parent06982a56b554947e651f37b4ff05b2010935a270 (diff)
No borders on fullscreen windows
Some code has been borrowed from the smartBorders patch
-rw-r--r--dwl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/dwl.c b/dwl.c
index 73d31ab..e516316 100644
--- a/dwl.c
+++ b/dwl.c
@@ -672,7 +672,9 @@ destroyxdeco(struct wl_listener *listener, void *data)
void
fullscreenotify(struct wl_listener *listener, void *data) {
Client *c = wl_container_of(listener, c, fullscreen);
- wlr_xdg_toplevel_set_fullscreen(c->surface.xdg, !c->surface.xdg->toplevel->current.fullscreen);
+ wlr_xdg_toplevel_set_fullscreen(
+ c->surface.xdg, !c->surface.xdg->toplevel->current.fullscreen);
+ c->bw = (int)c->surface.xdg->toplevel->current.fullscreen * borderpx;
}
Monitor *
@@ -1193,6 +1195,10 @@ renderclients(Monitor *m, struct timespec *now)
ox = c->geom.x, oy = c->geom.y;
wlr_output_layout_output_coords(output_layout, m->wlr_output,
&ox, &oy);
+
+ if (c->bw == 0)
+ goto render;
+
w = surface->current.width;
h = surface->current.height;
borders = (struct wlr_box[4]) {
@@ -1210,6 +1216,7 @@ renderclients(Monitor *m, struct timespec *now)
m->wlr_output->transform_matrix);
}
+ render:
/* This calls our render function for each surface among the
* xdg_surface's toplevel and popups. */
rdata.output = m->wlr_output;