Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Problem with Shell._setSize()

Steve_Northover@xxxxxxx writes: 
> Now, this is probably more than you ever wanted to know about the problem.
> I am open to better strategies and all ideas.  Will this approach work on 
> GTK?
> Do you have a better suggestion?

Well, GDK has the built in gdk_window_get_frame_extents() to try to
get the size of the window frame. It's not reliable, for obvious
reasons. But you can take advantage of our prewritten broken hack
instead of having to do your own.

It _is_ completely possible to write code that works fine and reliably
under the X model - it's just that all cross-platform toolkits are
apparently first written on win32, then API frozen, and then
ported. ;-) So they end up with unportable APIs. It's trivial to
emulate the X behavior on Windows so people are doing stuff
backward. ;-)

I consider the X model totally legitimate - there are many very valid
reasons for it, for example "window is maximized so can't be resized"
or "the user changed the titlebar font size because they have poor
vision, and thus the frame size changed" or whatever.

I don't think this is really a GTK issue, rather an X issue; I predict
you'll find that the issues and possible solutions are pretty much
identical to the ones with Motif.

Havoc



Back to the top