From cac1c7cd22641b90e10cdc36f1c979e357cc5f35 Mon Sep 17 00:00:00 2001 From: Luca Bacci Date: Thu, 23 Sep 2021 14:34:51 +0200 Subject: [PATCH] GdkWin32: Use a signed integral type for the DPI scale An arithmetic operation involving a signed and an unsigned operand of the same rank will have both operands converted to *unsigned*. That's an issue if the signed operand actually has a negative value. That was causing issues with the handling of monitor geometries that had negative x / y positions. --- gdk/win32/gdkmonitor-win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdk/win32/gdkmonitor-win32.c b/gdk/win32/gdkmonitor-win32.c index da7aff708f..771763c4ee 100644 --- a/gdk/win32/gdkmonitor-win32.c +++ b/gdk/win32/gdkmonitor-win32.c @@ -618,7 +618,7 @@ enum_monitor (HMONITOR hmonitor, GdkWin32Monitor *w32mon; GdkMonitor *mon; GdkRectangle rect; - guint scale; + int scale; memset (&dd_monitor, 0, sizeof (dd_monitor)); dd_monitor.cb = sizeof (dd_monitor);