From 3e44ee5569a81ba6f06e1ecd19bf0ceb1e97f18d Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Tue, 10 Oct 2017 10:30:23 -0500 Subject: Call xsetenv() in main process instead of child This makes xsetenv internal to x.c, and allows iso14755's external command to use $WINDOWID instead of having to snprintf it again. (The same benefit will apply to the externalpipe patch.) The xwinid function is no longer needed. Signed-off-by: Devin J. Pohly --- x.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'x.c') diff --git a/x.c b/x.c index c484dfc..df2a88c 100644 --- a/x.c +++ b/x.c @@ -89,6 +89,7 @@ static void xdrawcursor(void); static int xgeommasktogravity(int); static int xloadfont(Font *, FcPattern *); static void xunloadfont(Font *); +static void xsetenv(void); static void expose(XEvent *); static void visibility(XEvent *); @@ -1487,12 +1488,6 @@ xbell(int vol) XkbBell(xw.dpy, xw.win, vol, (Atom)NULL); } -unsigned long -xwinid(void) -{ - return xw.win; -} - void focus(XEvent *ev) { @@ -1765,6 +1760,7 @@ run: XSetLocaleModifiers(""); tnew(MAX(cols, 1), MAX(rows, 1)); xinit(); + xsetenv(); selinit(); run(); -- cgit v1.2.3-54-g00ecf