Jacek Caban : winex11: Remove no longer needed helpers.

Alexandre Julliard julliard at winehq.org
Wed Apr 13 15:14:45 CDT 2022


Module: wine
Branch: master
Commit: 523a6eba0250e734a30b9310ab694e2a2af6d6ca
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=523a6eba0250e734a30b9310ab694e2a2af6d6ca

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Apr 13 15:08:36 2022 +0200

winex11: Remove no longer needed helpers.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winex11.drv/desktop.c | 10 +++++-----
 dlls/winex11.drv/display.c | 18 ++++--------------
 dlls/winex11.drv/init.c    |  2 +-
 dlls/winex11.drv/mouse.c   |  6 +++---
 dlls/winex11.drv/window.c  |  6 +++---
 dlls/winex11.drv/x11drv.h  |  4 +---
 6 files changed, 17 insertions(+), 29 deletions(-)

diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c
index 0ac538d06ed..a89824772d0 100644
--- a/dlls/winex11.drv/desktop.c
+++ b/dlls/winex11.drv/desktop.c
@@ -118,7 +118,7 @@ static BOOL X11DRV_desktop_get_modes( ULONG_PTR id, DWORD flags, DEVMODEW **new_
     RECT primary_rect;
     DEVMODEW *modes;
 
-    primary_rect = get_primary_monitor_rect();
+    primary_rect = NtUserGetPrimaryMonitorRect();
     screen_width = primary_rect.right - primary_rect.left;
     screen_height = primary_rect.bottom - primary_rect.top;
 
@@ -166,7 +166,7 @@ static void X11DRV_desktop_free_modes( DEVMODEW *modes )
 
 static BOOL X11DRV_desktop_get_current_mode( ULONG_PTR id, DEVMODEW *mode )
 {
-    RECT primary_rect = get_primary_monitor_rect();
+    RECT primary_rect = NtUserGetPrimaryMonitorRect();
 
     mode->dmFields = DM_DISPLAYORIENTATION | DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT |
                      DM_DISPLAYFLAGS | DM_DISPLAYFREQUENCY | DM_POSITION;
@@ -374,7 +374,7 @@ BOOL CDECL X11DRV_create_desktop( UINT width, UINT height )
 
 BOOL is_desktop_fullscreen(void)
 {
-    RECT primary_rect = get_primary_monitor_rect();
+    RECT primary_rect = NtUserGetPrimaryMonitorRect();
     return (primary_rect.right - primary_rect.left == max_width &&
             primary_rect.bottom - primary_rect.top == max_height);
 }
@@ -421,8 +421,8 @@ void X11DRV_resize_desktop( BOOL send_display_change )
     HWND hwnd = GetDesktopWindow();
     INT width, height;
 
-    virtual_rect = get_virtual_screen_rect();
-    primary_rect = get_primary_monitor_rect();
+    virtual_rect = NtUserGetVirtualScreenRect();
+    primary_rect = NtUserGetPrimaryMonitorRect();
     width = primary_rect.right;
     height = primary_rect.bottom;
 
diff --git a/dlls/winex11.drv/display.c b/dlls/winex11.drv/display.c
index 77b3d9e303c..87287854044 100644
--- a/dlls/winex11.drv/display.c
+++ b/dlls/winex11.drv/display.c
@@ -44,7 +44,7 @@ void release_display_device_init_mutex(HANDLE mutex)
 
 POINT virtual_screen_to_root(INT x, INT y)
 {
-    RECT virtual = get_virtual_screen_rect();
+    RECT virtual = NtUserGetVirtualScreenRect();
     POINT pt;
 
     pt.x = x - virtual.left;
@@ -54,7 +54,7 @@ POINT virtual_screen_to_root(INT x, INT y)
 
 POINT root_to_virtual_screen(INT x, INT y)
 {
-    RECT virtual = get_virtual_screen_rect();
+    RECT virtual = NtUserGetVirtualScreenRect();
     POINT pt;
 
     pt.x = x + virtual.left;
@@ -62,16 +62,6 @@ POINT root_to_virtual_screen(INT x, INT y)
     return pt;
 }
 
-RECT get_virtual_screen_rect(void)
-{
-    return NtUserGetVirtualScreenRect();
-}
-
-RECT get_primary_monitor_rect(void)
-{
-    return NtUserGetPrimaryMonitorRect();
-}
-
 /* Get the primary monitor rect from the host system */
 RECT get_host_primary_monitor_rect(void)
 {
@@ -214,9 +204,9 @@ void X11DRV_DisplayDevices_Update(BOOL send_display_change)
     HWND foreground;
     UINT mask = 0;
 
-    old_virtual_rect = get_virtual_screen_rect();
+    old_virtual_rect = NtUserGetVirtualScreenRect();
     X11DRV_DisplayDevices_Init(TRUE);
-    new_virtual_rect = get_virtual_screen_rect();
+    new_virtual_rect = NtUserGetVirtualScreenRect();
 
     /* Calculate XReconfigureWMWindow() mask */
     if (old_virtual_rect.left != new_virtual_rect.left)
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c
index 6f24e1bf370..8f4bb9fd7e9 100644
--- a/dlls/winex11.drv/init.c
+++ b/dlls/winex11.drv/init.c
@@ -91,7 +91,7 @@ static BOOL CDECL X11DRV_CreateDC( PHYSDEV *pdev, LPCWSTR device, LPCWSTR output
 
     physDev->depth         = default_visual.depth;
     physDev->color_shifts  = &X11DRV_PALETTE_default_shifts;
-    physDev->dc_rect       = get_virtual_screen_rect();
+    physDev->dc_rect       = NtUserGetVirtualScreenRect();
     OffsetRect( &physDev->dc_rect, -physDev->dc_rect.left, -physDev->dc_rect.top );
     push_dc_driver( pdev, &physDev->dev, &x11drv_funcs.dc_funcs );
     if (xrender_funcs && !xrender_funcs->pCreateDC( pdev, device, output, initData )) return FALSE;
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index 895928c4a31..65e04d6cab5 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -562,7 +562,7 @@ BOOL clip_fullscreen_window( HWND hwnd, BOOL reset )
     if (!GetMonitorInfoW( monitor, &monitor_info )) return FALSE;
     if (!grab_fullscreen)
     {
-        RECT virtual_rect = get_virtual_screen_rect();
+        RECT virtual_rect = NtUserGetVirtualScreenRect();
         if (!EqualRect( &monitor_info.rcMonitor, &virtual_rect )) return FALSE;
         if (is_virtual_desktop()) return FALSE;
     }
@@ -1540,7 +1540,7 @@ BOOL X11DRV_GetCursorPos(LPPOINT pos)
  */
 BOOL X11DRV_ClipCursor( LPCRECT clip )
 {
-    RECT virtual_rect = get_virtual_screen_rect();
+    RECT virtual_rect = NtUserGetVirtualScreenRect();
 
     if (!clip) clip = &virtual_rect;
 
@@ -1853,7 +1853,7 @@ static BOOL map_raw_event_coords( XIRawEvent *event, INPUT *input )
     }
     if (event->deviceid != thread_data->xi2_current_slave) return FALSE;
 
-    virtual_rect = get_virtual_screen_rect();
+    virtual_rect = NtUserGetVirtualScreenRect();
 
     if (x->max <= x->min) x_scale = 1;
     else x_scale = (virtual_rect.right - virtual_rect.left) / (x->max - x->min);
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index b3202847bb7..1803a546dad 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -1836,7 +1836,7 @@ BOOL X11DRV_CreateDesktopWindow( HWND hwnd )
 
     if (!width && !height)  /* not initialized yet */
     {
-        RECT rect = get_virtual_screen_rect();
+        RECT rect = NtUserGetVirtualScreenRect();
 
         SERVER_START_REQ( set_window_pos )
         {
@@ -2205,7 +2205,7 @@ void X11DRV_ReleaseDC( HWND hwnd, HDC hdc )
     escape.code = X11DRV_SET_DRAWABLE;
     escape.drawable = root_window;
     escape.mode = IncludeInferiors;
-    escape.dc_rect = get_virtual_screen_rect();
+    escape.dc_rect = NtUserGetVirtualScreenRect();
     OffsetRect( &escape.dc_rect, -2 * escape.dc_rect.left, -2 * escape.dc_rect.top );
     NtGdiExtEscape( hdc, NULL, 0, X11DRV_ESCAPE, sizeof(escape), (LPSTR)&escape, 0, NULL );
 }
@@ -2320,7 +2320,7 @@ done:
 
 static inline BOOL get_surface_rect( const RECT *visible_rect, RECT *surface_rect )
 {
-    *surface_rect = get_virtual_screen_rect();
+    *surface_rect = NtUserGetVirtualScreenRect();
 
     if (!IntersectRect( surface_rect, surface_rect, visible_rect )) return FALSE;
     OffsetRect( surface_rect, -visible_rect->left, -visible_rect->top );
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 2112980aab5..83da0a88bd7 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -699,8 +699,6 @@ extern void X11DRV_X_to_window_rect( struct x11drv_win_data *data, RECT *rect, i
 extern BOOL is_window_rect_full_screen( const RECT *rect ) DECLSPEC_HIDDEN;
 extern POINT virtual_screen_to_root( INT x, INT y ) DECLSPEC_HIDDEN;
 extern POINT root_to_virtual_screen( INT x, INT y ) DECLSPEC_HIDDEN;
-extern RECT get_virtual_screen_rect(void) DECLSPEC_HIDDEN;
-extern RECT get_primary_monitor_rect(void) DECLSPEC_HIDDEN;
 extern RECT get_host_primary_monitor_rect(void) DECLSPEC_HIDDEN;
 extern RECT get_work_area( const RECT *monitor_rect ) DECLSPEC_HIDDEN;
 extern void xinerama_init( unsigned int width, unsigned int height ) DECLSPEC_HIDDEN;
@@ -833,7 +831,7 @@ extern void X11DRV_SetPreeditState(HWND hwnd, BOOL fOpen) DECLSPEC_HIDDEN;
 
 static inline BOOL is_window_rect_mapped( const RECT *rect )
 {
-    RECT virtual_rect = get_virtual_screen_rect();
+    RECT virtual_rect = NtUserGetVirtualScreenRect();
     return (rect->left < virtual_rect.right &&
             rect->top < virtual_rect.bottom &&
             max( rect->right, rect->left + 1 ) > virtual_rect.left &&




More information about the wine-cvs mailing list