]> Dogcows Code - chaz/tint2/commitdiff
*fix* issue 318
authorAndreas Fink <andreas.fink85@googlemail.com>
Sun, 9 Jan 2011 14:06:36 +0000 (14:06 +0000)
committerAndreas Fink <andreas.fink85@googlemail.com>
Sun, 9 Jan 2011 14:06:36 +0000 (14:06 +0000)
src/panel.c

index cea2923ff834ab8e8b4f3619156ff7672d98364e..f9593777d0c6bd1516c7dd1c07c3689991a5f396 100644 (file)
@@ -236,6 +236,8 @@ void init_panel_size_and_position(Panel *panel)
                        panel->area.width = (float)server.monitor[panel->monitor].width * panel->area.width / 100;
                if (panel->pourcenty)
                        panel->area.height = (float)server.monitor[panel->monitor].height * panel->area.height / 100;
+               if (panel->area.width + panel->marginx > server.monitor[panel->monitor].width)
+                       panel->area.width = server.monitor[panel->monitor].width - panel->marginx;
                if (panel->area.bg->border.rounded > panel->area.height/2) {
                        printf("panel_background_id rounded is too big... please fix your tint2rc\n");
                        g_array_append_val(backgrounds, *panel->area.bg);
@@ -253,6 +255,8 @@ void init_panel_size_and_position(Panel *panel)
                        panel->area.width = (float)server.monitor[panel->monitor].width * old_panel_height / 100;
                else
                        panel->area.width = old_panel_height;
+               if (panel->area.height + panel->marginy > server.monitor[panel->monitor].height)
+                       panel->area.height = server.monitor[panel->monitor].height - panel->marginy;
                if (panel->area.bg->border.rounded > panel->area.width/2) {
                        printf("panel_background_id rounded is too big... please fix your tint2rc\n");
                        g_array_append_val(backgrounds, *panel->area.bg);
This page took 0.022141 seconds and 4 git commands to generate.