no need for this func
This commit is contained in:
parent
b3765ba7f0
commit
7358db978b
23
speedwm.c
23
speedwm.c
|
@ -695,7 +695,6 @@ static void window_unmap(Display *dpy, Window win, Window root, int iconify);
|
|||
|
||||
static Client *wintoclient(Window w);
|
||||
static Monitor *wintomon(Window w);
|
||||
static int wmclasscontains(Window win, const char *class, const char *name);
|
||||
|
||||
/* X11 error */
|
||||
static int xerror(Display *dpy, XErrorEvent *ee);
|
||||
|
@ -6207,28 +6206,6 @@ wintomon(Window w)
|
|||
return selmon;
|
||||
}
|
||||
|
||||
int
|
||||
wmclasscontains(Window win, const char *class, const char *name)
|
||||
{
|
||||
XClassHint ch = { NULL, NULL };
|
||||
int res = 1;
|
||||
|
||||
if (XGetClassHint(dpy, win, &ch)) {
|
||||
if (ch.res_name && strstr(ch.res_name, name) == NULL)
|
||||
res = 0;
|
||||
if (ch.res_class && strstr(ch.res_class, class) == NULL)
|
||||
res = 0;
|
||||
} else
|
||||
res = 0;
|
||||
|
||||
if (ch.res_class)
|
||||
XFree(ch.res_class);
|
||||
if (ch.res_name)
|
||||
XFree(ch.res_name);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/* There's no way to check accesses to destroyed windows, thus those cases are
|
||||
* ignored (especially on UnmapNotify's). Other types of errors call Xlibs
|
||||
* default error handler, which may call exit. */
|
||||
|
|
Loading…
Reference in a new issue