Popup positioning API



I've not had (and will really not have) much time to think about this in
detail, but I think we have an issue with our window placement APIs that
we have to get right before the 3.0 release.

Right now the placement of GTK_WINDOW_POPUP windows (for instance
tooltips and menus) are entierly based on override-redirect semantics,
i.e. we can get the current exact positions of the toplevels and place
at an exact position a new undecorated toplevel. This is not really
gonna be enough for future backends.

For instance, wayland will not let apps control position of windows like
this, so popups will need to be placed by offset from another toplevel.
See
http://lists.freedesktop.org/archives/wayland-devel/2010-November/000270.html

Another example is my html backend. I've been pondering using separate
browser windows for each toplevel, but this breaks for menus and other
popups. These will need to have be put inside the right real toplevel.
So, here we also need positioning relative to another toplevel.

A bunch of current APIs might need to be extended to make this work, for
instance the GtkMenuPositionFunc. I haven't had time to look into the
exact details, but we really should do so before freezing the APIs.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl redhat com            alexander larsson gmail com 
He's a deeply religious drug-addicted matador on the wrong side of the law. 
She's a time-travelling extravagent stripper from a different time and place. 
They fight crime! 



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