*fix* broke systray with last checkin for fake transparency
*fix* some real transparency stuff fixed... it seems as if it is done now git-svn-id: http://tint2.googlecode.com/svn/trunk@312 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
19
src/panel.c
19
src/panel.c
@@ -488,17 +488,16 @@ void set_panel_background(Panel *p)
|
|||||||
|
|
||||||
if (real_transparency) {
|
if (real_transparency) {
|
||||||
clear_pixmap(p->area.pix.pmap, 0, 0, p->area.width, p->area.height);
|
clear_pixmap(p->area.pix.pmap, 0, 0, p->area.width, p->area.height);
|
||||||
return; // no need for background pixmap, a transparent one is enough
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
get_root_pixmap();
|
get_root_pixmap();
|
||||||
|
// copy background (server.root_pmap) in panel.area.pix.pmap
|
||||||
// copy background (server.root_pmap) in panel.area.pix.pmap
|
Window dummy;
|
||||||
Window dummy;
|
int x, y;
|
||||||
int x, y;
|
XTranslateCoordinates(server.dsp, p->main_win, server.root_win, 0, 0, &x, &y, &dummy);
|
||||||
XTranslateCoordinates(server.dsp, p->main_win, server.root_win, 0, 0, &x, &y, &dummy);
|
XSetTSOrigin(server.dsp, server.gc, -x, -y) ;
|
||||||
XSetTSOrigin(server.dsp, server.gc, -x, -y) ;
|
XFillRectangle(server.dsp, p->area.pix.pmap, server.gc, 0, 0, p->area.width, p->area.height);
|
||||||
XFillRectangle(server.dsp, p->area.pix.pmap, server.gc, 0, 0, p->area.width, p->area.height);
|
}
|
||||||
|
|
||||||
// draw background panel
|
// draw background panel
|
||||||
cairo_surface_t *cs;
|
cairo_surface_t *cs;
|
||||||
|
|||||||
@@ -514,7 +514,7 @@ void refresh_systray_icon()
|
|||||||
traywin = (TrayWindow*)l->data;
|
traywin = (TrayWindow*)l->data;
|
||||||
if (traywin->hide) continue;
|
if (traywin->hide) continue;
|
||||||
if (real_transparency) systray_render_icons(traywin);
|
if (real_transparency) systray_render_icons(traywin);
|
||||||
else XClearArea(server.dsp, traywin->id, 0, 0, traywin->width, traywin->height, False);
|
else XClearArea(server.dsp, traywin->id, 0, 0, traywin->width, traywin->height, True);
|
||||||
}
|
}
|
||||||
if (real_transparency)
|
if (real_transparency)
|
||||||
XFlush(server.dsp);
|
XFlush(server.dsp);
|
||||||
|
|||||||
@@ -830,6 +830,7 @@ int main (int argc, char *argv[])
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
if (e.type == XDamageNotify+damage_event)
|
if (e.type == XDamageNotify+damage_event)
|
||||||
|
// TODO: update only the damaged icon, not all of them
|
||||||
systray.area.redraw = 1;
|
systray.area.redraw = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,8 +110,7 @@ void draw (Area *a, int active)
|
|||||||
// add layer of root pixmap (or clear pixmap if real_transparency==true)
|
// add layer of root pixmap (or clear pixmap if real_transparency==true)
|
||||||
if (real_transparency)
|
if (real_transparency)
|
||||||
clear_pixmap(*pmap, 0 ,0, a->width, a->height);
|
clear_pixmap(*pmap, 0 ,0, a->width, a->height);
|
||||||
else
|
XCopyArea (server.dsp, ((Panel *)a->panel)->temp_pmap, *pmap, server.gc, a->posx, a->posy, a->width, a->height, 0, 0);
|
||||||
XCopyArea (server.dsp, ((Panel *)a->panel)->temp_pmap, *pmap, server.gc, a->posx, a->posy, a->width, a->height, 0, 0);
|
|
||||||
|
|
||||||
cairo_surface_t *cs;
|
cairo_surface_t *cs;
|
||||||
cairo_t *c;
|
cairo_t *c;
|
||||||
|
|||||||
Reference in New Issue
Block a user