mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 12:27:52 +00:00
set conky in dock mode to be withdrawn
Withdrawn windows are those you get from applications supporting the '-w' flag, like e.g. gkrellm or all those sweet WindowMaker dockapps (wmcpu and Co.). In Fluxbox, these windows are drawn into the slit. Most other window managers put them into their "taskbar", AFAIK. This patch makes Conky act exactly the same if the following settings are selected: | own_window yes | own_window_type dock
This commit is contained in:
parent
f5259295cf
commit
92bdce5d1a
@ -8481,7 +8481,9 @@ static void load_config_file(const char *f)
|
||||
|
||||
#ifdef X11
|
||||
CONF2("alignment") {
|
||||
if (value) {
|
||||
if (window.type == TYPE_DOCK)
|
||||
;
|
||||
else if (value) {
|
||||
int a = string_to_alignment(value);
|
||||
|
||||
if (a <= 0) {
|
||||
@ -8954,6 +8956,7 @@ static void load_config_file(const char *f)
|
||||
window.type = TYPE_DESKTOP;
|
||||
} else if (strncmp(value, "dock", 7) == EQUAL) {
|
||||
window.type = TYPE_DOCK;
|
||||
text_alignment = TOP_LEFT;
|
||||
} else if (strncmp(value, "override", 8) == EQUAL) {
|
||||
window.type = TYPE_OVERRIDE;
|
||||
} else {
|
||||
|
@ -252,6 +252,9 @@ void init_window(int own_window, int w, int h, int set_trans, int back_colour,
|
||||
XWMHints wmHint;
|
||||
Atom xa;
|
||||
|
||||
if (window.type == TYPE_DOCK) {
|
||||
window.x = window.y = 0;
|
||||
}
|
||||
/* Parent is root window so WM can take control */
|
||||
window.window = XCreateWindow(display, window.root, window.x,
|
||||
window.y, w, h, 0, CopyFromParent, InputOutput, CopyFromParent,
|
||||
@ -264,7 +267,8 @@ void init_window(int own_window, int w, int h, int set_trans, int back_colour,
|
||||
/* allow decorated windows to be given input focus by WM */
|
||||
wmHint.input =
|
||||
TEST_HINT(window.hints, HINT_UNDECORATED) ? False : True;
|
||||
wmHint.initial_state = NormalState;
|
||||
wmHint.initial_state = ((window.type == TYPE_DOCK) ?
|
||||
WithdrawnState : NormalState);
|
||||
|
||||
XmbSetWMProperties(display, window.window, window.title, NULL, argv,
|
||||
argc, NULL, &wmHint, &classHint);
|
||||
|
Loading…
Reference in New Issue
Block a user