*fix* clear tooltip window before redrawing
*fix* all systray icons should be visible also in real transparency mode git-svn-id: http://tint2.googlecode.com/svn/trunk@310 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
parent
2506f4045c
commit
009653db34
2 changed files with 10 additions and 0 deletions
|
@ -301,6 +301,15 @@ gboolean add_icon(Window id)
|
|||
|
||||
error = FALSE;
|
||||
old = XSetErrorHandler(window_error_handler);
|
||||
XWindowAttributes attr;
|
||||
XGetWindowAttributes(server.dsp, id, &attr);
|
||||
if ( attr.depth != server.depth ) {
|
||||
XSetWindowAttributes a;
|
||||
a.background_pixmap = None; // set to none, otherwise XReparentWindow fails...
|
||||
a.background_pixel = 0; // set background pixel to 0. Looks ugly, but at least the icon appears
|
||||
// TODO: maybe the XShape extension can be used, to clip the icon
|
||||
XChangeWindowAttributes(server.dsp, id, CWBackPixmap|CWBackPixel, &a);
|
||||
}
|
||||
XReparentWindow(server.dsp, id, panel->main_win, 0, 0);
|
||||
XSync(server.dsp, False);
|
||||
XSetErrorHandler(old);
|
||||
|
|
|
@ -217,6 +217,7 @@ void tooltip_update()
|
|||
Color bc = g_tooltip.background_color;
|
||||
Border b = g_tooltip.border;
|
||||
if (real_transparency) {
|
||||
clear_pixmap(g_tooltip.window, 0, 0, width, height);
|
||||
draw_rect(c, b.width, b.width, width-2*b.width, height-2*b.width, b.rounded-b.width/1.571);
|
||||
cairo_set_source_rgba(c, bc.color[0], bc.color[1], bc.color[2], bc.alpha);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue