diff options
author | Anselm R Garbe <anselm@garbe.us> | 2010-03-31 22:43:49 +0100 |
---|---|---|
committer | Anselm R Garbe <anselm@garbe.us> | 2010-03-31 22:43:49 +0100 |
commit | 052ffae1924a2760baa32f41e01de82e73e0bc5e (patch) | |
tree | c9042f2321c8c105d97fd713a0265be5f03bcaea /dmenu.c | |
parent | eededaa76fb12c10d6de3cb5fcf1479efd39ad75 (diff) | |
download | dmenu-052ffae1924a2760baa32f41e01de82e73e0bc5e.tar.gz dmenu-052ffae1924a2760baa32f41e01de82e73e0bc5e.tar.bz2 dmenu-052ffae1924a2760baa32f41e01de82e73e0bc5e.zip |
applied Connor's subwindow patch
Diffstat (limited to 'dmenu.c')
-rw-r--r-- | dmenu.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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(); |