summaryrefslogtreecommitdiff
path: root/mate-panel
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-04-10 11:47:44 +0300
committermonsta <[email protected]>2017-04-11 11:46:55 +0300
commit471d39d57525d5d25208d776992336ec8c81c62f (patch)
tree3a1966d980e536804f43784698af59ff20edb34d /mate-panel
parent6f4f6e5a31495f12e38fef46d84be4b6311ef390 (diff)
downloadmate-panel-471d39d57525d5d25208d776992336ec8c81c62f.tar.bz2
mate-panel-471d39d57525d5d25208d776992336ec8c81c62f.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 :)
Diffstat (limited to 'mate-panel')
-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);