Adding xresources patch

This commit is contained in:
bakkeby 2019-09-16 14:21:09 +02:00
parent 7615c2f0aa
commit 4bd0ed3327
7 changed files with 131 additions and 0 deletions

11
x.c
View file

@ -847,8 +847,13 @@ xclear(int x1, int y1, int x2, int y2)
void
xhints(void)
{
#if XRESOURCES_PATCH
XClassHint class = {opt_name ? opt_name : "st",
opt_class ? opt_class : "St"};
#else
XClassHint class = {opt_name ? opt_name : termname,
opt_class ? opt_class : termname};
#endif // XRESOURCES_PATCH
XWMHints wm = {.flags = InputHint, .input = 1};
XSizeHints *sizeh;
@ -2157,6 +2162,12 @@ run:
setlocale(LC_CTYPE, "");
XSetLocaleModifiers("");
#if XRESOURCES_PATCH
if (!(xw.dpy = XOpenDisplay(NULL)))
die("Can't open display\n");
config_init();
#endif // XRESOURCES_PATCH
cols = MAX(cols, 1);
rows = MAX(rows, 1);
tnew(cols, rows);