summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mate-panel/button-widget.c10
-rw-r--r--mate-panel/panel-toplevel.c2
2 files changed, 11 insertions, 1 deletions
diff --git a/mate-panel/button-widget.c b/mate-panel/button-widget.c
index 904ecbe6..57294d44 100644
--- a/mate-panel/button-widget.c
+++ b/mate-panel/button-widget.c
@@ -654,6 +654,11 @@ button_widget_get_preferred_width (GtkWidget *widget,
{
ButtonWidget *button_widget = BUTTON_WIDGET (widget);
+ if (button_widget->priv->pixbuf == NULL ) {
+ *minimal_width = *natural_width = 1;
+ return;
+ }
+
*minimal_width = *natural_width = gdk_pixbuf_get_width (button_widget->priv->pixbuf);
}
@@ -664,6 +669,11 @@ button_widget_get_preferred_height (GtkWidget *widget,
{
ButtonWidget *button_widget = BUTTON_WIDGET (widget);
+ if (button_widget->priv->pixbuf == NULL ) {
+ *minimal_height = *natural_height = 1;
+ return;
+ }
+
*minimal_height = *natural_height = gdk_pixbuf_get_height (button_widget->priv->pixbuf);
}
#else
diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c
index d8ea8205..acdeb36e 100644
--- a/mate-panel/panel-toplevel.c
+++ b/mate-panel/panel-toplevel.c
@@ -3095,7 +3095,7 @@ panel_toplevel_realize (GtkWidget *widget)
panel_struts_set_window_hint (toplevel);
gdk_window_set_group (window, window);
- gdk_window_set_geometry_hints (window, NULL, GDK_HINT_POS);
+ gdk_window_set_geometry_hints (window, NULL, 0);
panel_toplevel_initially_hide (toplevel);