aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-23 21:04:04 +0000
committermarha <marha@users.sourceforge.net>2009-09-23 21:04:04 +0000
commitf02db4f3b9d748e1fd06e3ae2985b9cf1547cc7e (patch)
tree9e7288242a4db8942c80ea1b64d4df3ce0f3b4c3 /xorg-server/hw/xwin
parent10c7b1d5bacbb84626a19d6de93175c8784b9d1e (diff)
downloadvcxsrv-f02db4f3b9d748e1fd06e3ae2985b9cf1547cc7e.tar.gz
vcxsrv-f02db4f3b9d748e1fd06e3ae2985b9cf1547cc7e.tar.bz2
vcxsrv-f02db4f3b9d748e1fd06e3ae2985b9cf1547cc7e.zip
Put global pointers to the mouse and keyboard device back to NULL after they have been closed.
Diffstat (limited to 'xorg-server/hw/xwin')
-rw-r--r--xorg-server/hw/xwin/InitInput.c7
-rw-r--r--xorg-server/hw/xwin/winwndproc.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/xorg-server/hw/xwin/InitInput.c b/xorg-server/hw/xwin/InitInput.c
index 1e9bcad7a..d9b6ec84c 100644
--- a/xorg-server/hw/xwin/InitInput.c
+++ b/xorg-server/hw/xwin/InitInput.c
@@ -67,6 +67,13 @@ extern winDispatchProcPtr winProcQueryTreeOrig;
#endif
+void InputDevicesClosed(void)
+{
+ g_pwinPointer=NULL;
+ g_pwinKeyboard=NULL;
+}
+
+
/* Called from dix/devices.c */
/*
* All of our keys generate up and down transition notifications,
diff --git a/xorg-server/hw/xwin/winwndproc.c b/xorg-server/hw/xwin/winwndproc.c
index c0cdba7a4..8decde864 100644
--- a/xorg-server/hw/xwin/winwndproc.c
+++ b/xorg-server/hw/xwin/winwndproc.c
@@ -722,7 +722,7 @@ winWindowProc (HWND hwnd, UINT message,
break;
/* Has the mouse pointer crossed screens? */
- if (s_pScreen != miPointerGetScreen(g_pwinPointer))
+ if (g_pwinPointer && s_pScreen != miPointerGetScreen(g_pwinPointer))
miPointerSetScreen (g_pwinPointer, s_pScreenInfo->dwScreen,
GET_X_LPARAM(lParam)-s_pScreenInfo->dwXOffset,
GET_Y_LPARAM(lParam)-s_pScreenInfo->dwYOffset);