From 9ae231e5c19852ef17710d98b07e39b8453073b3 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Thu, 28 Jul 2016 16:10:23 +0200 Subject: 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 --- mate-panel/panel-widget.c | 14 +++++++++++--- 1 file 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); } -- cgit v1.2.1