added possibility to put tint2 into the windowmanagers dock git-svn-id: http://tint2.googlecode.com/svn/trunk@172 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
Andreas.Fink85 Andreas.Fink85@121b4492-b84c-0410-8b4c-0d4edfb3f3cc
9 files changed,
20 insertions(+),
3 deletions(-)
M
src/config.c
→
src/config.c
@@ -338,6 +338,8 @@ memcpy(&panel_config->area.pix.border, &a->pix.border, sizeof(Border));
} else if (strcmp (key, "wm_menu") == 0) wm_menu = atoi (value); + else if (strcmp (key, "panel_dock") == 0) + panel_dock = atoi (value); else if (strcmp (key, "urgent_nb_of_blink") == 0) max_tick_urgent = (atoi (value) * 2) + 1;
M
src/panel.c
→
src/panel.c
@@ -43,6 +43,7 @@ int mouse_tilt_right;
int panel_mode; int wm_menu; +int panel_dock=0; // default not in the dock int panel_position; int panel_horizontal; int panel_refresh;@@ -369,9 +370,16 @@ XChangeProperty (server.dsp, p->main_win, XA_WM_NORMAL_HINTS, XA_WM_SIZE_HINTS, 32, PropModeReplace, (unsigned char *) &size_hints, sizeof (XSizeHints) / 4);
// Unfocusable XWMHints wmhints; - wmhints.flags = InputHint; - wmhints.input = False; - XChangeProperty (server.dsp, p->main_win, XA_WM_HINTS, XA_WM_HINTS, 32, PropModeReplace, (unsigned char *) &wmhints, sizeof (XWMHints) / 4); + if (panel_dock) { + wmhints.icon_window = wmhints.window_group = p->main_win; + wmhints.flags = StateHint | IconWindowHint; + wmhints.initial_state = WithdrawnState; + } + else { + wmhints.flags = InputHint; + wmhints.input = False; + } + XSetWMHints(server.dsp, p->main_win, &wmhints); // Undecorated long prop[5] = { 2, 0, 0, 0, 0 };
M
src/panel.h
→
src/panel.h
@@ -39,6 +39,7 @@ //panel mode
enum { SINGLE_DESKTOP=0, MULTI_DESKTOP }; extern int panel_mode; extern int wm_menu; +extern int panel_dock; //panel position enum { LEFT=0x01, RIGHT=0x02, CENTER=0X04, TOP=0X08, BOTTOM=0x10 };