Vincent.Torri at iecn.u-nancy.fr
Sun Mar 20 02:51:06 PST 2005
On Sun, 20 Mar 2005, Jamey Sharp wrote:
> On Sun, Mar 20, 2005 at 09:58:06AM +0100, Vincent Torri wrote:
> > On Sun, 20 Mar 2005, Jamey Sharp wrote:
> > > On Sun, Mar 20, 2005 at 12:57:26AM +0100, Vincent Torri wrote:
> > > > Well, i've ported evas to xcb today and i have problems with the current
> > > > icccm code:
> > > > 1) i can't use SizeHintsFlags values, whereas i have to use them.
> > >
> > > I don't understand. Why do you have to use them?
> > I'm not comfortable with icccm, but here is a snapshot of what i use :
> > szhints.flags = PMinSize | PMaxSize | PSize | USSize;
> > szhints.min_width = szhints.max_width = win_w;
> > szhints.min_height = szhints.max_height = win_h;
> > SetWMNormalHints(conn, win, &szhints);
> > is there another to do that ?
> Yes, there is. In fact, if the code in icccm.c is correct, then the
> above snippet is incorrect while looking reasonable, which is exactly
> why I picked this design... I don't think you're allowed to set both
> PSize and USSize at the same time, and I think if you specify either you
> have to set the width and height fields of the size hints.
> I intended this usage:
> SizeHints *szhints = AllocSizeHints();
> SizeHintsSetMinSize(szhints, win_w, win_h);
> SizeHintsSetMaxSize(szhints, win_w, win_h);
> SizeHintsSetSize(szhints, 0, win_w, win_h);
> SetWMNormalHints(conn, win, szhints);
> (The 0 parameter to the SetSize call is because I'm assuming your window
> width and height are program-specified -- that is, the user-specified
> flag is false. This will set flags to include PSize, but not USSize.)
ok, thanks. I didn't understood at all how to use them
And for you information, i've finished xcb port of evas !
evas xlib : 2.893 (173.6 fps)
evas xcb : 2.831 (169.9 fps)
i think that my code is maybe not good enough. maybe i could optimize it.
And as i think of it, here is a question : should i use XCBSync where
there was a XSynch ? or xcb allows to not use it in some cases ?
another question : is there a way to set class hints ?
More information about the xcb