--- a/ApplicationModel.st Fri Apr 11 02:10:02 2003 +0200
+++ b/ApplicationModel.st Tue Apr 15 13:57:43 2003 +0200
@@ -1201,23 +1201,24 @@
(window := self window) notNil ifTrue:[
sensor := window sensor.
].
+
sensor isNil ifTrue:[
- "/ already closed, or not yet open
-
- ^ someone perform:selector withArguments:argList.
+ "no window (yet or any longer)"
+ someone perform:selector withArguments:argList.
+ ^ self.
].
+
"/
"/ 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.
"/
- [
- (sensor hasEvent:selector for:someone withArguments:argList
- ) ifFalse:[
+ sensor synchronized:[
+ (sensor hasEvent:selector for:someone withArguments:argList) ifFalse:[
sensor pushUserEvent:selector for:someone withArguments:argList
].
- ] valueUninterruptably "/ *** TODO: need a semaphore here instead of a global lock
+ ].
"Modified: / 5.2.2000 / 00:01:54 / cg"
"Created: / 26.2.2000 / 18:01:31 / cg"
@@ -2729,7 +2730,7 @@
!ApplicationModel class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.185 2003-04-08 16:27:45 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.186 2003-04-15 11:57:40 stefan Exp $'
! !
ApplicationModel initialize!
--- a/DragAndDropManager.st Fri Apr 11 02:10:02 2003 +0200
+++ b/DragAndDropManager.st Tue Apr 15 13:57:43 2003 +0200
@@ -1351,7 +1351,7 @@
doStart:aHandler for:aView atEnd:aFourArgEndBlock
"setup a handler and a restore block
"
- |device sensor lastActive windowGroup savedCursor screenPoint|
+ |device lastActive windowGroup savedCursor screenPoint|
device := aView device.
lastActive := ActiveDragAndDropManagers at:device ifAbsent:nil.
@@ -1394,10 +1394,8 @@
aHandler preDraggingIn:dragView.
"/ must wait for all pending motion events to arrive, and ignore them
- (sensor := dragView sensor) notNil ifTrue:[
- device sync.
- sensor flushMotionEventsFor:nil.
- ].
+ device sync.
+ dragView sensor flushMotionEventsFor:nil.
"/ start with a first draw at the current mouse position
screenPoint := device pointerPosition.
@@ -1427,7 +1425,7 @@
!DragAndDropManager class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.49 2003-03-19 10:06:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.50 2003-04-15 11:57:43 stefan Exp $'
! !
DragAndDropManager initialize!