-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Julien Danjou wrote:
> At 1257623166 time_t, Uli Schlachter wrote:
>> Just after this I found another problem:
>>
>> Between a new wibox being made visible and actually painting it, we could
>> already be receiving expose events on it. I noticed this with awful.menu,
>> which
>> creates a lot of wiboxes. Some of them were filled with random blue-ish stuff
>> for a split second. The commit message got more details.
>
> Ah, damn god, I missed your patches so much. Just perfect.
>
> "All in"[1] as they say.
>
> [1] 3.4 and master.
>
> Cheers,
Whoops, shit happens. Check if we already created a window for a wibox before
xcb_change_window_attribute()'ing it. No idea if this bug had any bad effects,
but it's still a bug.
Uli
- --
"Do you know that books smell like nutmeg or some spice from a foreign land?"
-- Faber in Fahrenheit 451
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iQEcBAEBCAAGBQJK9ph+AAoJECLkKOvLj8sGgsAH/j3Wx+jTwKHtrhhIZv6PcuMm
glU/UQiMZvkAzeinTZATuyqP36OqoibvBmLHrIUoBtRdCcVhw2jjUfEtfkzJGFN9
sAzz59SS0EwxEVD48+ZbHvVMGug4Xc0JeMKcV19+0rOFTN29JV0yaUciCAmbOjn0
PPsHxWbsx1ByQnPRYY86Ddj8A2+K/qB/tlcvnbJi1w4+/aNWdtcCBAwUBntMcY/g
Fyd8To96kqf5RAIgDrkBIYryJPkFbfxNFfwny/HPI9vW07Jx7aHRGkUPGAtR7SDB
mpBwxJHTOL7jUp3GA33Hf3HqvMxNEUPjyhyaH2o2fHCIG+yeJKPq34GG3hGuEBQ=
=H5HU
-----END PGP SIGNATURE-----
>From 3e1cff56a188c8293905537e423a13cdf920561c Mon Sep 17 00:00:00 2001
From: Uli Schlachter <[email protected]>
Date: Sun, 8 Nov 2009 11:03:56 +0100
Subject: [PATCH] Check if a wibox' window exists before modifying it
If you change the .bg of an existing wibox which isn't attached to any screen
yet, then there is no window for which we can update the XCB_CW_BACK_PIXEL.
Signed-off-by: Uli Schlachter <[email protected]>
---
objects/wibox.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/objects/wibox.c b/objects/wibox.c
index 159c603..a53462d 100644
--- a/objects/wibox.c
+++ b/objects/wibox.c
@@ -1010,10 +1010,12 @@ luaA_wibox_set_bg(lua_State *L, wibox_t *wibox)
uint32_t values[] = { wibox->ctx.bg.pixel };
wibox->need_update = true;
- xcb_change_window_attributes(globalconf.connection,
- wibox->window,
- mask,
- values);
+
+ if (wibox->window != XCB_NONE)
+ xcb_change_window_attributes(globalconf.connection,
+ wibox->window,
+ mask,
+ values);
}
luaA_object_emit_signal(L, -3, "property::bg", 0);
return 0;
--
1.6.5