Re: [gtk-list] Window centering continued
- From: "M. David Krauss" <Fader frodo com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Window centering continued
- Date: Sun, 19 Dec 1999 02:00:59 -0500
On Sat, 18 Dec 1999, Matthew D Allen wrote:
[big example snipped]
+ Now there's another problem. If the widget is not visible, (i.e. I
+ haven't called gtk_widget_show() on it) then the get_geometry() call lies
+ to me and tells me the window is 20x22 every time. This sort of makes
+ sense, since it's hard to tell how big a window is if it isn't on screen.
+ So, I have to show the widget before I can pull this off. But then, if I
+ do that, then the window "jumps" from wherever the wm put it originally to
+ the spot I specify after figuring out what the coordinates should be. To
+ complicate things, sometimes the get_geometry call gives bad width/height
+ even AFTER showing the widget. (I've also tried gtk_widget_show_all()
+ with the same result)
get_geometry() is not lieing to you. Rather, the window really is the reported
size and position, until it is mapped, at which time the window manager gets a
chance to interfere.
+ For the record, I agree with Havoc in that if an application wants to
+ enforce wherever it wants to be rather than just suggesting where it wants
+ to be and letting the wm have the final say, the app is broken.
+ Unfortunately, the spec for this application *requires* that all windows
+ pop up completely centered. Just using the gtk_window_set_position works
+ for the vast majority of window managers, but E doesn't want to play nice
+ for some reason.
+ Any pointers on what could be going wrong or how to get around this I
+ would really appreciate.
Yes. Don't use this app with Enlightenment. That's very rude behavior for a
windowmanager, but ultimately the WM is a dictator, and your app must work
within it's rules. Sorry :(
] [Thread Prev