From 7358db978b1ae2addb6d9f52f45e1570002b72c7 Mon Sep 17 00:00:00 2001 From: speedie Date: Sun, 4 Dec 2022 22:29:21 +0100 Subject: [PATCH] no need for this func --- speedwm.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/speedwm.c b/speedwm.c index 8fc866a..39a2ca7 100644 --- a/speedwm.c +++ b/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. */