tsetfullscreen: don't process the property twice - dwm - [fork] customized buil… | |
git clone git://src.adamsgaard.dk/dwm | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit dce4fb373757727374d00c857ec0dfd225bbeafd | |
parent 646b351cc79845f4cc77415dfff474b9ae0053d9 | |
Author: Quentin Rameau <[email protected]> | |
Date: Sat, 7 Nov 2015 14:09:08 +0100 | |
setfullscreen: don't process the property twice | |
Some clients try to set _NET_WM_STATE_FULLSCREEN even when the window is | |
already in fullscreen. | |
For example, c->oldstate was set two times in a raw and window would | |
tthen always be floating. | |
We must check that it's not the case before processing it. | |
(original patch modified with suggestion from Markus Teich | |
<[email protected]>) | |
Diffstat: | |
M dwm.c | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/dwm.c b/dwm.c | |
t@@ -1441,7 +1441,7 @@ setfocus(Client *c) { | |
void | |
setfullscreen(Client *c, Bool fullscreen) { | |
- if(fullscreen) { | |
+ if(fullscreen && !c->isfullscreen) { | |
XChangeProperty(dpy, c->win, netatom[NetWMState], XA_ATOM, 32, | |
PropModeReplace, (unsigned char*)&netatom[NetW… | |
c->isfullscreen = True; | |
t@@ -1452,7 +1452,7 @@ setfullscreen(Client *c, Bool fullscreen) { | |
resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh… | |
XRaiseWindow(dpy, c->win); | |
} | |
- else { | |
+ else if(!fullscreen && c->isfullscreen){ | |
XChangeProperty(dpy, c->win, netatom[NetWMState], XA_ATOM, 32, | |
PropModeReplace, (unsigned char*)0, 0); | |
c->isfullscreen = False; |