diff options
-rw-r--r-- | move/xwait.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/move/xwait.c b/move/xwait.c index a199b790e..07a693514 100644 --- a/move/xwait.c +++ b/move/xwait.c @@ -1,7 +1,8 @@ #include <stdlib.h> #include <X11/Xlib.h> -int main() { +int main(int argc, char **argv) { + int permanent = argc > 1 && !strcmp(argv[1], "-permanent"); Display *display = XOpenDisplay(NULL); if (display) { @@ -10,7 +11,7 @@ int main() { XSelectInput(display, DefaultRootWindow(display), SubstructureNotifyMask); do { XNextEvent(display, &event); - } while (event.type != CreateNotify); + } while (event.type != CreateNotify || permanent); XCloseDisplay(display); } |