Alexandre Julliard : winex11.drv: Implemented DESKTOPHORZ/ VERTRES device caps.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Dec 12 08:42:12 CST 2006


Module: wine
Branch: master
Commit: 21635133fb271405fefd6bce3078cf971e84c426
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=21635133fb271405fefd6bce3078cf971e84c426

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Dec 12 14:59:55 2006 +0100

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 644bd13..5010bdf 100644
--- a/dlls/gdi32/dc.c
+++ b/dlls/gdi32/dc.c
@@ -647,8 +647,8 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LP
         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 c33301a..cf23866 100644
--- a/dlls/winex11.drv/init.c
+++ b/dlls/winex11.drv/init.c
@@ -194,6 +194,10 @@ INT X11DRV_GetDeviceCaps( X11DRV_PDEVICE
         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
     case SCALINGFACTORX:
     case SCALINGFACTORY:
     case VREFRESH:
-    case DESKTOPVERTRES:
-    case DESKTOPHORZRES:
     case BLTALIGNMENT:
         return 0;
     default:




More information about the wine-cvs mailing list