From 47bc01d608f1fc064572a3de98962fdb19140c59 Mon Sep 17 00:00:00 2001 From: o9000 Date: Sat, 3 Feb 2018 11:02:36 +0000 Subject: [PATCH] Scaling: limit to 8x --- src/panel.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/panel.c b/src/panel.c index 7db82f5..59bc657 100644 --- a/src/panel.c +++ b/src/panel.c @@ -229,6 +229,10 @@ void init_panel() p->scale = 1; if (ui_scale_monitor_size_ref > 0) p->scale *= server.monitors[p->monitor].height / ui_scale_monitor_size_ref; + if (p->scale > 8 || p->scale < 1./8) { + fprintf(stderr, RED "tint2: panel %d having scale %g outside bounds, resetting to 1.0" RESET "\n", i + 1, p->scale); + p->scale = 1; + } fprintf(stderr, BLUE "tint2: panel %d uses scale %g " RESET "\n", i + 1, p->scale); if (!p->area.bg) p->area.bg = &g_array_index(backgrounds, Background, 0);