WindowSensor.st
changeset 428 33156201125b
parent 386 f9a80cac659e
child 470 c5c227de3443
--- a/WindowSensor.st	Tue Feb 20 16:28:01 1996 +0100
+++ b/WindowSensor.st	Tue Feb 20 19:58:39 1996 +0100
@@ -1137,6 +1137,13 @@
     ^ true
 !
 
+damage
+    "retrieve the next damage rectangle or nil, if there is none.
+     Remove it from the queue."
+
+    ^ damage.
+!
+
 nextDamage
     "retrieve the next damage rectangle or nil, if there is none.
      Remove it from the queue."
@@ -1450,6 +1457,15 @@
     ^ self hasEvent:#buttonRelease:x:y: orPendingDeviceEvent:#buttonRelease for:aView
 !
 
+hasConfigureEventFor:aView 
+    "return true, if any resize/position events are pending.
+     If the argument, aView is nil, the information is regarding any
+     view (i.e. is there a motion event for any of my views);
+     otherwise, the information is regrding that specific view."
+
+    ^ self hasEvent:#configureX:y:width:height: orPendingDeviceEvent:#structureNotify for:aView
+!
+
 hasDamage 
     "return true, if any exposure events are pending"
 
@@ -1477,16 +1493,25 @@
      otherwise, the information is regrding that specific view."
 
     mouseAndKeyboard size ~~ 0 ifTrue:[
-	mouseAndKeyboard do:[:anEvent |
-	    anEvent notNil ifTrue:[
-		(aView isNil or:[anEvent view == aView]) ifTrue:[
-		    anEvent type == type ifTrue:[^ true].
-		]
-	    ].
-	]
+        mouseAndKeyboard do:[:anEvent |
+            anEvent notNil ifTrue:[
+                (aView isNil or:[anEvent view == aView]) ifTrue:[
+                    anEvent type == type ifTrue:[^ true].
+                ]
+            ].
+        ]
+    ].
+    damage size ~~ 0 ifTrue:[
+        damage do:[:anEvent |
+            anEvent notNil ifTrue:[
+                (aView isNil or:[anEvent view == aView]) ifTrue:[
+                    anEvent type == type ifTrue:[^ true].
+                ]
+            ].
+        ]
     ].
     aView notNil ifTrue:[
-	^ aView device eventPending:dType for:aView id
+        ^ aView device eventPending:dType for:aView id
     ].
     ^ false
 !
@@ -1674,6 +1699,6 @@
 !WindowSensor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.43 1996-01-27 18:35:12 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.44 1996-02-20 18:58:39 werner Exp $'
 ! !
 WindowSensor initialize!