aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnselm R Garbe2010-03-31 22:43:49 +0100
committerAnselm R Garbe2010-03-31 22:43:49 +0100
commit052ffae1924a2760baa32f41e01de82e73e0bc5e (patch)
treec9042f2321c8c105d97fd713a0265be5f03bcaea
parenteededaa76fb12c10d6de3cb5fcf1479efd39ad75 (diff)
applied Connor's subwindow patch
-rw-r--r--dmenu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/dmenu.c b/dmenu.c
index 6177906..fd9baaa 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -768,6 +768,9 @@ main(int argc, char *argv[]) {
}
else if(!strcmp(argv[i], "-b"))
topbar = False;
+ else if(!strcmp(argv[i], "-e")) {
+ if(++i < argc) root = atoi(argv[i]);
+ }
else if(!strcmp(argv[i], "-l")) {
vlist = True;
calcoffsets = calcoffsetsv;
@@ -801,7 +804,8 @@ main(int argc, char *argv[]) {
if(!(dpy = XOpenDisplay(NULL)))
eprint("dmenu: cannot open display\n");
screen = DefaultScreen(dpy);
- root = RootWindow(dpy, screen);
+ if(!root)
+ root = RootWindow(dpy, screen);
if(isatty(STDIN_FILENO)) {
readstdin();