SimpleView.st
changeset 2583 0f2e785bf844
parent 2579 774e6fb33dde
child 2584 55a405cec086
--- a/SimpleView.st	Sat Apr 24 16:20:57 1999 +0200
+++ b/SimpleView.st	Sat Apr 24 17:48:38 1999 +0200
@@ -5400,18 +5400,28 @@
     "grab the pointer - that is: report all motion events relative to
      myself, even if moved out of myself."
 
-    |sensor|
-
-    (sensor := self sensor) notNil ifTrue:[
-	"/ make certain all X events have been received
-	device sync.
-	"/ now all events have been received.
-	"/ now, flush all pointer events
-	sensor flushMotionEventsFor:nil
-    ].
-
-    device grabPointerIn:drawableId.
-
+    self grabPointerWithCursor:nil
+!
+
+grabPointerWithCursor:aCursorOrNil
+    "grab the pointer - that is: report all motion events relative to
+     myself, even if moved out of myself.
+     Show aCursor if the aargument is not nil."
+
+    |sensor cursorId|
+
+"/    (sensor := self sensor) notNil ifTrue:[
+"/        "/ make certain all X events have been received
+"/        device sync.
+"/        "/ now all events have been received.
+"/        "/ now, flush all pointer events
+"/        sensor flushMotionEventsFor:nil
+"/    ].
+
+    aCursorOrNil notNil ifTrue:[
+        cursorId := (aCursorOrNil onDevice:device) id.
+    ].
+    device grabPointerIn:drawableId withCursor:cursorId
 !
 
 ungrabPointer
@@ -8057,6 +8067,6 @@
 !SimpleView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.308 1999-04-23 17:39:48 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.309 1999-04-24 15:48:38 cg Exp $'
 ! !
 SimpleView initialize!