[wx-dev] Re: Re: Re: 2.8.5 rc2, wxGTK top level positioning

Paul Cornett pc-wx at bullseye.com
Mon Aug 27 10:26:34 PDT 2007


Mart Raudsepp wrote:
> On E, 2007-08-27 at 14:23 +0200, Arne Steinarson wrote:
> > Some time delay in responding, I haven't found a good way to use
> > the archived news-groups yet.
> >         > In order to account for the difference, I created a cache
> >         > of
> >         decoration 
> >         > sizes (what the window manager adds around a TWL). The
> >         > first
> >         time a TLW
> >         > of a particular GDK style (m_gdkDecor) is shown (in
> >         > Create),
> >         one cannot
> >         > know this value,
> >         Why?
> > Maybe one could, but wxSystemSettings don't give those values,
> 
> wxSystemSettings in wxGTK has supported querying the frame extents
> for a long time now if you pass a wxWindow (that is a
> wxTopLevelWindow) to GetMetric second argument. The requirement is
> that the passed wxTopLevelWindow's native GtkWindow is realized by
> that time. I'm not sure how and when things are realized in wxGTK at
> this point of time, but realized does not mean having it shown
> already, so there should be no problem for querying the true frame
> extents before the window is shown (to not cause a visual move or
> resize once it's already shown)

No, the window has to be mapped. Before that, the _NET_FRAME_EXTENTS
property doesn't work. And, of course, it doesn't work at all if the WM
doesn't support it, or isn't running yet.




More information about the wx-dev mailing list