Skip to content

Commit

Permalink
HACK: winex11: Drop X11DRV_GetCursorPos entirely.
Browse files Browse the repository at this point in the history
CW-Bug-Id: #22849
  • Loading branch information
rbernon committed Nov 29, 2023
1 parent d8766d0 commit 0f81e22
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.
1 change: 0 additions & 1 deletion dlls/winex11.drv/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ static const struct user_driver_funcs x11drv_funcs =
.pNotifyIMEStatus = X11DRV_NotifyIMEStatus,
.pDestroyCursorIcon = X11DRV_DestroyCursorIcon,
.pSetCursor = X11DRV_SetCursor,
.pGetCursorPos = X11DRV_GetCursorPos,
.pSetCursorPos = X11DRV_SetCursorPos,
.pClipCursor = X11DRV_ClipCursor,
.pChangeDisplaySettings = X11DRV_ChangeDisplaySettings,
Expand Down
25 changes: 0 additions & 25 deletions dlls/winex11.drv/mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1480,31 +1480,6 @@ BOOL X11DRV_SetCursorPos( INT x, INT y )
return TRUE;
}

/***********************************************************************
* GetCursorPos (X11DRV.@)
*/
BOOL X11DRV_GetCursorPos(LPPOINT pos)
{
Display *display = thread_init_display();
LARGE_INTEGER timeout = {0};
Window root, child;
int rootX, rootY, winX, winY;
unsigned int xstate;
BOOL ret;

if (NtWaitForSingleObject(steam_overlay_event, FALSE, &timeout) == WAIT_OBJECT_0) return TRUE;
if (NtWaitForSingleObject(steam_keyboard_event, FALSE, &timeout) == WAIT_OBJECT_0) return TRUE;

ret = XQueryPointer( display, root_window, &root, &child, &rootX, &rootY, &winX, &winY, &xstate );
if (ret)
{
POINT old = *pos;
*pos = root_to_virtual_screen( winX, winY );
TRACE( "pointer at %s server pos %s\n", wine_dbgstr_point(pos), wine_dbgstr_point(&old) );
}
return ret;
}

/***********************************************************************
* ClipCursor (X11DRV.@)
*/
Expand Down
1 change: 0 additions & 1 deletion dlls/winex11.drv/x11drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ extern void X11DRV_NotifyIMEStatus( HWND hwnd, UINT status ) DECLSPEC_HIDDEN;
extern void X11DRV_DestroyCursorIcon( HCURSOR handle ) DECLSPEC_HIDDEN;
extern void X11DRV_SetCursor( HWND hwnd, HCURSOR handle ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_SetCursorPos( INT x, INT y ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_GetCursorPos( LPPOINT pos ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_ClipCursor( const RECT *clip, BOOL reset ) DECLSPEC_HIDDEN;
extern LONG X11DRV_ChangeDisplaySettings( LPDEVMODEW displays, LPCWSTR primary_name, HWND hwnd, DWORD flags, LPVOID lpvoid ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_GetCurrentDisplaySettings( LPCWSTR name, BOOL is_primary, LPDEVMODEW devmode ) DECLSPEC_HIDDEN;
Expand Down

0 comments on commit 0f81e22

Please sign in to comment.