[gnome-panel] panel-widget: don't call size_allocate width negative size



commit f77b7335bbd5a05ffff1eae8c9eefced2c5eb4a2
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sat Jan 9 14:10:24 2016 +0200

    panel-widget: don't call size_allocate width negative size

 gnome-panel/panel-widget.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/gnome-panel/panel-widget.c b/gnome-panel/panel-widget.c
index c81efc4..02911da 100644
--- a/gnome-panel/panel-widget.c
+++ b/gnome-panel/panel-widget.c
@@ -1421,6 +1421,10 @@ panel_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
                                challoc.y = ad->constrained;
                        }
                        ad->min_cells  = ad->cells;
+
+                       challoc.width = MAX (challoc.width, 0);
+                       challoc.height = MAX (challoc.height, 0);
+
                        gtk_widget_size_allocate(ad->applet,&challoc);
                        i += ad->cells;
                }
@@ -1483,7 +1487,10 @@ panel_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
                                challoc.x = allocation->width / 2 - challoc.width / 2;
                                challoc.y = ad->constrained;
                        }
-                       
+
+                       challoc.width = MAX (challoc.width, 0);
+                       challoc.height = MAX (challoc.height, 0);
+
                        gtk_widget_size_allocate(ad->applet,&challoc);
                }
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]