summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortest-tools <test-tools>2006-10-17 07:48:23 +0000
committertest-tools <test-tools>2006-10-17 07:48:23 +0000
commit77a2bac0457b5b25a00cd7c7357e3d8fae217106 (patch)
tree2b8a0558b13794f25134c143a92b4bbc41f94996 /src
parent94e84d1c5acd5f85f6469c3ccc92a678f41d208d (diff)
downloadberyl-manager-77a2bac0457b5b25a00cd7c7357e3d8fae217106.tar.gz
beryl-manager-77a2bac0457b5b25a00cd7c7357e3d8fae217106.tar.bz2
beryl-manager: Fix for #512 , some cleanup...
Diffstat (limited to 'src')
-rw-r--r--src/main.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index 07d0217..8e59ac5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -313,10 +313,16 @@ void showMenu(guint button,guint32 time)
{
gtk_menu_popup(GTK_MENU(menu),NULL,NULL,NULL,NULL,0,time);
}
-gboolean popupClient(GtkWidget * w, GdkEventButton * e, gpointer d)
+gboolean popupClient(GtkWidget * w, GdkEventClient * e, gpointer d)
{
- showMenu(0,gtk_get_current_event_time());
- return TRUE;
+ static GdkAtom my_atom = GDK_NONE;
+ if (my_atom == GDK_NONE)
+ my_atom = gdk_atom_intern("beryl-manager-Popup",1);
+ if (e->message_type==my_atom) {
+ showMenu(0,gtk_get_current_event_time());
+ return TRUE;
+ }
+ return FALSE;
}
gboolean buttonUp(GtkWidget * w, GdkEventButton * e, gpointer d)
{
@@ -900,7 +906,6 @@ void init_menu()
mitem = gtk_image_menu_item_new_from_stock(GTK_STOCK_QUIT,NULL);
g_signal_connect(mitem,"activate",G_CALLBACK(quitMe),NULL);
- g_signal_connect(mitem,"client-event",G_CALLBACK(popupClient),NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),mitem);
gtk_widget_show(mitem);
}
@@ -924,8 +929,6 @@ void init_widgets()
g_signal_connect(evbox,"button-release-event",G_CALLBACK(buttonUp),NULL);
g_signal_connect(evbox,"enter-notify-event",G_CALLBACK(enterNotify),NULL);
g_signal_connect(evbox,"leave-notify-event",G_CALLBACK(leaveNotify),NULL);
- g_signal_connect(evbox,"client-event",G_CALLBACK(popupClient),NULL);
- g_signal_connect(icon,"client-event",G_CALLBACK(popupClient),NULL);
g_signal_connect(mainIcon,"client-event",G_CALLBACK(popupClient),NULL);
gtk_widget_show_all(GTK_WIDGET(mainIcon));
init_menu();