]> Dogcows Code - chaz/tint2/blobdiff - src/systray/systraybar.c
fixed systray_asb in fake transparency (see r407)
[chaz/tint2] / src / systray / systraybar.c
index 411f9121467d203bfe67535e9c8c2d7314d3ea24..89e5fee029ba76a9ca5d1c96c393ffe93db50863 100644 (file)
@@ -48,7 +48,7 @@ Window net_sel_win = None;
 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;
@@ -95,9 +95,13 @@ void init_systray_panel(void *p)
 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;
+       }
 }
 
 
@@ -545,7 +549,11 @@ void systray_render_icon_now(void* t)
                printf("Strange tray icon found with depth: %d\n", traywin->depth);
                return;
        }
-       Picture pict_image = XRenderCreatePicture(server.dsp, traywin->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);
This page took 0.021264 seconds and 4 git commands to generate.