WindowSensor.st
branchdelegated_gc_jv
changeset 6820 9b52c1a1675a
parent 6819 f91377f97414
child 6822 a644e4e3eabc
--- a/WindowSensor.st	Tue Mar 03 03:55:48 2015 +0000
+++ b/WindowSensor.st	Tue Mar 03 12:29:31 2015 +0000
@@ -11,6 +11,8 @@
 "
 "{ Package: 'stx:libview' }"
 
+"{ NameSpace: Smalltalk }"
+
 Object subclass:#WindowSensor
 	instanceVariableNames:'eventSemaphore damage mouseAndKeyboard compressMotionEvents
 		ignoreUserInput exposeEventSemaphore catchExpose gotExpose
@@ -219,14 +221,6 @@
         WindowEvent KeyboardMap KeyboardForwarder EventListener
         GraphicsDevice DeviceWorkstation View
 "
-!
-
-version
-    ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.292 2015-02-05 08:54:11 cg Exp $'
-!
-
-version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.292 2015-02-05 08:54:11 cg Exp $'
 ! !
 
 !WindowSensor class methodsFor:'initialization'!
@@ -2494,6 +2488,19 @@
 
 !WindowSensor methodsFor:'event simulation'!
 
+enqueueMessage:selector for:someone arguments:argList
+    "/
+    "/ if such a message is already in the queue, ignore it.
+    "/ Otherwise push it as an event, to be handled when my thread is
+    "/ back in the event loop.
+    "/
+    self criticalUserEventQueueAccess:[
+        (self hasUserEvent:selector for:someone withArguments:argList) ifFalse:[
+            self pushUserEvent:selector for:someone withArguments:argList
+        ].
+    ].
+!
+
 forwardKeyEventsTo:aView
     "remove all keyboard events and send them to aViews sensor instead"
 
@@ -3342,5 +3349,15 @@
     "Modified: 10.2.1997 / 13:30:43 / cg"
 ! !
 
+!WindowSensor class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.292 2015/02/05 08:54:11 cg Exp $'
+!
+
+version_CVS
+    ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.292 2015/02/05 08:54:11 cg Exp $'
+! !
+
 
 WindowSensor initialize!