diff options
-rw-r--r-- | dmenu.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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(); |