summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-04-10 11:47:44 +0300
committermonsta <[email protected]>2017-04-10 12:03:01 +0300
commit93f73619bbd76dce14c3b2df9756ad59136b8223 (patch)
tree8c8a0b401a6886dc291537bcdc565a714f6d9d81
parent917fcb76d14e69642df38393bc2f6a5b52d0c7ed (diff)
downloadmate-panel-93f73619bbd76dce14c3b2df9756ad59136b8223.tar.bz2
mate-panel-93f73619bbd76dce14c3b2df9756ad59136b8223.tar.xz
properly fit expanded panel to smaller screen size
when changing panel orientation or rotating the screen itself, panel might keep its old size, so some applets might appear behind screen edge (until you restart the panel). same thing might happen when enabling hide buttons. fixes https://github.com/mate-desktop/mate-panel/issues/552 upstream commit with detailed problem description: https://git.gnome.org/browse/gnome-panel/commit/?id=fc24d8fa623c4cf841eb5168cb1c250b4a84d4da upstream commit with the actual fix: https://git.gnome.org/browse/gnome-panel/commit/?id=4511f4466df0b163906794b4a32196226ccf90f3 yes, it's somewhat messed up there :)
-rw-r--r--mate-panel/panel-widget.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/mate-panel/panel-widget.c b/mate-panel/panel-widget.c
index 2a2e1704..ff4640c4 100644
--- a/mate-panel/panel-widget.c
+++ b/mate-panel/panel-widget.c
@@ -1285,15 +1285,7 @@ panel_widget_get_preferred_size(GtkWidget *widget,
g_free (panel->applets_using_hint);
panel->applets_using_hint = NULL;
- if (!panel->packed) {
- if (panel->orient == GTK_ORIENTATION_HORIZONTAL) {
- minimum_size->width = panel->size;
- natural_size->width = panel->size;
- } else {
- minimum_size->height = panel->size;
- natural_size->height = panel->size;
- }
- } else {
+ if (panel->packed) {
/* put the list in the correct order: this is important
* since we'll use this order in the size_allocate() */
ad_with_hints = g_list_reverse (ad_with_hints);