Add per-window actions

GTK+ also exports window-specific actions, by putting the object path
for the exported action group in the _DBUS_OBJECT_PATH X property.
We add this action group to the app's muxer with a 'win' prefix,
since that is what the exported menu expects. Whenever the focus
window changes, we update the window-specific actions of its
application, and emit notify::action-group to cause the app
menu to be updated.
This commit is contained in:
Matthias Clasen
2011-12-15 01:25:35 -05:00
committed by Colin Walters
parent 4aa1fe9ca2
commit 6c4e9d23f2
4 changed files with 37 additions and 2 deletions

View File

@@ -413,6 +413,9 @@ update_focus_app (ShellWindowTracker *self)
new_focus_win = meta_display_get_focus_window (shell_global_get_display (shell_global_get ()));
new_focus_app = new_focus_win ? shell_window_tracker_get_window_app (self, new_focus_win) : NULL;
if (new_focus_app)
shell_app_update_window_actions (new_focus_app, new_focus_win);
set_focus_app (self, new_focus_app);
}