]> Dogcows Code - chaz/tint2/commitdiff
added possibility to put tint2 into the windowmanagers dock
authorAndreas Fink <andreas.fink85@googlemail.com>
Thu, 10 Sep 2009 17:19:08 +0000 (17:19 +0000)
committerAndreas Fink <andreas.fink85@googlemail.com>
Thu, 10 Sep 2009 17:19:08 +0000 (17:19 +0000)
src/config.c
src/panel.c
src/panel.h
tintrc01
tintrc02
tintrc03
tintrc04
tintrc05
tintrc06

index 6b79b2430f3ae040eb90326baec29d5f7fb5ffaf..9396dcb3ce2f4205f05f4a7f9295304c9ef02c3a 100644 (file)
@@ -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;
 
index 5275d38c5c557344c05dbf58f9581bbbf39b2554..bc0d1b0cf215b2ef5b7e425f4be9d32d9c3ebc8f 100644 (file)
@@ -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 };
index 9974b27a1ae65ea2243b07d86a9531762c4527fd..698b7446ff5ed264e4c84aad3f3a57c79127a57e 100644 (file)
@@ -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 };
index 9a24bcac884f3e37298694e5d24f68c75517771a..3966e21be1bf20cd177adfa64fd17bb96128bc91 100644 (file)
--- 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
index 660ac5f909b4887db7b3dd4d34d1f92d1e7b08c7..1c195008add236cafc6e07c4b080ce08622eb807 100644 (file)
--- 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
index 587ca50344badf1270f13bfbe2ec6cedb00c93ca..d969f58ad73a47e5e12d0cd197cf44fc43d1f65c 100644 (file)
--- 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
index e4bb2dea72c9a7ffbf28e3a1d3e6a1816838f55f..349470c4b96e3b59ca1c32ae217cb4c939bce9d6 100644 (file)
--- 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
index be54756e7c59c58d8591415605f5d07580aa484e..ccb155c348934e95a48c71a7488d4aa675e380b5 100644 (file)
--- 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
index 696c490c4918425ee1075bfb903c733a101dccb5..562d10b4b8e08b4c737c65f6a2880732177f9db2 100644 (file)
--- 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
This page took 0.032325 seconds and 4 git commands to generate.