From cae621918ef5ae78110797e3e5c4ef24b0b83714 Mon Sep 17 00:00:00 2001 From: o9000 Date: Sat, 13 Jun 2015 11:32:22 +0200 Subject: [PATCH] systray: Do not turn off compositing for missing window errors --- src/systray/systraybar.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/systray/systraybar.c b/src/systray/systraybar.c index ec0accf..634b059 100644 --- a/src/systray/systraybar.c +++ b/src/systray/systraybar.c @@ -746,7 +746,7 @@ void systray_render_icon_composited(void* t) // drawable. If someone knows why it does not work with the traywindow itself, please tell me ;) Pixmap tmp_pmap = XCreatePixmap(server.dsp, traywin->win, traywin->width, traywin->height, 32); if (!tmp_pmap) { - goto on_error; + goto on_systray_error; } XRenderPictFormat *f; if (traywin->depth == 24) { @@ -761,7 +761,7 @@ void systray_render_icon_composited(void* t) XRenderPictFormat *f32 = XRenderFindVisualFormat(server.dsp, server.visual32); if (!f || !f32) { XFreePixmap(server.dsp, tmp_pmap); - goto on_error; + goto on_systray_error; } XSync(server.dsp, False); @@ -833,7 +833,11 @@ void systray_render_icon_composited(void* t) return; on_error: - printf("systray: rendering error. Disabling compositing and restarting systray...\n"); + printf("systray %d: rendering error for icon %lu pid %d\n", __LINE__, traywin->win, traywin->pid); + return; + +on_systray_error: + printf("systray %d: rendering error for icon %lu pid %d. Disabling compositing and restarting systray...\n", __LINE__, traywin->win, traywin->pid); systray_composited = 0; stop_net(); start_net();