From 68c07558c3d9d3bd73edd18fe789b58acbad4bf5 Mon Sep 17 00:00:00 2001 From: Thierry Lorthiois Date: Sat, 27 Mar 2010 16:51:12 +0000 Subject: [PATCH] fixed resize_clock() and snapshot --- src/clock/clock.c | 4 ++-- src/config.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/clock/clock.c b/src/clock/clock.c index b6eb254..e29c138 100644 --- a/src/clock/clock.c +++ b/src/clock/clock.c @@ -258,8 +258,6 @@ void resize_clock (void *obj) new_width += (2*clock->area.paddingxlr) + (2*clock->area.bg->border.width); Panel *panel = ((Area*)obj)->panel; - clock->area.posx = panel->area.width - clock->area.width - panel->area.paddingxlr - panel->area.bg->border.width; - if (new_width > clock->area.width || new_width < (clock->area.width-6)) { // resize clock // we try to limit the number of resize @@ -274,6 +272,8 @@ void resize_clock (void *obj) systray.area.resize = 1; panel_refresh = 1; } + clock->area.posx = panel->area.width - clock->area.width - panel->area.paddingxlr - panel->area.bg->border.width; + g_object_unref (layout); cairo_destroy (c); diff --git a/src/config.c b/src/config.c index 150face..9e74f17 100644 --- a/src/config.c +++ b/src/config.c @@ -527,12 +527,13 @@ void add_entry (char *key, char *value) } /* Systray */ - else if (strcmp (key, "systray") == 0) { + // systray disabled in snapshot mode + else if (strcmp (key, "systray") == 0 && snapshot_path == 0) { systray_enabled = atoi(value); // systray is latest option added. files without 'systray' are old. old_config_file = 0; } - else if (strcmp (key, "systray_padding") == 0) { + else if (strcmp (key, "systray_padding") == 0 && snapshot_path == 0) { if (old_config_file) systray_enabled = 1; extract_values(value, &value1, &value2, &value3); -- 2.45.2