Implement window menus in gnome-shell
https://bugzilla.gnome.org/show_bug.cgi?id=726352
This commit is contained in:
@ -73,7 +73,8 @@ static void gnome_shell_plugin_show_tile_preview (MetaPlugin *plugin,
|
||||
MetaRectangle *tile_rect,
|
||||
int tile_monitor);
|
||||
static void gnome_shell_plugin_hide_tile_preview (MetaPlugin *plugin);
|
||||
|
||||
static void gnome_shell_plugin_show_window_menu (MetaPlugin *plugin,
|
||||
MetaWindow *window);
|
||||
|
||||
static gboolean gnome_shell_plugin_xevent_filter (MetaPlugin *plugin,
|
||||
XEvent *event);
|
||||
@ -140,6 +141,7 @@ gnome_shell_plugin_class_init (GnomeShellPluginClass *klass)
|
||||
|
||||
plugin_class->show_tile_preview = gnome_shell_plugin_show_tile_preview;
|
||||
plugin_class->hide_tile_preview = gnome_shell_plugin_hide_tile_preview;
|
||||
plugin_class->show_window_menu = gnome_shell_plugin_show_window_menu;
|
||||
|
||||
plugin_class->xevent_filter = gnome_shell_plugin_xevent_filter;
|
||||
plugin_class->keybinding_filter = gnome_shell_plugin_keybinding_filter;
|
||||
@ -303,6 +305,13 @@ gnome_shell_plugin_hide_tile_preview (MetaPlugin *plugin)
|
||||
_shell_wm_hide_tile_preview (get_shell_wm ());
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_shell_plugin_show_window_menu (MetaPlugin *plugin,
|
||||
MetaWindow *window)
|
||||
{
|
||||
_shell_wm_show_window_menu (get_shell_wm (), window);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gnome_shell_plugin_xevent_filter (MetaPlugin *plugin,
|
||||
XEvent *xev)
|
||||
|
@ -40,6 +40,8 @@ void _shell_wm_show_tile_preview (ShellWM *wm,
|
||||
MetaRectangle *tile_rect,
|
||||
int tile_monitor);
|
||||
void _shell_wm_hide_tile_preview (ShellWM *wm);
|
||||
void _shell_wm_show_window_menu (ShellWM *wm,
|
||||
MetaWindow *window);
|
||||
|
||||
gboolean _shell_wm_filter_keybinding (ShellWM *wm,
|
||||
MetaKeyBinding *binding);
|
||||
|
@ -28,6 +28,7 @@ enum
|
||||
KILL_WINDOW_EFFECTS,
|
||||
SHOW_TILE_PREVIEW,
|
||||
HIDE_TILE_PREVIEW,
|
||||
SHOW_WINDOW_MENU,
|
||||
FILTER_KEYBINDING,
|
||||
CONFIRM_DISPLAY_CHANGE,
|
||||
|
||||
@ -135,6 +136,13 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
shell_wm_signals[SHOW_WINDOW_MENU] =
|
||||
g_signal_new ("show-window-menu",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW);
|
||||
shell_wm_signals[FILTER_KEYBINDING] =
|
||||
g_signal_new ("filter-keybinding",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
@ -288,6 +296,12 @@ _shell_wm_hide_tile_preview (ShellWM *wm)
|
||||
g_signal_emit (wm, shell_wm_signals[HIDE_TILE_PREVIEW], 0);
|
||||
}
|
||||
|
||||
void
|
||||
_shell_wm_show_window_menu (ShellWM *wm,
|
||||
MetaWindow *window)
|
||||
{
|
||||
g_signal_emit (wm, shell_wm_signals[SHOW_WINDOW_MENU], 0, window);
|
||||
}
|
||||
|
||||
void
|
||||
_shell_wm_minimize (ShellWM *wm,
|
||||
|
Reference in New Issue
Block a user