[Xcb] Setting the WM_TRANSIENT_FOR property on a window

Arnaud Fontaine arnaud at andesi.org
Mon Mar 22 08:16:27 PDT 2010


>>>>> Peter Harris <git at peter.is-a-geek.org> writes:

    > Mikhail  already clarified my point  about variable-length arrays.
    > Thanks, Mikhail.

Yes,  thanks.  I  didn't know  there  was  no  way  to recover  in  such
case... Maybe, it's better to use alloca() then.

    > By  "open-code ChangeProperty", I mean copy-and-paste  the body of
    > the generated xcb_change_property  function from libxcb, modify it
    >  to suit,  and  you end  up  calling xcb_send_request  at the  end
    > (instead of xcb_change_property).

    > Ugly, but it avoids the  extra copies. I can see arguments on both
    > sides  of this one. I was  just wondering what you  thought of the
    > idea.

Well, I'm  thinking about leaving WM_CLASS  setter as it  is now because
this function is not going to be called so many times usually (therefore
this  is not  a  big overhead)  and  especially because  it's easier  to
maintain (for now I do think  it's better to focus on maintainability as
this library  is not widely  used yet).  I  will leave a comment  in the
code quoting what  you said though...  If performance  really matters at
some point, then we will simply use this solution. What do you think?

Might be a  silly question which has already been  discussed, but why is
iovec needed? I have never had a deep look into core xcb code. Thanks!

Cheers,
Arnaud


More information about the Xcb mailing list