Re: bonobo_control_set_transient_for problem



Ettore Perazzoli <ettore ximian com> writes:          
> Very interesting indeed.
> 
> Why doesn't the GTK documentation say anything about this?
> 
>         http://developer.gnome.org/doc/API/2.0/gtk/gtk-standard-enumerations.html#GtkWindowPosition
>

No one wrote that part, I suppose. The CENTER_ON_PARENT option only
exists because otherwise people use even more broken/crappy hacks.

> AFAIK if you don't use that and use gtk_window_set_transient_for() some
> window managers will just position the window in the upper left corner
> (which is what happens with Evolution right now if you run, say, KDE or
> CDE).  What is the suggested way to do the positioning properly then?
> 

Change KWin. The whole point of allowing multiple WMs is to allow
multiple policies for placement and such. If every app author decides
that "some WMs have placement policies that don't match what I think
should happen so I'll do my own placement" then the whole system kind
of goes to hell.

If the user is using a WM that doesn't do what they want, then they
should use another one. The WM has all the needed info to position
dialogs.

Re: Carlos's comment, yes Metacity doesn't position dialogs correctly
right now. I think it's because GTK 2 has a bug where it always sets
the position and overrides Metacity. It's in bugzilla somewhere.  But
maybe it's some unrelated issue.

Anyhow, see a long thread I started on wm-spec-list in the last couple
months about whether the app or the WM does placement in some
stickier/more difficult cases. It's kind of a nightmare problem of X
programming that will never go away.

But if it does go away it will be because we write down exactly who is
supposed to do what, and then fix all apps and WMs, and refuse to work
around broken ones; the same way that backspace/delete got fixed for
terminals, and the same way clipboard behavior is getting fixed. Just
like those cases, working around broken cases always breaks some
working cases and then later another round of developers fixes those
working cases and breaks the old workarounds and... round and
round. Hey, for the clipboard we went round and round for ten years,
maybe we can do even better on this. ;-)

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]