libxfce4panel could position panel plugin menus

Jasper Huijsmans jasper at xfce.org
Tue Sep 25 10:02:54 CEST 2007


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.

[...]
>
> Here are just a few ways we could handle this:
>
> (1) If a plugin wants to know which way its menu will open, it has to
> give libxfce4panel the menu to find out.
>
> (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.

>
> (3) Get rid of the arrow buttons. Use a dot or something else instead.
>
> (4) Get rid of floating panels.

You don't want to start a riot, do you?  I think I have suggested it
once or twice, but there are people who actually use them. Silly, I
know, but they are our users, so we don't want to let them down! ;-)

-- 
        Jasper



More information about the Xfce4-dev mailing list