From 3082da0f5c093b3318f202c05a30045425436124 Mon Sep 17 00:00:00 2001 From: "Andreas.Fink85" Date: Thu, 10 Sep 2009 17:19:08 +0000 Subject: [PATCH] added possibility to put tint2 into the windowmanagers dock git-svn-id: http://tint2.googlecode.com/svn/trunk@172 121b4492-b84c-0410-8b4c-0d4edfb3f3cc --- src/config.c | 2 ++ src/panel.c | 14 +++++++++++--- src/panel.h | 1 + tintrc01 | 1 + tintrc02 | 1 + tintrc03 | 1 + tintrc04 | 1 + tintrc05 | 1 + tintrc06 | 1 + 9 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/config.c b/src/config.c index 6b79b24..9396dcb 100644 --- a/src/config.c +++ b/src/config.c @@ -338,6 +338,8 @@ void add_entry (char *key, char *value) } 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; diff --git a/src/panel.c b/src/panel.c index 5275d38..bc0d1b0 100644 --- a/src/panel.c +++ b/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 @@ void set_panel_properties(Panel *p) // 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 }; diff --git a/src/panel.h b/src/panel.h index 9974b27..698b744 100644 --- a/src/panel.h +++ b/src/panel.h @@ -39,6 +39,7 @@ extern int mouse_tilt_right; 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 }; diff --git a/tintrc01 b/tintrc01 index 9a24bca..3966e21 100644 --- a/tintrc01 +++ b/tintrc01 @@ -32,6 +32,7 @@ panel_padding = 7 0 font_shadow = 0 panel_background_id = 1 wm_menu = 0 +panel_dock = 0 #--------------------------------------------- # TASKBAR diff --git a/tintrc02 b/tintrc02 index 660ac5f..1c19500 100644 --- a/tintrc02 +++ b/tintrc02 @@ -31,6 +31,7 @@ panel_padding = 7 3 7 font_shadow = 0 panel_background_id = 1 wm_menu = 0 +panel_dock = 0 #--------------------------------------------- # TASKBAR diff --git a/tintrc03 b/tintrc03 index 587ca50..d969f58 100644 --- a/tintrc03 +++ b/tintrc03 @@ -26,6 +26,7 @@ panel_padding = 0 2 5 font_shadow = 0 panel_background_id = 0 wm_menu = 0 +panel_dock = 0 #--------------------------------------------- # TASKBAR diff --git a/tintrc04 b/tintrc04 index e4bb2de..349470c 100644 --- a/tintrc04 +++ b/tintrc04 @@ -26,6 +26,7 @@ panel_padding = 0 0 0 font_shadow = 0 panel_background_id = 1 wm_menu = 0 +panel_dock = 0 #--------------------------------------------- # TASKBAR diff --git a/tintrc05 b/tintrc05 index be54756..ccb155c 100644 --- a/tintrc05 +++ b/tintrc05 @@ -32,6 +32,7 @@ panel_padding = 10 3 10 font_shadow = 0 panel_background_id = 0 wm_menu = 1 +panel_dock = 0 #--------------------------------------------- # TASKBAR diff --git a/tintrc06 b/tintrc06 index 696c490..562d10b 100644 --- a/tintrc06 +++ b/tintrc06 @@ -38,6 +38,7 @@ panel_padding = 7 3 5 font_shadow = 0 panel_background_id = 1 wm_menu = 1 +panel_dock = 0 #--------------------------------------------- # TASKBAR