Description of Problem:
The task chooser button at the far-right of a Menu
Panel should be able to access a task's window
menu (just like right-clicking the task in the
window list applet).
This will allow users to close a number of open
applications back to back using just the chooser
button. This will also give users the choice to
simply not use the window list applet (and save
panel space) but retain its functionality.
Designs
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Allowing the pull-down menu to serve as a functional replacement for
the window list seems like a pretty good idea. As people have
mentioned on the lists, there are downsides to using a right click
inside menus, though I don't think I mind this so much.
I played around with selector.c, testing it with the test-selector from bug
165269. Here's what it looks like.
The behaviour of the window selector menu is to stay there while the user uses
action menus. The problem is that it stays displayed when the user clicks off
the menus.
That's neat, and it works well.
Small bug though : the applet button still appears selected after acting on a
window. To reopen the menu you have to click once to deselect it, and twice to
reselect it.
Actually, I kinda like the way the first patch worked. The window menu stayed up
after acting on the window. That way, you can minimize a few applications in a
row. But I don't know what the best choice is.
About the patch :
why use a g_signal_connect_object when g_signal_connect works fine ?
to correctly close the menu (if that's the way we want it), in
wnck_selector_popup_menu find the parent of the select GtkMenuItem (with a
gtk_widget_get_parent). The parent is a GtkMenu, that descends from a
GtkMenuShell, meaning you can do this :
item_parent = gtk_widget_get_parent (GTK_WIDGET(item));
g_signal_connect_swapped (G_OBJECT (menu), "deactivate",
G_CALLBACK (gtk_menu_shell_deactivate),
item_parent);
And it will work.
I'm still not that familiar with the API. Thanks a lot for your suggestion tho'.
I think I like the first behaviour (the selector staying up while I
close/minimize/etc. applications). It's annoying to have to repeat opening the
applet for each window.
I guess so :-(
Also it would be nice if once you have the window menu up, menu items for other windows (ie items in
the WnckSelector menu) would not highlight. In other words - once the window menu is up, the
WnckSelector menu should not change state (am I being confused here or is it just me ?)
I'm not sure I get highlight behaviour you are talking about.
The only thing I see related to highlight, is that the current WnckSelector menu
item looses it's highlight when the window-action-menu (contextual menu) pops up.
None of the WnckSelector menu items get highlighted when I hover over them with
the mouse.
Maybe we'd want to keep the current selector menu item highlighted.
This patch is to get the action-menu on third-button click and menu-key press.
It's an improvement on attachment 36573.
It's a copycat of the contextual menu for items in the panel's menu ("Add this
launcher to the panel", etc.).
The Selector stays on action or deactivation of the action-menu.
If this behaviour is good enough for the panel's menu, let's stick with it for
consistency. What do you think?
Denis : This last patch is nice, however you miss two includes :
#include <gdk/gdkkeysyms.h>
#include "window-action-menu.h"
Still I get the same bug as previously : other windows menu items are
highlighted. It's as if I had two active menus at the same time. Not a big deal,
though.
Could someone with more power than me comment on the patch ? :)
I really don't get the problem you do tho', the selector items cannot highlight
while the context action menu is displayed.
How does the gnome-panel menu behave with context menus for you?
Does the same highlight problem occur?