look like autohide need minimal height
git-svn-id: http://tint2.googlecode.com/svn/trunk@432 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
@@ -590,8 +590,13 @@ void add_entry (char *key, char *value)
|
|||||||
else
|
else
|
||||||
panel_strut_policy = STRUT_MINIMUM;
|
panel_strut_policy = STRUT_MINIMUM;
|
||||||
}
|
}
|
||||||
else if (strcmp(key, "autohide_height") == 0)
|
else if (strcmp(key, "autohide_height") == 0) {
|
||||||
panel_autohide_height = atoi(value);
|
panel_autohide_height = atoi(value);
|
||||||
|
if (panel_autohide_height == 0) {
|
||||||
|
// autohide need height > 0
|
||||||
|
panel_autohide_height = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
fprintf(stderr, "tint2 : invalid option \"%s\",\n upgrade tint2 or correct your config file\n", key);
|
fprintf(stderr, "tint2 : invalid option \"%s\",\n upgrade tint2 or correct your config file\n", key);
|
||||||
|
|||||||
@@ -86,10 +86,12 @@ void default_panel()
|
|||||||
task_active = 0;
|
task_active = 0;
|
||||||
task_drag = 0;
|
task_drag = 0;
|
||||||
task_dragged = 0;
|
task_dragged = 0;
|
||||||
|
panel_horizontal = 1;
|
||||||
|
panel_position = CENTER;
|
||||||
panel_autohide = 0;
|
panel_autohide = 0;
|
||||||
panel_autohide_show_timeout = 0;
|
panel_autohide_show_timeout = 0;
|
||||||
panel_autohide_hide_timeout = 0;
|
panel_autohide_hide_timeout = 0;
|
||||||
panel_autohide_height; // for vertical panels this is of course the width
|
panel_autohide_height = 5; // for vertical panels this is of course the width
|
||||||
panel_strut_policy = STRUT_MINIMUM;
|
panel_strut_policy = STRUT_MINIMUM;
|
||||||
panel_dock = 0; // default not in the dock
|
panel_dock = 0; // default not in the dock
|
||||||
panel_layer = BOTTOM_LAYER; // default is bottom layer
|
panel_layer = BOTTOM_LAYER; // default is bottom layer
|
||||||
@@ -784,6 +786,7 @@ void autohide_hide(void* p)
|
|||||||
|
|
||||||
XUnmapSubwindows(server.dsp, panel->main_win); // systray windows
|
XUnmapSubwindows(server.dsp, panel->main_win); // systray windows
|
||||||
int diff = (panel_horizontal ? panel->area.height : panel->area.width) - panel_autohide_height;
|
int diff = (panel_horizontal ? panel->area.height : panel->area.width) - panel_autohide_height;
|
||||||
|
//printf("autohide_hide : diff %d, w %d, h %d\n", diff, panel->hidden_width, panel->hidden_height);
|
||||||
if (panel_horizontal) {
|
if (panel_horizontal) {
|
||||||
if (panel_position & TOP)
|
if (panel_position & TOP)
|
||||||
XResizeWindow(server.dsp, panel->main_win, panel->hidden_width, panel->hidden_height);
|
XResizeWindow(server.dsp, panel->main_win, panel->hidden_width, panel->hidden_height);
|
||||||
|
|||||||
Reference in New Issue
Block a user