From 8c9f71424126ce7bf7aa6f6b4ba36ef611934db4 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Sun, 23 May 2021 15:37:01 +0200 Subject: panel-xutils: make sure struts are in device pixels origin commit: https://gitlab.gnome.org/GNOME/gnome-panel/-/commit/e85b2d2 --- mate-panel/panel-xutils.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mate-panel/panel-xutils.c b/mate-panel/panel-xutils.c index 22e9ce78..fb7bacbe 100644 --- a/mate-panel/panel-xutils.c +++ b/mate-panel/panel-xutils.c @@ -29,6 +29,7 @@ #endif #include "panel-xutils.h" +#include "panel-util.h" #include #include @@ -65,6 +66,7 @@ panel_xutils_set_strut (GdkWindow *gdk_window, { Display *xdisplay; Window window; + int window_scale; gulong struts [12] = { 0, }; gulong area[4] = { 0, }; GdkDisplay *display; @@ -82,6 +84,8 @@ panel_xutils_set_strut (GdkWindow *gdk_window, if (gnome_wm_strut_area == None) gnome_wm_strut_area = XInternAtom (xdisplay, "_GNOME_WM_STRUT_AREA", False); + window_scale = panel_util_get_window_scaling_factor (); + switch (orientation) { case PANEL_ORIENTATION_LEFT: struts [STRUT_LEFT] = strut; @@ -105,10 +109,10 @@ panel_xutils_set_strut (GdkWindow *gdk_window, break; } - area[0] = rect->x; - area[1] = rect->y; - area[2] = rect->width; - area[3] = rect->height; + area[0] = rect->x * window_scale; + area[1] = rect->y * window_scale; + area[2] = rect->width * window_scale; + area[3] = rect->height * window_scale; display = gdk_window_get_display (gdk_window); gdk_x11_display_error_trap_push (display); -- cgit v1.2.1