X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fpanel.c;h=eb839021d5740c1b04576ca6159ca98384e7cbeb;hb=462228f2e82c6e5f61baeb49b6358273728baa90;hp=9711ebc01497986bce7ced723808be6b254c1468;hpb=cfd8016c95b06037d3a68448f31126b662a64143;p=chaz%2Ftint2 diff --git a/src/panel.c b/src/panel.c index 9711ebc..eb83902 100644 --- a/src/panel.c +++ b/src/panel.c @@ -551,6 +551,12 @@ void set_panel_background(Panel *p) if (p->area.pix) XFreePixmap (server.dsp, p->area.pix); p->area.pix = XCreatePixmap (server.dsp, server.root_win, p->area.width, p->area.height, server.depth); + 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; + if (real_transparency) { clear_pixmap(p->area.pix, 0, 0, p->area.width, p->area.height); } @@ -560,7 +566,11 @@ void set_panel_background(Panel *p) Window dummy; int x, y; XTranslateCoordinates(server.dsp, p->main_win, server.root_win, 0, 0, &x, &y, &dummy); - XSetTSOrigin(server.dsp, server.gc, -x, -y) ; + if (panel_autohide && p->is_hidden) { + x -= xoff; + y -= yoff; + } + XSetTSOrigin(server.dsp, server.gc, -x, -y); XFillRectangle(server.dsp, p->area.pix, server.gc, 0, 0, p->area.width, p->area.height); } @@ -576,11 +586,6 @@ void set_panel_background(Panel *p) if (panel_autohide) { if (p->hidden_pixmap) XFreePixmap(server.dsp, p->hidden_pixmap); p->hidden_pixmap = XCreatePixmap(server.dsp, server.root_win, p->hidden_width, p->hidden_height, server.depth); - 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; XCopyArea(server.dsp, p->area.pix, p->hidden_pixmap, server.gc, xoff, yoff, p->hidden_width, p->hidden_height, 0, 0); }