SynchronousWindowSensor.st
changeset 7460 d6fb7221d01e
parent 7259 40a7c1e90b43
child 7541 39940e2446a5
child 7667 03e064bb2153
--- a/SynchronousWindowSensor.st	Sat Jul 23 19:51:38 2016 +0200
+++ b/SynchronousWindowSensor.st	Sat Jul 23 19:52:29 2016 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1995 by Claus Gittinger
 	      All Rights Reserved
@@ -118,12 +120,12 @@
     "forward a noExpose event for some view"
 
     catchExpose isNil ifTrue:[
-	'SWSensor [info]: noExpose but not catching' infoPrintCR.
+        Logger info:'noExpose but not catching: %1' with:aView.
     ].
 
     (catchExpose includes:aView) ifTrue:[
-	gotExpose add:aView.
-	catchExpose remove:aView.
+        gotExpose add:aView.
+        catchExpose remove:aView.
     ].
     aView noExpose.
 
@@ -203,7 +205,7 @@
     "start catching noExpose events (must be done BEFORE a bitblt)."
 
     catchExpose notEmpty ifTrue:[
-	'SWSensor [warning]: already catching in catchExpose' errorPrintCR.
+        Logger warning:'already catching in catchExpose: %1' with:aView.
     ].
 
     gotOtherEvent remove:aView ifAbsent:nil.
@@ -231,17 +233,16 @@
         endPollTime := Timestamp now addSeconds:2.
         stopPoll := false.
 
-        [(gotExpose includes:aView) or:[stopPoll]] whileFalse:[
+        [stopPoll or:[gotExpose includes:aView]] whileFalse:[
             (viewsDevice exposeEventPendingFor:windowId withSync:true) ifTrue:[
                 viewsDevice dispatchExposeEventFor:windowId.
             ].
             stopPoll := Timestamp now > endPollTime.
             Processor yield.
         ].
-
-        stopPoll ifTrue:[
-            'SyncWindowSensor [warning]: lost expose event' errorPrintCR.
-        ]
+    ].
+    stopPoll ifTrue:[
+        Logger warning:'lost expose event: %1' with:aView.
     ].
 
     catchExpose remove:aView ifAbsent:nil.