]> Dogcows Code - chaz/tint2/blobdiff - src/systray/systraybar.c
*fix* bug fixed (multi-desktop and taskbar_active_id != taskbar_id)
[chaz/tint2] / src / systray / systraybar.c
index 87e20ec7f1772677ff0290da8d8bb86adbf8ece9..41f93a4e4a100bf7264acf26dbbde44ff85a3598 100644 (file)
@@ -434,10 +434,10 @@ gboolean add_icon(Window id)
        }
 
        // show the window
-       if (!traywin->hide) {
-               XMapRaised(server.dsp, traywin->tray_id);
+       if (!traywin->hide)
+               XMapWindow(server.dsp, traywin->tray_id);
+       if (!traywin->hide && !panel->is_hidden)
                XMapRaised(server.dsp, traywin->id);
-       }
 
        // changed in systray force resize on panel
        panel->area.resize = 1;
@@ -560,7 +560,14 @@ void refresh_systray_icon()
                if (traywin->hide) continue;
                if (real_transparency || systray.alpha != 100 || systray.brightness != 0 || systray.saturation != 0)
                        systray_render_icon(traywin);
-               else
+               else {
+                       // comment by andreas: I'm still not sure, what exactly we need to do here... Somehow trayicons which do not
+                       // offer the same depth as tint2 does, need to draw a background pixmap, but this cannot be done with
+                       // XCopyArea... So we actually need XRenderComposite???
+//                     Pixmap pix = XCreatePixmap(server.dsp, server.root_win, traywin->width, traywin->height, server.depth);
+//                     XCopyArea(server.dsp, panel->temp_pmap, pix, server.gc, traywin->x, traywin->y, traywin->width, traywin->height, 0, 0);
+//                     XSetWindowBackgroundPixmap(server.dsp, traywin->id, pix);
                        XClearArea(server.dsp, traywin->tray_id, 0, 0, traywin->width, traywin->height, True);
+               }
        }
 }
This page took 0.02053 seconds and 4 git commands to generate.