aboutsummaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/data.c6
-rw-r--r--module/main.c15
2 files changed, 12 insertions, 9 deletions
diff --git a/module/data.c b/module/data.c
index 824bd8f..00902bb 100644
--- a/module/data.c
+++ b/module/data.c
@@ -30,9 +30,9 @@
#include "data.h"
#include "appmenu.h"
-G_DEFINE_QUARK(topmenu-window-data, window_data)
-G_DEFINE_QUARK(topmenu-menu-shell-data, menu_shell_data)
-G_DEFINE_QUARK(topmenu-menu-item-data, menu_item_data)
+static G_DEFINE_QUARK(topmenu-window-data, window_data)
+static G_DEFINE_QUARK(topmenu-menu-shell-data, menu_shell_data)
+static G_DEFINE_QUARK(topmenu-menu-item-data, menu_item_data)
gboolean
topmenu_is_blacklisted (void)
diff --git a/module/main.c b/module/main.c
index e978582..5ab7e28 100644
--- a/module/main.c
+++ b/module/main.c
@@ -23,6 +23,7 @@
#include <gdk/gdkx.h>
#include "../global.h"
+#include "../libtopmenu-common/topmenu-background.h"
#include "../libtopmenu-client/topmenu-client.h"
#include "../libtopmenu-client/topmenu-monitor.h"
@@ -168,7 +169,9 @@ topmenu_connect_window (GtkWindow *window)
window_data->monitor_connection_id = g_signal_connect(monitor, "notify::available",
G_CALLBACK (handle_should_hide_menubar_updated), window);
- topmenu_client_connect_window_widget (gtk_widget_get_window (GTK_WIDGET (window)),
+ GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
+
+ topmenu_client_connect_window_widget (gdk_window,
GTK_WIDGET (window_data->appmenubar));
}
@@ -184,12 +187,12 @@ topmenu_disconnect_window (GtkWindow *window)
if (window_data == NULL)
return; // Already disconnected or ignored
- if (window_data->monitor_connection_id == 0)
- return; // Already disconnected
-
TopMenuMonitor *monitor = topmenu_monitor_get_instance();
- g_signal_handler_disconnect(monitor, window_data->monitor_connection_id);
- window_data->monitor_connection_id = 0;
+ if (window_data->monitor_connection_id)
+ {
+ g_signal_handler_disconnect (monitor, window_data->monitor_connection_id);
+ window_data->monitor_connection_id = 0;
+ }
if (window_data->appmenu.menu)
topmenu_appmenu_destroy(&window_data->appmenu);