summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStivvo <stivvo01@gmail.com>2020-10-08 21:04:28 +0200
committerStivvo <stivvo01@gmail.com>2020-10-08 21:04:28 +0200
commit172bcfd3ffcbaafb5198b162f8b704b0172fe9a0 (patch)
tree63d8dc22f31056ecb047a54cf0645b10ab4d83f7
parent2b286ffeeda4fcd618c8f6a3c86efb8e96050bd2 (diff)
Set fullscreen simpler
-rw-r--r--dwl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dwl.c b/dwl.c
index 1177fa8..d7cc46f 100644
--- a/dwl.c
+++ b/dwl.c
@@ -708,16 +708,16 @@ void
setfullscreen(Client *c, int fullscreen)
{
c->isfullscreen = fullscreen;
+ c->bw = (1 - fullscreen) * borderpx;
#ifdef XWAYLAND
if (c->type == X11Managed)
- wlr_xwayland_surface_set_fullscreen(c->surface.xwayland, c->isfullscreen);
+ wlr_xwayland_surface_set_fullscreen(c->surface.xwayland, fullscreen);
else
#endif
- wlr_xdg_toplevel_set_fullscreen(c->surface.xdg, c->isfullscreen);
+ wlr_xdg_toplevel_set_fullscreen(c->surface.xdg, fullscreen);
- c->bw = ((int)(!c->isfullscreen)) * borderpx;
- if (c->isfullscreen) {
+ if (fullscreen) {
c->prevx = c->geom.x;
c->prevy = c->geom.y;
c->prevheight = c->geom.height;