summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-07-28 16:10:23 +0200
committerraveit65 <[email protected]>2016-08-03 11:13:18 +0200
commit9ae231e5c19852ef17710d98b07e39b8453073b3 (patch)
tree4a5966a0e7a9600ca879a6b239e49956f8ca1b75
parentecf1736ccbc673a1d808d667b4516ecb5edffefe (diff)
downloadmate-panel-9ae231e5c19852ef17710d98b07e39b8453073b3.tar.bz2
mate-panel-9ae231e5c19852ef17710d98b07e39b8453073b3.tar.xz
GTK+-3 panel: don't set panel's initial size to G_MAXINT
Replacing GtkTable with GtkGrid introduced new bug. Warning is - 'Native children wider or taller than 65535 pixels are not supported'. This is caused by setting panels initial size to G_MAXINT. Changing initial size to 0 fixes this new bug. taken from: https://git.gnome.org/browse/gnome-panel/commit/?id=02ce072
-rw-r--r--mate-panel/panel-widget.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/mate-panel/panel-widget.c b/mate-panel/panel-widget.c
index b040fb5a..6a6a3033 100644
--- a/mate-panel/panel-widget.c
+++ b/mate-panel/panel-widget.c
@@ -1938,7 +1938,11 @@ panel_widget_init (PanelWidget *panel)
panel->packed = FALSE;
panel->orient = GTK_ORIENTATION_HORIZONTAL;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ panel->size = 0;
+#else
panel->size = G_MAXINT;
+#endif
panel->applet_list = NULL;
panel->master_widget = NULL;
panel->drop_widget = widget;
@@ -1966,21 +1970,25 @@ panel_widget_new (PanelToplevel *toplevel,
panel = g_object_new (PANEL_TYPE_WIDGET, NULL);
- gtk_widget_set_has_window (GTK_WIDGET (panel), TRUE);
- gtk_widget_set_can_focus (GTK_WIDGET (panel), TRUE);
+ gtk_widget_set_has_window (GTK_WIDGET (panel), TRUE);
+ gtk_widget_set_can_focus (GTK_WIDGET (panel), TRUE);
panel->orient = orient;
panel->sz = sz;
panel->packed = packed;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ panel->size = 0;
+#else
if (packed)
panel->size = 0;
else
panel->size = G_MAXINT;
+#endif
panel->toplevel = toplevel;
panel->drop_widget = GTK_WIDGET (toplevel);
-
+
return GTK_WIDGET (panel);
}