fix class name from changing on resize
This commit is contained in:
parent
31e0ba8cb2
commit
cf67a6fd4e
|
@ -2,3 +2,4 @@ st
|
||||||
*.o
|
*.o
|
||||||
*.orig
|
*.orig
|
||||||
*.rej
|
*.rej
|
||||||
|
.ccls-cache
|
||||||
|
|
11
x.c
11
x.c
|
@ -887,9 +887,18 @@ void
|
||||||
xhints(void)
|
xhints(void)
|
||||||
{
|
{
|
||||||
XClassHint class = {opt_name ? opt_name : "st",
|
XClassHint class = {opt_name ? opt_name : "st",
|
||||||
opt_class ? opt_class : "St"};
|
opt_class ? opt_class : "St-class"};
|
||||||
XWMHints wm = {.flags = InputHint, .input = 1};
|
XWMHints wm = {.flags = InputHint, .input = 1};
|
||||||
XSizeHints *sizeh;
|
XSizeHints *sizeh;
|
||||||
|
XClassHint current_class;
|
||||||
|
Status status;
|
||||||
|
|
||||||
|
status = XGetClassHint(xw.dpy, xw.win, ¤t_class);
|
||||||
|
if (status == True) {
|
||||||
|
if (strcmp(current_class.res_class, class.res_class) != 0) {
|
||||||
|
class.res_class = current_class.res_class; /* current_class.res_class; */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sizeh = XAllocSizeHints();
|
sizeh = XAllocSizeHints();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue