summaryrefslogtreecommitdiff
path: root/recipes-lxde/lxpanel/lxpanel/0001-panel.c-gtk3-set-minimum-geometry.patch
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2016-11-30 09:37:32 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-01-11 17:40:24 +0100
commita8a1e1f03f72ac2847f4b62ee6d25e00409efdd9 (patch)
tree1807dd9be9e3bee4ec37e5337a22f193906d37ff /recipes-lxde/lxpanel/lxpanel/0001-panel.c-gtk3-set-minimum-geometry.patch
parent8404d01f279827219264fef536988d8b64c74756 (diff)
lxpanel: fix gtk3 geometry issues
When the wnck pager is displayed the panel's width was set to the sum of all widgets, not the screen width. The with of a single task in the task bar was not reduced when all task's did no longer fit in the allocated taskbar width resulting in a panel which extended past the right side of the screen. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'recipes-lxde/lxpanel/lxpanel/0001-panel.c-gtk3-set-minimum-geometry.patch')
-rw-r--r--recipes-lxde/lxpanel/lxpanel/0001-panel.c-gtk3-set-minimum-geometry.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/recipes-lxde/lxpanel/lxpanel/0001-panel.c-gtk3-set-minimum-geometry.patch b/recipes-lxde/lxpanel/lxpanel/0001-panel.c-gtk3-set-minimum-geometry.patch
new file mode 100644
index 0000000..fdae675
--- /dev/null
+++ b/recipes-lxde/lxpanel/lxpanel/0001-panel.c-gtk3-set-minimum-geometry.patch
@@ -0,0 +1,47 @@
+From 75959d778aa0f0608c08d80494b4cf98a88e6979 Mon Sep 17 00:00:00 2001
+From: Max Krummenacher <max.krummenacher@toradex.com>
+Date: Sun, 6 Nov 2016 15:55:18 +0100
+Subject: [PATCH 1/2] panel.c: gtk3: set minimum geometry
+
+This prevents, that the pager plugin changes the with (or height) to the
+minimum width (or height) needed for what is displayed.
+---
+ src/panel.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/src/panel.c b/src/panel.c
+index b5daf37..741a085 100644
+--- a/src/panel.c
++++ b/src/panel.c
+@@ -293,6 +293,9 @@ static void lxpanel_size_allocate(GtkWidget *widget, GtkAllocation *a)
+ {
+ LXPanel *panel = LXPANEL(widget);
+ Panel *p = panel->priv;
++#if GTK_CHECK_VERSION(3, 0, 0)
++ GdkGeometry geometry;
++#endif
+ GdkRectangle rect;
+ gint x, y;
+
+@@ -327,6 +330,18 @@ static void lxpanel_size_allocate(GtkWidget *widget, GtkAllocation *a)
+ _panel_queue_update_background(panel);
+ }
+
++#if GTK_CHECK_VERSION(3, 0, 0)
++ memset(&geometry, 0, sizeof(geometry));
++/* geometry.max_height = requisition.height;
++ geometry.max_width = requisition.width;
++ geometry.min_height = requisition.height;
++ geometry.min_width = requisition.width;
++*/
++ geometry.max_height = geometry.min_height = a->height;
++ geometry.max_width = geometry.min_width = a->width;
++ gtk_window_set_geometry_hints (GTK_WINDOW (widget), NULL, &geometry, GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE);
++#endif
++
+ if (gtk_widget_get_mapped(widget))
+ _panel_establish_autohide(panel);
+ }
+--
+2.6.6
+