Compare commits
5 Commits
153aaf88bf
...
dcdd69e154
Author | SHA1 | Date | |
---|---|---|---|
|
dcdd69e154 | ||
|
db6093f6ec | ||
|
a9b1de384a | ||
|
43b0c2c3dd | ||
|
f5036b90ef |
12
dmenu.c
12
dmenu.c
@ -553,7 +553,7 @@ run(void)
|
||||
XEvent ev;
|
||||
|
||||
while (!XNextEvent(dpy, &ev)) {
|
||||
if (XFilterEvent(&ev, None))
|
||||
if (XFilterEvent(&ev, win))
|
||||
continue;
|
||||
switch(ev.type) {
|
||||
case DestroyNotify:
|
||||
@ -664,13 +664,15 @@ setup(void)
|
||||
CWOverrideRedirect | CWBackPixel | CWEventMask, &swa);
|
||||
XSetClassHint(dpy, win, &ch);
|
||||
|
||||
/* open input methods */
|
||||
xim = XOpenIM(dpy, NULL, NULL, NULL);
|
||||
|
||||
/* input methods */
|
||||
if ((xim = XOpenIM(dpy, NULL, NULL, NULL)) == NULL)
|
||||
die("XOpenIM failed: could not open input device");
|
||||
|
||||
xic = XCreateIC(xim, XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
|
||||
XNClientWindow, win, XNFocusWindow, win, NULL);
|
||||
|
||||
XMapRaised(dpy, win);
|
||||
XSetInputFocus(dpy, win, RevertToParent, CurrentTime);
|
||||
if (embed) {
|
||||
XSelectInput(dpy, parentwin, FocusChangeMask | SubstructureNotifyMask);
|
||||
if (XQueryTree(dpy, parentwin, &dw, &w, &dws, &du) && dws) {
|
||||
@ -736,8 +738,6 @@ main(int argc, char *argv[])
|
||||
|
||||
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
|
||||
fputs("warning: no locale support\n", stderr);
|
||||
if (!XSetLocaleModifiers(""))
|
||||
fputs("warning: no locale modifiers support\n", stderr);
|
||||
if (!(dpy = XOpenDisplay(NULL)))
|
||||
die("cannot open display");
|
||||
screen = DefaultScreen(dpy);
|
||||
|
0
dmenu_path
Normal file → Executable file
0
dmenu_path
Normal file → Executable file
13
drw.c
13
drw.c
@ -132,19 +132,6 @@ xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern)
|
||||
die("no font specified.");
|
||||
}
|
||||
|
||||
/* Do not allow using color fonts. This is a workaround for a BadLength
|
||||
* error from Xft with color glyphs. Modelled on the Xterm workaround. See
|
||||
* https://bugzilla.redhat.com/show_bug.cgi?id=1498269
|
||||
* https://lists.suckless.org/dev/1701/30932.html
|
||||
* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916349
|
||||
* and lots more all over the internet.
|
||||
*/
|
||||
FcBool iscol;
|
||||
if(FcPatternGetBool(xfont->pattern, FC_COLOR, 0, &iscol) == FcResultMatch && iscol) {
|
||||
XftFontClose(drw->dpy, xfont);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
font = ecalloc(1, sizeof(Fnt));
|
||||
font->xfont = xfont;
|
||||
font->pattern = pattern;
|
||||
|
Loading…
Reference in New Issue
Block a user