[PATCH 5/7] winex11.drv: Use POINT to keep offset.
Zhiyi Zhang
zzhang at codeweavers.com
Thu Oct 3 02:54:49 CDT 2019
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
dlls/winex11.drv/xinerama.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/winex11.drv/xinerama.c b/dlls/winex11.drv/xinerama.c
index dacc59fefb..eeb49b1af0 100644
--- a/dlls/winex11.drv/xinerama.c
+++ b/dlls/winex11.drv/xinerama.c
@@ -290,8 +290,8 @@ void xinerama_init( unsigned int width, unsigned int height )
{
struct x11drv_display_device_handler handler;
MONITORINFOEXW *primary;
+ POINT offset;
int i;
- RECT rect;
if (is_virtual_desktop())
return;
@@ -308,12 +308,12 @@ void xinerama_init( unsigned int width, unsigned int height )
primary = get_primary();
/* coordinates (0,0) have to point to the primary monitor origin */
- SetRect( &rect, 0, 0, width, height );
- OffsetRect( &rect, -primary->rcMonitor.left, -primary->rcMonitor.top );
+ offset.x = -primary->rcMonitor.left;
+ offset.y = -primary->rcMonitor.top;
for (i = 0; i < nb_monitors; i++)
{
- OffsetRect( &monitors[i].rcMonitor, rect.left, rect.top );
- OffsetRect( &monitors[i].rcWork, rect.left, rect.top );
+ OffsetRect( &monitors[i].rcMonitor, offset.x, offset.y );
+ OffsetRect( &monitors[i].rcWork, offset.x, offset.y );
TRACE( "monitor 0x%x: %s work %s%s\n",
i, wine_dbgstr_rect(&monitors[i].rcMonitor),
wine_dbgstr_rect(&monitors[i].rcWork),
--
2.23.0
More information about the wine-devel
mailing list