all repos — tint2 @ b42e067629874abf07ff3fe0ccafd13b0cf9cf0b

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

fixed issue 176

git-svn-id: http://tint2.googlecode.com/svn/trunk@285 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
thilor77 thilor77@121b4492-b84c-0410-8b4c-0d4edfb3f3cc
commit

b42e067629874abf07ff3fe0ccafd13b0cf9cf0b

parent

7bf93151f969b7563bcb31b5afa470e9122b0ddd

4 files changed, 16 insertions(+), 11 deletions(-)

jump to
M src/panel.csrc/panel.c

@@ -58,7 +58,7 @@

// panel's initial config Panel panel_config; // panels (one panel per monitor) -Panel *panel1 = NULL; +Panel *panel1 = 0; int nb_panel = 0; Imlib_Image default_icon = NULL;

@@ -113,11 +113,12 @@ memcpy(&new_panel[i], &panel_config, sizeof(Panel));

new_panel[i].main_win = old_win; } - fprintf(stderr, "tint2 : nb monitor %d, nb desktop %d\n", nb_panel, server.nb_desktop); + fprintf(stderr, "tint2 : nb monitor %d, nb monitor used %d, nb desktop %d\n", server.nb_monitor, nb_panel, server.nb_desktop); for (i=0 ; i < nb_panel ; i++) { p = &new_panel[i]; - p->monitor = i; + if (panel_config.monitor < 0) + p->monitor = i; p->area.parent = p; p->area.panel = p; p->area.on_screen = 1;

@@ -263,8 +264,11 @@ p->main_win = 0;

} } - if (panel1) free(panel1); - panel1 = 0; + if (panel1) { + free(panel1); + panel1 = 0; + nb_panel = 0; + } if (panel_config.g_task.font_desc) { pango_font_description_free(panel_config.g_task.font_desc);
M src/server.csrc/server.c

@@ -266,8 +266,7 @@ i++;

} next: server.nb_monitor = i; - server.monitor = realloc(server.monitor, server.nb_monitor * sizeof(Monitor)); - //printf(" nbmonitor %d\n", server.nb_monitor); + server.monitor = realloc(server.monitor, server.nb_monitor * sizeof(Monitor)); qsort(server.monitor, server.nb_monitor, sizeof(Monitor), compareMonitorPos); } }
M src/tint.csrc/tint.c

@@ -739,9 +739,8 @@ case MotionNotify: {

if (!g_tooltip.enabled) break; Panel* panel = get_panel(e.xmotion.window); Area* area = click_area(panel, e.xmotion.x, e.xmotion.y); - if (area->_get_tooltip_text) { + if (area->_get_tooltip_text) tooltip_trigger_show(area, panel, e.xmotion.x_root, e.xmotion.y_root); - } else tooltip_trigger_hide(); break;
M src/tooltip/tooltip.csrc/tooltip/tooltip.c

@@ -102,6 +102,7 @@ stop_timeouts();

} else if (!g_tooltip.mapped) { start_show_timeout(); + //printf("!g_tooltip.mapped %d %d\n", x, y); } }

@@ -272,10 +273,12 @@ void start_show_timeout()

{ reset_timer(g_tooltip.hide_timer_id, 0, 0, 0, 0); struct timespec t = g_tooltip.show_timeout; - if (t.tv_sec == 0 && t.tv_nsec == 0) + if (t.tv_sec == 0 && t.tv_nsec == 0) { tooltip_show(); - else + } + else { reset_timer(g_tooltip.show_timer_id, t.tv_sec, t.tv_nsec, 0, 0); + } }