open-src/xserver/xorg/sun-src/tsol/tsolpolicy.c
changeset 705 24ca414edbff
parent 679 5f3986f48115
child 799 a7ff35c8968f
--- a/open-src/xserver/xorg/sun-src/tsol/tsolpolicy.c	Thu May 14 20:00:54 2009 -0700
+++ b/open-src/xserver/xorg/sun-src/tsol/tsolpolicy.c	Fri May 15 09:36:46 2009 -0700
@@ -26,7 +26,7 @@
  * of the copyright holder.
  */
 
-#pragma ident   "@(#)tsolpolicy.c 1.26     09/04/02 SMI"
+#pragma ident   "@(#)tsolpolicy.c 1.27     09/05/15 SMI"
 
 #ifdef HAVE_DIX_CONFIG_H
 #include <dix-config.h>
@@ -2129,6 +2129,7 @@
 	ClientPtr client = subject;
 	TsolInfoPtr tsolinfo = GetClientTsolInfo(client);
 	TsolResPtr tsolres;
+	DeviceIntPtr device = PickPointer(client);
 
 	/*
 	 * Allow pointer grab on root window, as long as
@@ -2138,7 +2139,7 @@
 
 	if (WindowIsRoot(pWin))
 	{
-		pWin = TsolPointerWindow();
+		pWin = GetSpriteWindow(device);
 		if (WindowIsRoot(pWin))
 			return (PASSED);
 	}
@@ -2564,6 +2565,8 @@
 	TsolResPtr tsolres = TsolWindowPriv(pWin);
 #if 0
 	GrabPtr grab;
+	DeviceIntPtr    keybd = inputInfo.keyboard;
+	DeviceIntPtr    mouse = inputInfo.pointer;
 #endif
 
 	/*
@@ -2633,9 +2636,9 @@
 	 * If ptr/kbd is grabbed, then this client must be
 	 * the grabbing client
 	 */
-	grab = inputInfo.pointer->grab;
+	grab = mouse->grab;
 	if (grab == NULL)
-		grab = inputInfo.keyboard->grab;
+		grab = keybd->grab;
 	if (grab)
 	{
 		if (!SameClient(grab, client))