mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-23 19:39:06 +00:00
wm_class patch
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@356 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
b73cb2c996
commit
cf4392a51d
3
AUTHORS
3
AUTHORS
@ -31,6 +31,9 @@ David McCabe
|
||||
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
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
# $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)
|
||||
|
@ -239,6 +239,7 @@ static int set_transparent = 0;
|
||||
#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
|
||||
@ -4282,6 +4283,7 @@ static void set_default_configurations(void)
|
||||
maximum_width = 0;
|
||||
#ifdef OWN_WINDOW
|
||||
own_window = 0;
|
||||
strcpy(wm_class_name, "conky");
|
||||
#endif
|
||||
stippled_borders = 0;
|
||||
border_margin = 3;
|
||||
@ -4640,6 +4642,10 @@ else if (strcasecmp(name, a) == 0 || strcasecmp(name, b) == 0)
|
||||
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);
|
||||
}
|
||||
@ -4945,6 +4951,7 @@ int main(int argc, char **argv)
|
||||
#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);
|
||||
|
@ -255,7 +255,7 @@ extern struct conky_window window;
|
||||
|
||||
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
|
||||
|
@ -171,7 +171,7 @@ inline void set_transparent_background(Window win)
|
||||
}
|
||||
|
||||
#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
|
||||
@ -207,8 +207,8 @@ void init_window(int own_window, int w, int h, int l, int set_trans, int back_co
|
||||
|
||||
|
||||
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user