diff --git a/src/conky.c b/src/conky.c index d4b48b5b..50b96b22 100644 --- a/src/conky.c +++ b/src/conky.c @@ -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 { diff --git a/src/x11.c b/src/x11.c index 60e09de9..21fc5de5 100644 --- a/src/x11.c +++ b/src/x11.c @@ -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);