Fwd: wined3d: Update cursor position on ShowCursor
Erich Hoover
ehoover at mines.edu
Thu Mar 8 15:08:12 CST 2007
Skipped content of type multipart/alternative-------------- next part --------------
From 0f41458d921e6fbcb0a6c4dec69589bc56898c93 Mon Sep 17 00:00:00 2001
From: Erich Hoover <ehoover at mediaserver.(none)>
Date: Sat, 3 Mar 2007 18:43:11 -0700
Subject: wined3d: Update cursor position on ShowCursor
---
dlls/wined3d/device.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 0ad2c47..f536dd2 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -5246,10 +5246,20 @@ static void WINAPI IWineD3DDeviceIm
static BOOL WINAPI IWineD3DDeviceImpl_ShowCursor(IWineD3DDevice* iface, BOOL bShow) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
BOOL oldVisible = This->bCursorVisible;
+ POINT pt;
+
TRACE("(%p) : visible(%d)\n", This, bShow);
if(This->cursorTexture)
This->bCursorVisible = bShow;
+ /*
+ * When ShowCursor is first called it should make the cursor appear at the OS's last
+ * known cursor position. Because of this, some applications just repetitively call
+ * ShowCursor in order to update the cursor's position. This behavior is undocumented.
+ */
+ GetCursorPos(&pt);
+ This->xScreenSpace = pt.x;
+ This->yScreenSpace = pt.y;
return oldVisible;
}
--
1.4.1
More information about the wine-devel
mailing list