[Xcb] EWMH API for XCB
arnaud at andesi.org
Wed Dec 16 10:58:44 PST 2009
>>>>> Jamey Sharp <jamey at minilop.net> writes:
> A nice way to test a multi-screen setup is with Xnest or Xephyr,
> which let you configure several screens that all show up as
> windows on your real screen.
Yes, I usually Xephyr which is really useful for testing.
> Cool, I like this much better! I hope passing the screen number to
> all those calls doesn't make using this code too painful?
I think that's ok as it's just one parameter, and it couldn't have been
fixed otherwise IMO.
> Minor further suggestions, in xcb_ewmh_init_atoms:
> You don't need to count the number of screens. You have a bunch of
> options, but since you're getting an iterator over them, I'd just
> set ewmh-> nb_screens = screen_iter.rem before using the iterator
> in any loops. Or if you want your code to be more
> self-explanatory, set ewmh-> nb_screens =
You're right, I used these functions quite a while ago but I didn't
check when I wrote my code. Thanks much. I have committed it there
> Each entry in wm_cm_sn is used only once, so I'd declare it inside
> the loop as a single buffer that you reuse each time, instead of
> using C99's variable-length arrays (VLA). It's nice that C99 added
> VLA support, but you don't need it here, and last I checked GDB
> did a bad job debugging functions with VLAs in them.
Thanks. I have committed there.
>> Hrm ok, oops... I have silently and discretly edited my previous
>> commit to hide that :).
> Nicely done. ;-) Looks right to me now, and the history clearly
> shows that it was right all along. ;-)
> I'm not as concerned as you are about consistency across different
> projects, but I think there's a lot of value in documenting "best
> practices" for setting up these projects. I'd completely approve
> of additions to the wiki about these topics, but of course it's a
> wiki, so you don't need my approval anyway. :-)
Thanks for all the comments again! I will commit a patch tomorrow to
ship ewmh as its own library.
More information about the Xcb