summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mate-panel/panel-struts.c23
-rw-r--r--mate-panel/panel-struts.h3
-rw-r--r--mate-panel/panel-toplevel.c7
-rw-r--r--mate-panel/panel-xutils.c4
4 files changed, 13 insertions, 24 deletions
diff --git a/mate-panel/panel-struts.c b/mate-panel/panel-struts.c
index 00968ab7..7c0a9e38 100644
--- a/mate-panel/panel-struts.c
+++ b/mate-panel/panel-struts.c
@@ -319,8 +319,8 @@ panel_struts_set_window_hint (PanelToplevel *toplevel)
panel_xutils_set_strut (gtk_widget_get_window (widget),
strut->orientation,
strut_size,
- strut->allocated_strut_start * scale,
- strut->allocated_strut_end * scale,
+ strut->allocated_strut_start,
+ strut->allocated_strut_end,
&strut->allocated_geometry,
scale);
}
@@ -412,8 +412,7 @@ panel_struts_register_strut (PanelToplevel *toplevel,
PanelOrientation orientation,
int strut_size,
int strut_start,
- int strut_end,
- gint scale)
+ int strut_end)
{
PanelStrut *strut;
gboolean new_strut = FALSE;
@@ -451,33 +450,25 @@ panel_struts_register_strut (PanelToplevel *toplevel,
strut->geometry.x = strut->strut_start;
strut->geometry.y = monitor_y;
strut->geometry.width = strut->strut_end - strut->strut_start + 1;
- strut->geometry.height = strut->strut_size / scale;
- if (scale > 1)
- strut->geometry.width -= (strut->strut_size / scale);
+ strut->geometry.height = strut->strut_size;
break;
case PANEL_ORIENTATION_BOTTOM:
strut->geometry.x = strut->strut_start;
strut->geometry.y = monitor_y + monitor_height - strut->strut_size;
strut->geometry.width = strut->strut_end - strut->strut_start + 1;
- strut->geometry.height = strut->strut_size / scale;
- if (scale > 1)
- strut->geometry.width -= (strut->strut_size / scale);
+ strut->geometry.height = strut->strut_size;
break;
case PANEL_ORIENTATION_LEFT:
strut->geometry.x = monitor_x;
strut->geometry.y = strut->strut_start;
- strut->geometry.width = strut->strut_size / scale;
+ strut->geometry.width = strut->strut_size;
strut->geometry.height = strut->strut_end - strut->strut_start + 1;
- if (scale > 1)
- strut->geometry.height -= (strut->strut_size / scale);
break;
case PANEL_ORIENTATION_RIGHT:
strut->geometry.x = monitor_x + monitor_width - strut->strut_size;
strut->geometry.y = strut->strut_start;
- strut->geometry.width = strut->strut_size / scale;
+ strut->geometry.width = strut->strut_size;
strut->geometry.height = strut->strut_end - strut->strut_start + 1;
- if (scale > 1)
- strut->geometry.height -= (strut->strut_size / scale);
break;
}
diff --git a/mate-panel/panel-struts.h b/mate-panel/panel-struts.h
index 4d7e49d0..6741e084 100644
--- a/mate-panel/panel-struts.h
+++ b/mate-panel/panel-struts.h
@@ -43,8 +43,7 @@ gboolean panel_struts_register_strut (PanelToplevel *toplevel,
PanelOrientation orientation,
int strut_size,
int strut_start,
- int strut_end,
- gint scale);
+ int strut_end);
void panel_struts_unregister_strut (PanelToplevel *toplevel);
diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c
index 512bcbea..f9845f0d 100644
--- a/mate-panel/panel-toplevel.c
+++ b/mate-panel/panel-toplevel.c
@@ -1517,10 +1517,6 @@ static gboolean panel_toplevel_update_struts(PanelToplevel* toplevel, gboolean e
}
}
- /* Adjust strut size based on scale factor */
- if (strut > 0)
- strut += toplevel->priv->size * (toplevel->priv->scale - 1);
-
if (orientation != toplevel->priv->orientation) {
toplevel->priv->orientation = orientation;
g_object_notify (G_OBJECT (toplevel), "orientation");
@@ -1540,8 +1536,7 @@ static gboolean panel_toplevel_update_struts(PanelToplevel* toplevel, gboolean e
orientation,
strut,
strut_start,
- strut_end,
- toplevel->priv->scale);
+ strut_end);
}
else {
panel_struts_unregister_strut (toplevel);
diff --git a/mate-panel/panel-xutils.c b/mate-panel/panel-xutils.c
index eb887e71..5331ff59 100644
--- a/mate-panel/panel-xutils.c
+++ b/mate-panel/panel-xutils.c
@@ -92,6 +92,10 @@ panel_xutils_set_strut (GdkWindow *gdk_window,
if (gnome_wm_strut_area == None)
gnome_wm_strut_area = XInternAtom (xdisplay, "_GNOME_WM_STRUT_AREA", False);
+ strut *= scale;
+ strut_start *= scale;
+ strut_end *= scale;
+
switch (orientation) {
case PANEL_ORIENTATION_LEFT:
struts [STRUT_LEFT] = strut;