summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-02-11 13:05:12 +0100
committerStefano Karapetsas <[email protected]>2014-02-11 13:05:12 +0100
commitcd6f4678430417bf1675db8ce2343acc1f60f32b (patch)
treea2657a5483ced3b7a1622a1d55e09c45a574f0e0
parent7c4222433b97422b81d2f52215dbe6cbdcf43985 (diff)
downloadmate-panel-cd6f4678430417bf1675db8ce2343acc1f60f32b.tar.bz2
mate-panel-cd6f4678430417bf1675db8ce2343acc1f60f32b.tar.xz
Add hook to support run dialog and main menu opening with metacity
-rw-r--r--mate-panel/panel-action-protocol.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/mate-panel/panel-action-protocol.c b/mate-panel/panel-action-protocol.c
index 6669f248..75cfd356 100644
--- a/mate-panel/panel-action-protocol.c
+++ b/mate-panel/panel-action-protocol.c
@@ -41,8 +41,11 @@
#include "panel-menu-bar.h"
static Atom atom_mate_panel_action = None;
+static Atom atom_gnome_panel_action = None;
static Atom atom_mate_panel_action_main_menu = None;
static Atom atom_mate_panel_action_run_dialog = None;
+static Atom atom_gnome_panel_action_main_menu = None;
+static Atom atom_gnome_panel_action_run_dialog = None;
static Atom atom_mate_panel_action_kill_dialog = None;
static void
@@ -106,7 +109,8 @@ panel_action_protocol_filter (GdkXEvent *gdk_xevent,
if (xevent->type != ClientMessage)
return GDK_FILTER_CONTINUE;
- if (xevent->xclient.message_type != atom_mate_panel_action)
+ if ((xevent->xclient.message_type != atom_mate_panel_action) &&
+ (xevent->xclient.message_type != atom_gnome_panel_action))
return GDK_FILTER_CONTINUE;
#if GTK_CHECK_VERSION (3, 0, 0)
@@ -129,6 +133,10 @@ panel_action_protocol_filter (GdkXEvent *gdk_xevent,
panel_action_protocol_main_menu (screen, xevent->xclient.data.l [1]);
else if (xevent->xclient.data.l [0] == atom_mate_panel_action_run_dialog)
panel_action_protocol_run_dialog (screen, xevent->xclient.data.l [1]);
+ else if (xevent->xclient.data.l [0] == atom_gnome_panel_action_main_menu)
+ panel_action_protocol_main_menu (screen, xevent->xclient.data.l [1]);
+ else if (xevent->xclient.data.l [0] == atom_gnome_panel_action_run_dialog)
+ panel_action_protocol_run_dialog (screen, xevent->xclient.data.l [1]);
else if (xevent->xclient.data.l [0] == atom_mate_panel_action_kill_dialog)
panel_action_protocol_kill_dialog (screen, xevent->xclient.data.l [1]);
else
@@ -143,6 +151,7 @@ panel_action_protocol_init (void)
GdkDisplay *display;
#if !GTK_CHECK_VERSION (3, 0, 0)
GdkAtom gdk_atom_mate_panel_action;
+ GdkAtom gdk_atom_gnome_panel_action;
#endif
display = gdk_display_get_default ();
@@ -150,12 +159,18 @@ panel_action_protocol_init (void)
#if !GTK_CHECK_VERSION (3, 0, 0)
gdk_atom_mate_panel_action =
gdk_atom_intern_static_string ("_MATE_PANEL_ACTION");
+ gdk_atom_gnome_panel_action =
+ gdk_atom_intern_static_string ("_GNOME_PANEL_ACTION");
#endif
atom_mate_panel_action =
XInternAtom (GDK_DISPLAY_XDISPLAY (display),
"_MATE_PANEL_ACTION",
FALSE);
+ atom_mate_panel_action =
+ XInternAtom (GDK_DISPLAY_XDISPLAY (display),
+ "_GNOME_PANEL_ACTION",
+ FALSE);
atom_mate_panel_action_main_menu =
XInternAtom (GDK_DISPLAY_XDISPLAY (display),
"_MATE_PANEL_ACTION_MAIN_MENU",
@@ -164,6 +179,14 @@ panel_action_protocol_init (void)
XInternAtom (GDK_DISPLAY_XDISPLAY (display),
"_MATE_PANEL_ACTION_RUN_DIALOG",
FALSE);
+ atom_gnome_panel_action_main_menu =
+ XInternAtom (GDK_DISPLAY_XDISPLAY (display),
+ "_GNOME_PANEL_ACTION_MAIN_MENU",
+ FALSE);
+ atom_gnome_panel_action_run_dialog =
+ XInternAtom (GDK_DISPLAY_XDISPLAY (display),
+ "_GNOME_PANEL_ACTION_RUN_DIALOG",
+ FALSE);
atom_mate_panel_action_kill_dialog =
XInternAtom (GDK_DISPLAY_XDISPLAY (display),
"_MATE_PANEL_ACTION_KILL_DIALOG",
@@ -176,5 +199,8 @@ panel_action_protocol_init (void)
gdk_display_add_client_message_filter (
display, gdk_atom_mate_panel_action,
panel_action_protocol_filter, NULL);
+ gdk_display_add_client_message_filter (
+ display, gdk_atom_gnome_panel_action,
+ panel_action_protocol_filter, NULL);
#endif
}