WindowSensor.st
branchdelegated_gc
changeset 6472 5b21ff383a12
parent 6140 c8f564c3a7df
child 6524 1647b1f4874a
child 6754 e5fad431c0b8
--- a/WindowSensor.st	Thu Feb 06 12:50:14 2014 +0100
+++ b/WindowSensor.st	Thu May 08 10:27:51 2014 +0200
@@ -855,6 +855,8 @@
     [
         Error handle:[:ex |
             ('WindowSensor [Warning]: Error in eventQ handling ignored: ' , ex description) errorPrintCR.
+            "/ thisContext fullPrintAll.
+            "/ whichLock printCR.
             ex return
         ] do:[
             whichLock critical:aBlock
@@ -1949,7 +1951,7 @@
     eventListeners notNil ifTrue:[
         "/ be prepared that a listener removes itself while we iterate...
         eventListeners copy do:[:aListener |
-            (aListener processEvent:anEvent) == true ifTrue:[
+            (aListener notNil and:[(aListener processEvent:anEvent) == true]) ifTrue:[
                 anyListenerReturnedTrue := true
             ]
         ]
@@ -2564,9 +2566,9 @@
 initializeState
     "initialize the event queues to empty"
 
-    damageEventAccessLock := Semaphore forMutualExclusion.
+    damageEventAccessLock := RecursionLock new.
     damageEventAccessLock name:'WSensor ev-q damageEventAccessLock'.
-    userEventAccessLock := Semaphore forMutualExclusion.
+    userEventAccessLock := RecursionLock new.
     userEventAccessLock name:'WSensor ev-q userEventAccessLock'.
 
     damage := OrderedCollection new.
@@ -3156,7 +3158,7 @@
     [
         device flush.
 
-        device platformName = 'WIN32' ifTrue:[
+        device isWindowsPlatform ifTrue:[
             "/ since this is definitely a local display,
             "/ there is no need for a long timeOut
             "/ (it should arrive fast)
@@ -3251,7 +3253,7 @@
 !WindowSensor class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.281 2013-09-19 20:46:38 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.284.2.1 2014-05-08 08:27:50 stefan Exp $'
 ! !