From 6fb59ed086392a4d4b5eecc548e762bd7b38b818 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Tue, 16 Dec 2008 17:09:20 -0600 Subject: [PATCH] winex11.drv: add a user function SetWorkArea --- dlls/winex11.drv/winex11.drv.spec | 1 + dlls/winex11.drv/xinerama.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec index fdd32b3..112db4c 100644 --- a/dlls/winex11.drv/winex11.drv.spec +++ b/dlls/winex11.drv/winex11.drv.spec @@ -86,6 +86,7 @@ @ cdecl EnumDisplayMonitors(long ptr ptr long) X11DRV_EnumDisplayMonitors @ cdecl EnumDisplaySettingsEx(ptr long ptr long) X11DRV_EnumDisplaySettingsEx @ cdecl GetMonitorInfo(long ptr) X11DRV_GetMonitorInfo +@ cdecl SetWorkArea(ptr) X11DRV_SetWorkArea @ cdecl AcquireClipboard(long) X11DRV_AcquireClipboard @ cdecl CountClipboardFormats() X11DRV_CountClipboardFormats @ cdecl CreateDesktopWindow(long) X11DRV_CreateDesktopWindow diff --git a/dlls/winex11.drv/xinerama.c b/dlls/winex11.drv/xinerama.c index 0850026..ad5d496 100644 --- a/dlls/winex11.drv/xinerama.c +++ b/dlls/winex11.drv/xinerama.c @@ -260,3 +260,23 @@ BOOL X11DRV_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPA } return TRUE; } + +/*********************************************************************** + * X11DRV_SetWorkArea (X11DRV.@) + */ +BOOL X11DRV_SetWorkArea( RECT *rcWork ) +{ + int i; + RECT intersection; + + for (i = 0; i < nb_monitors; i++) + { + if (!IntersectRect(&intersection, rcWork, &monitors[i].rcMonitor)) continue; + if (!EqualRect(&intersection, rcWork)) return FALSE; + monitors[i].rcWork = *rcWork; + return TRUE; + } + + return FALSE; +} + -- 1.5.6.3