summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2018-09-25 20:30:29 +0200
committertv <tv@krebsco.de>2018-09-25 22:13:54 +0200
commit465dd993c72ae28226e135eb5f15864c349b27b0 (patch)
treeb689420182630e9d4d6a2db2d868da95987f82ce
parentca071639f6775e42e6fc7d394424fe8936734764 (diff)
main: don't try to resize the root windowHEADni/mastermaster
-rw-r--r--main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.c b/main.c
index 482acbe..a12b611 100644
--- a/main.c
+++ b/main.c
@@ -41,7 +41,10 @@ int main(void) {
XNextEvent(display, &result.xev);
if (result.xev.type == (xrr_event_base + RRScreenChangeNotify)) {
- XMoveResizeWindow(display, focus, 0, 0, result.xrrev.width, result.xrrev.height);
+ // cannot resize root window
+ if (focus != 0x1) {
+ XMoveResizeWindow(display, focus, 0, 0, result.xrrev.width, result.xrrev.height);
+ }
}
//printf("derp\n");