From 052ffae1924a2760baa32f41e01de82e73e0bc5e Mon Sep 17 00:00:00 2001 From: Anselm R Garbe Date: Wed, 31 Mar 2010 22:43:49 +0100 Subject: applied Connor's subwindow patch --- dmenu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'dmenu.c') 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(); -- cgit v1.2.3-13-gbd6f