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);
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);
}