[gnome-panel/wip/muktupavels/alignment: 19/20] toplevel: don't change orientation from update_struts
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/wip/muktupavels/alignment: 19/20] toplevel: don't change orientation from update_struts
- Date: Sat, 29 Feb 2020 12:26:34 +0000 (UTC)
commit c707d02a3a917ecb5f3fcfab80e25b44192cd56d
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Feb 16 13:06:01 2020 +0200
toplevel: don't change orientation from update_struts
gnome-panel/panel-toplevel.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
---
diff --git a/gnome-panel/panel-toplevel.c b/gnome-panel/panel-toplevel.c
index 7351772f1..81fd8e522 100644
--- a/gnome-panel/panel-toplevel.c
+++ b/gnome-panel/panel-toplevel.c
@@ -1437,7 +1437,6 @@ panel_toplevel_get_effective_auto_hide_size (PanelToplevel *toplevel)
static gboolean
panel_toplevel_update_struts (PanelToplevel *toplevel, gboolean end_of_animation)
{
- PanelOrientation orientation;
GdkScreen *screen;
gboolean geometry_changed = FALSE;
int strut, strut_start, strut_end;
@@ -1482,16 +1481,12 @@ panel_toplevel_update_struts (PanelToplevel *toplevel, gboolean end_of_animation
height = toplevel->priv->geometry.height;
}
- orientation = toplevel->priv->orientation;
-
strut = strut_start = strut_end = 0;
- if (orientation & PANEL_HORIZONTAL_MASK) {
+ if (toplevel->priv->orientation & PANEL_HORIZONTAL_MASK) {
if (y <= monitor_y) {
- orientation = PANEL_ORIENTATION_TOP;
strut = y + height - monitor_y;
} else if (y >= monitor_y + monitor_height - height) {
- orientation = PANEL_ORIENTATION_BOTTOM;
strut = monitor_y + monitor_height - y;
}
@@ -1501,10 +1496,8 @@ panel_toplevel_update_struts (PanelToplevel *toplevel, gboolean end_of_animation
}
} else {
if (x <= monitor_x) {
- orientation = PANEL_ORIENTATION_LEFT;
strut = x + width - monitor_x;
} else if (x >= monitor_x + monitor_width - width) {
- orientation = PANEL_ORIENTATION_RIGHT;
strut = monitor_x + monitor_width - x;
}
@@ -1514,18 +1507,13 @@ panel_toplevel_update_struts (PanelToplevel *toplevel, gboolean end_of_animation
}
}
- if (orientation != toplevel->priv->orientation) {
- toplevel->priv->orientation = orientation;
- g_object_notify (G_OBJECT (toplevel), "orientation");
- }
-
if (toplevel->priv->auto_hide && strut > 0)
strut = panel_toplevel_get_effective_auto_hide_size (toplevel);
if (strut > 0)
geometry_changed = panel_struts_register_strut (toplevel,
toplevel->priv->monitor,
- orientation,
+ toplevel->priv->orientation,
strut,
strut_start,
strut_end);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]