[gtk/gtk-3-24: 1/4] GdkWin32: Use a signed integral type for the DPI scale




commit cac1c7cd22641b90e10cdc36f1c979e357cc5f35
Author: Luca Bacci <luca bacci982 gmail com>
Date:   Thu Sep 23 14:34:51 2021 +0200

    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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]