X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fsystray%2Fsystraybar.c;h=9d460549cc50b8e6fe8b352d5cf41d6abd847ae5;hb=a72ae04bf96477f11d8bf24baea54596f6d3356b;hp=a6fec3ae56c24d9de722c69f157db26851e19c55;hpb=4e5af01dacd2a13dcf01b1a3e239591b59241afa;p=chaz%2Ftint2 diff --git a/src/systray/systraybar.c b/src/systray/systraybar.c index a6fec3a..9d46054 100644 --- a/src/systray/systraybar.c +++ b/src/systray/systraybar.c @@ -278,7 +278,7 @@ void start_net() // v0.3 trayer specification. tint2 always horizontal. // Vertical panel will draw the systray horizontal. - int orient = 0; + long orient = 0; XChangeProperty(server.dsp, net_sel_win, server.atom._NET_SYSTEM_TRAY_ORIENTATION, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &orient, 1); VisualID vid; if (server.visual32 && (systray.alpha != 100 || systray.brightness != 0 || systray.saturation != 0)) @@ -374,9 +374,11 @@ gboolean add_icon(Window id) if ( XGetWindowAttributes(server.dsp, id, &attr) == False ) return FALSE; unsigned long mask = 0; XSetWindowAttributes set_attr; + Visual* visual = server.visual; //printf("icon with depth: %d, width %d, height %d\n", attr.depth, attr.width, attr.height); printf("icon with depth: %d\n", attr.depth); if (attr.depth != server.depth || systray.alpha != 100 || systray.brightness != 0 || systray.saturation != 0) { + visual = attr.visual; set_attr.colormap = attr.colormap; set_attr.background_pixel = 0; set_attr.border_pixel = 0; @@ -387,7 +389,7 @@ gboolean add_icon(Window id) mask = CWBackPixmap; } Window parent_window; - parent_window = XCreateWindow(server.dsp, panel->main_win, 0, 0, 30, 30, 0, attr.depth, InputOutput, attr.visual, mask, &set_attr); + parent_window = XCreateWindow(server.dsp, panel->main_win, 0, 0, 30, 30, 0, attr.depth, InputOutput, visual, mask, &set_attr); old = XSetErrorHandler(window_error_handler); XReparentWindow(server.dsp, id, parent_window, 0, 0); XSync(server.dsp, False);