[hackers] [dmenu] applied Connor's subwindow patch || Anselm R Garbe

From: <hg_AT_suckless.org>
Date: Wed, 31 Mar 2010 21:43:55 +0000 (UTC)

changeset: 290:a74c87f0dd3d
tag: tip
user: Anselm R Garbe <anselm_AT_garbe.us>
date: Wed Mar 31 22:43:49 2010 +0100
files: dmenu.c
description:
applied Connor's subwindow patch

diff -r d726fd3387ca -r a74c87f0dd3d dmenu.c
--- a/dmenu.c Wed Mar 31 22:37:41 2010 +0100
+++ b/dmenu.c Wed Mar 31 22:43:49 2010 +0100
@@ -768,6 +768,9 @@
                 }
                 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 @@
         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();
Received on Wed Mar 31 2010 - 21:43:55 UTC

This archive was generated by hypermail 2.2.0 : Wed Mar 31 2010 - 21:48:09 UTC