From 21635133fb271405fefd6bce3078cf971e84c426 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 12 Dec 2006 14:59:55 +0100 Subject: [PATCH] winex11.drv: Implemented DESKTOPHORZ/VERTRES device caps. --- dlls/gdi32/dc.c | 4 ++-- dlls/winex11.drv/init.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 644bd13bdf6..5010bdf621c 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -647,8 +647,8 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output, return 0; } - dc->hVisRgn = CreateRectRgn( 0, 0, GetDeviceCaps( hdc, HORZRES ), - GetDeviceCaps( hdc, VERTRES ) ); + dc->hVisRgn = CreateRectRgn( 0, 0, GetDeviceCaps( hdc, DESKTOPHORZRES ), + GetDeviceCaps( hdc, DESKTOPVERTRES ) ); DC_InitDC( dc ); GDI_ReleaseObj( hdc ); diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index c33301aa418..cf23866debe 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -194,6 +194,10 @@ INT X11DRV_GetDeviceCaps( X11DRV_PDEVICE *physDev, INT cap ) return screen_width; case VERTRES: return screen_height; + case DESKTOPHORZRES: + return virtual_screen_rect.right - virtual_screen_rect.left; + case DESKTOPVERTRES: + return virtual_screen_rect.bottom - virtual_screen_rect.top; case BITSPIXEL: return screen_depth; case PLANES: @@ -258,8 +262,6 @@ INT X11DRV_GetDeviceCaps( X11DRV_PDEVICE *physDev, INT cap ) case SCALINGFACTORX: case SCALINGFACTORY: case VREFRESH: - case DESKTOPVERTRES: - case DESKTOPHORZRES: case BLTALIGNMENT: return 0; default: