aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winprefs.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winprefs.c')
-rw-r--r--xorg-server/hw/xwin/winprefs.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/xorg-server/hw/xwin/winprefs.c b/xorg-server/hw/xwin/winprefs.c
index 6fff8a10d..3d21066f4 100644
--- a/xorg-server/hw/xwin/winprefs.c
+++ b/xorg-server/hw/xwin/winprefs.c
@@ -771,3 +771,24 @@ winOverrideStyle(char *res_name, char *res_class, char *wmName)
/* Didn't find the style, fail gracefully */
return STYLE_NONE;
}
+
+/*
+ * Check for a match of the window class to one specified in the
+ * TASKBAR{} section in the prefs file
+ */
+unsigned long
+winOverrideTaskbar(char *res_name, char *res_class, char *wmName)
+{
+ int i;
+
+ for (i=0; i<pref.taskbarItems; i++) {
+ if ((res_name && !strcmp(pref.taskbar[i].match, res_name)) ||
+ (res_class && !strcmp(pref.taskbar[i].match, res_class)) ||
+ (wmName && strstr(wmName, pref.taskbar[i].match))) {
+ if (pref.taskbar[i].type) return pref.taskbar[i].type;
+ }
+ }
+
+ /* Didn't find a taskbar type */
+ return TASKBAR_NONE;
+} \ No newline at end of file