summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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");