all repos — tint2 @ f9d2cc1b733f0d7f39c14015db1bbe5553cdfa45

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

fixed taskbar redrawing when pos/size changed

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

f9d2cc1b733f0d7f39c14015db1bbe5553cdfa45

parent

86cfa077354041ab772f97381201a10aff12e2d3

2 files changed, 17 insertions(+), 0 deletions(-)

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

@@ -113,6 +113,7 @@ // taskbar

panel->g_taskbar.area.size_mode = SIZE_BY_LAYOUT; panel->g_taskbar.area._resize = resize_taskbar; panel->g_taskbar.area._draw_foreground = draw_taskbar; + panel->g_taskbar.area._on_change_layout = on_change_taskbar; panel->g_taskbar.area.redraw = 1; panel->g_taskbar.area.on_screen = 1; if (panel_horizontal) {

@@ -296,6 +297,21 @@

taskbar->text_width = taskbar->area.width - (2 * panel->g_taskbar.area.paddingy) - panel->g_task.text_posx - panel->g_task.area.bg->border.width - panel->g_task.area.paddingx; } return 0; +} + + +void on_change_taskbar (void *obj) +{ + Taskbar *tskbar = obj; + int k; + + // reset Pixmap when position/size changed + for (k=0; k<TASKBAR_STATE_COUNT; ++k) { + if (tskbar->state_pix[k]) XFreePixmap(server.dsp, tskbar->state_pix[k]); + tskbar->state_pix[k] = 0; + } + tskbar->area.pix = 0; + tskbar->area.redraw = 1; }
M src/taskbar/taskbar.hsrc/taskbar/taskbar.h

@@ -52,6 +52,7 @@ GPtrArray* task_get_tasks(Window win);

void task_refresh_tasklist (); int resize_taskbar(void *obj); +void on_change_taskbar (void *obj); void set_taskbar_state(Taskbar *tskbar, int state); // show/hide taskbar according to current desktop