summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortest-tools <test-tools>2006-11-09 16:22:32 +0000
committertest-tools <test-tools>2006-11-09 16:22:32 +0000
commit897e8556131569d79cd2fe547994efc58dc39020 (patch)
tree6f10e2ac344cc49503a4ca582993d2a8f76ac5b9 /src
parent58eb5b2567e82d34224d0b31b6c9bf904647e9d8 (diff)
downloadberyl-manager-897e8556131569d79cd2fe547994efc58dc39020.tar.gz
beryl-manager-897e8556131569d79cd2fe547994efc58dc39020.tar.bz2
beryl-manager: Icon will now re-appear in newer instances of Systray
Closes #795
Diffstat (limited to 'src')
-rw-r--r--src/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 1ffcb84..8f78785 100644
--- a/src/main.c
+++ b/src/main.c
@@ -96,6 +96,7 @@ GtkWidget * reloadDecoratorItem;
void launchWM();
void startWM();
+void init_widgets();
void startBeryl();
void showMenu(guint,guint32);
static Window Window_With_Name (Display * dpy, Window top, char *name);
@@ -365,6 +366,11 @@ gboolean leaveNotify(GtkWidget * w, GdkEventCrossing * e, gpointer d)
hasMouse=FALSE;
return TRUE;
}
+gboolean destroyNotify(GtkWidget * w, GdkEventClient * e, gpointer d)
+{
+ init_widgets();
+ return TRUE;
+}
void startApp(GtkWidget * w, gchar * command)
{
g_spawn_command_line_async(command,NULL);
@@ -960,10 +966,9 @@ 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 (mainIcon, "delete_event", G_CALLBACK (gtk_widget_hide_on_delete), NULL);
+ g_signal_connect(evbox,"destroy",G_CALLBACK(destroyNotify),NULL);
g_signal_connect(mainIcon,"client-event",G_CALLBACK(popupClient),NULL);
gtk_widget_show_all(GTK_WIDGET(mainIcon));
- init_menu();
}
void detect_nvidia()
{
@@ -1127,6 +1132,7 @@ int main(int argc, char ** argv)
load_settings();
init_widgets();
+ init_menu();
if (WM<0 || WM>=(numWM))
WM=-1;
if (WM==-1)