X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fsystray%2Fsystraybar.c;h=02ed1b4ed20440b212fe422550be4399a363b210;hb=b7aaf2ac709f85602ef6152980a639fd3a8577e7;hp=273d9bb8e2d9879a05c7582ae48ad384d55f96e5;hpb=21dcd195642692401f855ef07b239364b5ef0c1b;p=chaz%2Ftint2 diff --git a/src/systray/systraybar.c b/src/systray/systraybar.c index 273d9bb..02ed1b4 100644 --- a/src/systray/systraybar.c +++ b/src/systray/systraybar.c @@ -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);