Alexandre Julliard : winex11: Simplify the EnumDisplayMonitors driver entry point.
Alexandre Julliard
julliard at winehq.org
Thu Aug 23 16:37:03 CDT 2018
Module: wine
Branch: master
Commit: 341192289b0c22bcdfd70af827b9a11cff555836
URL: https://source.winehq.org/git/wine.git/?a=commit;h=341192289b0c22bcdfd70af827b9a11cff555836
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Aug 23 10:53:27 2018 +0200
winex11: Simplify the EnumDisplayMonitors driver entry point.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winex11.drv/xinerama.c | 30 ++----------------------------
1 file changed, 2 insertions(+), 28 deletions(-)
diff --git a/dlls/winex11.drv/xinerama.c b/dlls/winex11.drv/xinerama.c
index 0419535..739b139 100644
--- a/dlls/winex11.drv/xinerama.c
+++ b/dlls/winex11.drv/xinerama.c
@@ -267,34 +267,8 @@ BOOL CDECL X11DRV_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC pro
{
int i;
- if (hdc)
- {
- POINT origin;
- RECT limit;
-
- if (!GetDCOrgEx( hdc, &origin )) return FALSE;
- if (GetClipBox( hdc, &limit ) == ERROR) return FALSE;
-
- if (rect && !IntersectRect( &limit, &limit, rect )) return TRUE;
+ for (i = 0; i < nb_monitors; i++)
+ if (!proc( index_to_monitor(i), 0, &monitors[i].rcMonitor, lp )) return FALSE;
- for (i = 0; i < nb_monitors; i++)
- {
- RECT monrect = monitors[i].rcMonitor;
- OffsetRect( &monrect, -origin.x, -origin.y );
- if (IntersectRect( &monrect, &monrect, &limit ))
- if (!proc( index_to_monitor(i), hdc, &monrect, lp ))
- return FALSE;
- }
- }
- else
- {
- for (i = 0; i < nb_monitors; i++)
- {
- RECT unused;
- if (!rect || IntersectRect( &unused, &monitors[i].rcMonitor, rect ))
- if (!proc( index_to_monitor(i), 0, &monitors[i].rcMonitor, lp ))
- return FALSE;
- }
- }
return TRUE;
}
More information about the wine-cvs
mailing list