Systraybar systray;
int refresh_systray;
int systray_enabled;
-int systray_max_icon_size = 0;
+int systray_max_icon_size;
// background pixmap if we render ourselves the icons
static Pixmap render_background = 0;
void cleanup_systray()
{
systray_enabled = 0;
+ systray_max_icon_size = 0;
systray.area.on_screen = 0;
free_area(&systray.area);
- if (render_background) XFreePixmap(server.dsp, render_background);
+ if (render_background) {
+ XFreePixmap(server.dsp, render_background);
+ render_background = 0;
+ }
}
error = FALSE;
XWindowAttributes attr;
- XGetWindowAttributes(server.dsp, id, &attr);
+ if ( XGetWindowAttributes(server.dsp, id, &attr) == False ) return FALSE;
unsigned long mask = 0;
XSetWindowAttributes set_attr;
printf("icon with depth: %d\n", attr.depth);
XSendEvent(server.dsp, id, False, 0xFFFFFF, &e);
}
+ printf("Adding systray with window: %d\n", id);
traywin = g_new0(TrayWindow, 1);
traywin->id = parent_window;
traywin->tray_id = id;
{
XErrorHandler old;
+ printf("Removing systray with window: %d\n", traywin->tray_id);
// remove from our list
systray.list_icons = g_slist_remove(systray.list_icons, traywin);
systray.area.resize = 1;
printf("Strange tray icon found with depth: %d\n", traywin->depth);
return;
}
- Picture pict_image = XRenderCreatePicture(server.dsp, traywin->tray_id, f, 0, 0);
+ Picture pict_image;
+ if (real_transparency)
+ pict_image = XRenderCreatePicture(server.dsp, traywin->id, f, 0, 0);
+ else
+ pict_image = XRenderCreatePicture(server.dsp, traywin->tray_id, f, 0, 0);
Picture pict_drawable = XRenderCreatePicture(server.dsp, tmp_pmap, XRenderFindVisualFormat(server.dsp, server.visual32), 0, 0);
XRenderComposite(server.dsp, PictOpSrc, pict_image, None, pict_drawable, 0, 0, 0, 0, 0, 0, traywin->width, traywin->height);
XRenderFreePicture(server.dsp, pict_image);