aboutsummarylogtreecommitdiffstats
path: root/x.c
diff options
context:
space:
mode:
authorDevin J. Pohly2017-10-10 10:30:23 -0500
committerDevin J. Pohly2018-02-25 21:53:24 -0600
commitf22603a12fe1d0ec9f5ee635d98d06291ae5ba25 (patch)
treebb254df5a888a9e4f4ba75186322729f34065752 /x.c
parentfe1cbc357e05ba8d1ff9ec6b0227dbb3eb7108fd (diff)
downloadaur-f22603a12fe1d0ec9f5ee635d98d06291ae5ba25.tar.gz
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 <djpohly@gmail.com>
Diffstat (limited to 'x.c')
-rw-r--r--x.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/x.c b/x.c
index c484dfcf8a5c..df2a88c6e53c 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();