all repos — tint2 @ 418119a1ab3b345e24879757d2813cc699321a8b

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

Refactor a bit the last change
o9000 mrovi9000@gmail.com
commit

418119a1ab3b345e24879757d2813cc699321a8b

parent

1ecfdf52892197deb8e413504aeaa142cd683621

1 files changed, 7 insertions(+), 6 deletions(-)

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

@@ -694,12 +694,6 @@

void panel_clear_background(void *obj) { Panel *p = obj; - int xoff = 0, yoff = 0; - if (panel_horizontal && panel_position & BOTTOM) - yoff = p->area.height - p->hidden_height; - else if (!panel_horizontal && panel_position & RIGHT) - xoff = p->area.width - p->hidden_width; - clear_pixmap(p->area.pix, 0, 0, p->area.width, p->area.height); if (!server.real_transparency) { get_root_pixmap();

@@ -707,10 +701,17 @@ // copy background (server.root_pmap) in panel.area.pix

Window dummy; int x, y; XTranslateCoordinates(server.display, p->main_win, server.root_win, 0, 0, &x, &y, &dummy); + if (panel_autohide && p->is_hidden) { + int xoff = 0, yoff = 0; + if (panel_horizontal && panel_position & BOTTOM) + yoff = p->area.height - p->hidden_height; + else if (!panel_horizontal && panel_position & RIGHT) + xoff = p->area.width - p->hidden_width; x -= xoff; y -= yoff; } + XSetTSOrigin(server.display, server.gc, -x, -y); XFillRectangle(server.display, p->area.pix, server.gc, 0, 0, p->area.width, p->area.height); }