-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Julien Danjou wrote:
> At 1239369215 time_t, Uli Schlachter wrote:
>> attached is the new version of that patch. It adds a new function wibox_map()
>> which maps the wibox's window and makes sure it is correctly drawn. In my
>> testing this results in no garbage drawn at all.
> 
> Your solution probably works but I still raise my previous point:
> We need to draw once the wibox on its creation so the content is by
> default the background and not garbage.
> 
> Your patch force to redraw wibox upon each map, but mapping a windows
> does not mean we need to redraw it.

I threw some printf() in there and noticed that need_update is already always
set anyway. Since the code already did this before, I think it won't cause
anything bad if awesome continues to do this no-op. Plus I can't figure out any
working alternative atm.
wibox_draw() skips invisible windows, so setting need_update on creation wont do
anything. Calling widget_render() directly in luaA_wibox_new() caused a segfault
and I didn't really want to dig into it, my lua-C-api-fu is pretty weak.

Plus, rendering the wibox once when it's created seems kinda wrong, it's
background etc can still be changed. wibox_map() is the first place where we
really need to display this wibox, so it should be the first time a call to
wibox_draw() / widget_render() is made.

>>  static void
>> +wibox_map(wibox_t *wibox)
>> +{
>> +    xcb_map_window(globalconf.connection, wibox->sw.window);
>> +    /* Make sure we don't display garbage */
>> +    wibox_need_update(wibox);
>> +    /* stack correctly the wibox */
>> +    client_stack();
>> +}
> 
> Good if you remove wibox_need_update();
> 
>>      if(wibox->isvisible)
>> -    {
>> -        /* draw it right now once to avoid garbage shown */
>> -        wibox_draw(wibox);
> 
> That comes from your previous patch; be careful, if you fix a patch,
> does not think I'll apply the patch-fixing-the-patch; I want only one.

Nope, it doesn't. Read the patch again ;). There are two similar looking hunks.
The first one was missing this wibox_draw() call and the second one had it.
Since I added wibox_map() I made both places use it.

So I'd asked you to suggest a better alternative or to merge this patch.

Cheers,
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.9 (GNU/Linux)

iEYEARECAAYFAknfZxYACgkQABixOSrV999yGwCg6/OxIbT1j04utfLxyfure+Tk
TwwAniAjXk6U3P6n528xnfH6N6JXsnSQ
=fCus
-----END PGP SIGNATURE-----

-- 
To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.

Reply via email to