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.
This commit is contained in:
Luca Bacci
2021-09-23 14:34:51 +02:00
parent 8d04980f38
commit cac1c7cd22

View File

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