libxfce4panel could position panel plugin menus
Diego Ongaro
ongardie at gmail.com
Tue Sep 25 15:33:51 CEST 2007
On 9/25/07, Jasper Huijsmans <jasper at xfce.org> wrote:
> Hey Diego,
>
> 2007/9/24, Diego Ongaro <ongardie at gmail.com>:
> > I was able to fairly easily create a wrapper around gtk_menu_popup()
> > and get the launcher and window list plugins to use that.
> >
> > However, the whole thing is more complicated than I had thought,
> > thanks to those little arrows. The arrows are supposed to point in the
> > direction that the menu will open.
>
> Yes, maybe, but this is additional functionality, right? It is not
> required for the menu popup function, is it? Not all menus will have
> an arrow button attached, e.g. the xfdesktop menu.
>
It's additional functionality that we shouldn't ignore, since it's so
related. Also, I think the launcher uses its own menu positioning
function to figure out where the arrow should be.
> >
> > (2) Let libxfce4panel *guess* which way the menu will open based on
> > the panel's position on the screen. It'll always get it right for
> > fixed position panels, and it'll get it right most of the time for
> > floating panels (it might miss those that float near, but not at, the
> > bottom or right of the screen). Then, when it opens a menu, it will
> > report the actual direction the menu opened, and the plugin can adjust
> > the arrow's direction accordingly. This "cache" could even be saved in
> > the rc file.
>
> This sounds perfectly acceptable to me. Not many downsides and it
> works correctly in most use cases.
>
I'll give it a try sometime.
-Diego
More information about the Xfce4-dev
mailing list