Daniel Thiele <dthiele at gmx dot net>
APM support for FreeBSD
+Denis <d-st at users dot sourceforge dot net>
+ WM_CLASS patch
+
Dennis Frommknecht
NVCtrl, temperature monitoring for nvdia-based graphics cards
# $Id$
+2005-10-28
+ * Added WM_CLASS patch from sf.net patch 1340825
+
2005-10-21
* acpi segfault should be fixed (sf.net bug 1330893)
* SIGUSR1 bug fixed? (sf.net bug 1330914)
#ifdef OWN_WINDOW
static int own_window = 0;
static int background_colour = 0;
+static char wm_class_name[256];
/* fixed size/pos is set if wm/user changes them */
static int fixed_size = 0, fixed_pos = 0;
#endif
maximum_width = 0;
#ifdef OWN_WINDOW
own_window = 0;
+ strcpy(wm_class_name, "conky");
#endif
stippled_borders = 0;
border_margin = 3;
CONF("own_window") {
own_window = string_to_bool(value);
}
+ CONF("wm_class_name") {
+ strncpy(wm_class_name, value, sizeof(wm_class_name)-1);
+ wm_class_name[sizeof(wm_class_name)-1] = 0;
+ }
CONF("own_window_transparent") {
set_transparent = string_to_bool(value);
}
#if defined OWN_WINDOW
init_window
(own_window,
+ wm_class_name,
text_width + border_margin * 2 + 1,
text_height + border_margin * 2 + 1,
on_bottom, fixed_pos, set_transparent, background_colour);
void init_X11();
#if defined OWN_WINDOW
-void init_window(int use_own_window, int width, int height, int on_bottom, int fixed_pos, int set_trans, int back_colour);
+void init_window(int use_own_window, char* wm_class_name, int width, int height, int on_bottom, int fixed_pos, int set_trans, int back_colour);
#else
void init_window(int use_own_window, int width, int height, int on_bottom, int set_trans, int back_colour);
#endif
}
#if defined OWN_WINDOW
-void init_window(int own_window, int w, int h, int l, int fixed_pos, int set_trans, int back_colour)
+void init_window(int own_window, char* wm_class_name, int w, int h, int l, int fixed_pos, int set_trans, int back_colour)
#else
void init_window(int own_window, int w, int h, int l, int set_trans, int back_colour)
#endif
- class_hints.res_class = "conky";
- class_hints.res_name = "conky";
+ class_hints.res_class = wm_class_name;
+ class_hints.res_name = wm_class_name;
XSetClassHint(display, window.window,
&class_hints);