aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnselm R Garbe <anselm@garbe.us>2010-03-31 22:43:49 +0100
committerAnselm R Garbe <anselm@garbe.us>2010-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[]) {
768 } 768 }
769 else if(!strcmp(argv[i], "-b")) 769 else if(!strcmp(argv[i], "-b"))
770 topbar = False; 770 topbar = False;
771 else if(!strcmp(argv[i], "-e")) {
772 if(++i < argc) root = atoi(argv[i]);
773 }
771 else if(!strcmp(argv[i], "-l")) { 774 else if(!strcmp(argv[i], "-l")) {
772 vlist = True; 775 vlist = True;
773 calcoffsets = calcoffsetsv; 776 calcoffsets = calcoffsetsv;
@@ -801,7 +804,8 @@ main(int argc, char *argv[]) {
801 if(!(dpy = XOpenDisplay(NULL))) 804 if(!(dpy = XOpenDisplay(NULL)))
802 eprint("dmenu: cannot open display\n"); 805 eprint("dmenu: cannot open display\n");
803 screen = DefaultScreen(dpy); 806 screen = DefaultScreen(dpy);
804 root = RootWindow(dpy, screen); 807 if(!root)
808 root = RootWindow(dpy, screen);
805 809
806 if(isatty(STDIN_FILENO)) { 810 if(isatty(STDIN_FILENO)) {
807 readstdin(); 811 readstdin();