aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/indicator-datetime.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c
index 7d1222e..a6d7ef2 100644
--- a/src/indicator-datetime.c
+++ b/src/indicator-datetime.c
@@ -272,6 +272,14 @@ static void
menu_visible_notfy_cb(GtkWidget * menu, gpointer user_data)
{
IndicatorDatetime * self = INDICATOR_DATETIME(user_data);
+ g_debug("notify visible signal recieved");
+
+ // we should only react if we're currently visible
+ gboolean visible;
+ g_object_get(G_OBJECT(menu), "visible", &visible, NULL);
+ if (visible) return;
+ g_debug("notify visible menu hidden, resetting date");
+
int y,m,d;
time_t curtime;