Signed-off-by: Jacek Caban jacek@codeweavers.com --- dlls/winex11.drv/window.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-)
On 4/19/22 21:30, Jacek Caban wrote:
Signed-off-by: Jacek Caban jacek@codeweavers.com
dlls/winex11.drv/window.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-)
0003-winex11-Use-NtUserGetVirtualScreenRect-for-is_window_r.txt
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 4c4e47884ff..4a08921d5c8 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -284,32 +284,11 @@ static inline BOOL is_window_resizable( struct x11drv_win_data *data, DWORD styl return is_window_rect_full_screen( &data->whole_rect ); }
-struct monitor_info -{
- const RECT *rect;
- BOOL full_screen;
-};
-static BOOL CALLBACK enum_monitor_proc( HMONITOR monitor, HDC hdc, RECT *monitor_rect, LPARAM lparam ) -{
- struct monitor_info *info = (struct monitor_info *)lparam;
- if (info->rect->left <= monitor_rect->left && info->rect->right >= monitor_rect->right &&
info->rect->top <= monitor_rect->top && info->rect->bottom >= monitor_rect->bottom)
- {
info->full_screen = TRUE;
return FALSE;
- }
- return TRUE;
-}
BOOL is_window_rect_full_screen( const RECT *rect ) {
- struct monitor_info info = {rect, FALSE};
- EnumDisplayMonitors( NULL, NULL, enum_monitor_proc, (LPARAM)&info );
- return info.full_screen;
- RECT work_rect = NtUserGetVirtualScreenRect();
- return rect->left <= work_rect.left && rect->right >= work_rect.right &&
rect->top <= work_rect.top && rect->bottom >= work_rect.bottom;
}
Hi Jacek,
I don't think this is correct for multi-monitor cases. is_window_rect_full_screen() should return TRUE if it covers any one of the monitors. With this change, it only returns TRUE if it covers all of the monitors.
Thanks, Zhiyi
/***********************************************************************
On 4/19/22 16:14, Zhiyi Zhang wrote:
On 4/19/22 21:30, Jacek Caban wrote:
Signed-off-by: Jacek Cabanjacek@codeweavers.com
dlls/winex11.drv/window.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-)
0003-winex11-Use-NtUserGetVirtualScreenRect-for-is_window_r.txt
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 4c4e47884ff..4a08921d5c8 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -284,32 +284,11 @@ static inline BOOL is_window_resizable( struct x11drv_win_data *data, DWORD styl return is_window_rect_full_screen( &data->whole_rect ); }
-struct monitor_info -{
- const RECT *rect;
- BOOL full_screen;
-};
-static BOOL CALLBACK enum_monitor_proc( HMONITOR monitor, HDC hdc, RECT *monitor_rect, LPARAM lparam ) -{
- struct monitor_info *info = (struct monitor_info *)lparam;
- if (info->rect->left <= monitor_rect->left && info->rect->right >= monitor_rect->right &&
info->rect->top <= monitor_rect->top && info->rect->bottom >= monitor_rect->bottom)
- {
info->full_screen = TRUE;
return FALSE;
- }
- return TRUE;
-}
- BOOL is_window_rect_full_screen( const RECT *rect ) {
- struct monitor_info info = {rect, FALSE};
- EnumDisplayMonitors( NULL, NULL, enum_monitor_proc, (LPARAM)&info );
- return info.full_screen;
- RECT work_rect = NtUserGetVirtualScreenRect();
- return rect->left <= work_rect.left && rect->right >= work_rect.right &&
}rect->top <= work_rect.top && rect->bottom >= work_rect.bottom;
Hi Jacek,
I don't think this is correct for multi-monitor cases. is_window_rect_full_screen() should return TRUE if it covers any one of the monitors. With this change, it only returns TRUE if it covers all of the monitors.
Oh, right, I messed it up. Let's skip this patch for now.
Thanks,
Jacek