allow terminate of a dead-process window.
authorClaus Gittinger <cg@exept.de>
Tue, 25 May 1999 15:10:50 +0200
changeset 2725 607fdf1b833e
parent 2724 a8d2a8723791
child 2726 c0a05c874843
allow terminate of a dead-process window.
WSensor.st
WindowSensor.st
--- a/WSensor.st	Sun May 23 17:51:45 1999 +0200
+++ b/WSensor.st	Tue May 25 15:10:50 1999 +0200
@@ -1585,21 +1585,21 @@
 
     r := aRectangle.
     (fullRedraw := aView redrawsFull) ifTrue:[
-	r := 0@0 corner:9999@9999.
-	newEvent := WindowEvent damageFor:aView rectangle:r.
-	damage add:newEvent.
-
-	"/ remove all other damages for this view ...
-	1 to:sz do:[:idx |
-	    aDamage := damage at:idx.
-	    aDamage notNil ifTrue:[
-		(aDamage isDamageForView:aView) ifTrue:[
-		    damage at:idx put:nil
-		]
-	    ].
-	].
-
-	^ true
+        r := 0@0 corner:9999@9999.
+        newEvent := WindowEvent damageFor:aView rectangle:r.
+        damage add:newEvent.
+
+        "/ remove all other damages for this view ...
+        1 to:sz do:[:idx |
+            aDamage := damage at:idx.
+            aDamage notNil ifTrue:[
+                (aDamage isDamageForView:aView) ifTrue:[
+                    damage at:idx put:nil
+                ]
+            ].
+        ].
+
+        ^ true
     ].
 
     "/ remove other damages which are contained in this rectangle
@@ -1608,42 +1608,42 @@
     bounds := r.
     areaOfIndividualRects := r area.
     1 to:sz do:[:idx |
-	aDamage := damage at:idx.
-	aDamage notNil ifTrue:[
-	    (aDamage isDamageForView:aView) ifTrue:[
-		thisRectangle := aDamage rectangle.
-		(r contains:thisRectangle) ifTrue:[
-		    "/ the new rectangle contains that old damage
-		    damage at:idx put:nil
-		] ifFalse:[
-		    "/ the old damage contains the new rectangle    
-		    (thisRectangle contains:r) ifTrue:[
-			^ false
-		    ].
-
-		    "/ try to merge at left/right    
-		    r top == thisRectangle top ifTrue:[
-			r height == thisRectangle height ifTrue:[
-			    thisRectangle left:(r left min:thisRectangle left).
-			    thisRectangle right:(r right max:thisRectangle right).
-			    ^ false
-			]
-		    ] ifFalse:[
-			"/ try to merge at top/bottom    
-			r left == thisRectangle left ifTrue:[
-			    r width == thisRectangle width ifTrue:[
-				thisRectangle top:(r top min:thisRectangle top).
-				thisRectangle bottom:(r bottom max:thisRectangle bottom).
-				^ false
-			    ]
-			]
-		    ].
-		    nDamagesForView := nDamagesForView + 1.
-		    bounds := bounds merge:thisRectangle.
-		    areaOfIndividualRects := areaOfIndividualRects + thisRectangle area.
-		]
-	    ]
-	].
+        aDamage := damage at:idx.
+        aDamage notNil ifTrue:[
+            (aDamage isDamageForView:aView) ifTrue:[
+                thisRectangle := aDamage rectangle.
+                (r contains:thisRectangle) ifTrue:[
+                    "/ the new rectangle contains that old damage
+                    damage at:idx put:nil
+                ] ifFalse:[
+                    "/ the old damage contains the new rectangle    
+                    (thisRectangle contains:r) ifTrue:[
+                        ^ false
+                    ].
+
+                    "/ try to merge at left/right    
+                    r top == thisRectangle top ifTrue:[
+                        r height == thisRectangle height ifTrue:[
+                            thisRectangle left:(r left min:thisRectangle left).
+                            thisRectangle right:(r right max:thisRectangle right).
+                            ^ false
+                        ]
+                    ] ifFalse:[
+                        "/ try to merge at top/bottom    
+                        r left == thisRectangle left ifTrue:[
+                            r width == thisRectangle width ifTrue:[
+                                thisRectangle top:(r top min:thisRectangle top).
+                                thisRectangle bottom:(r bottom max:thisRectangle bottom).
+                                ^ false
+                            ]
+                        ]
+                    ].
+                    nDamagesForView := nDamagesForView + 1.
+                    bounds := bounds merge:thisRectangle.
+                    areaOfIndividualRects := areaOfIndividualRects + thisRectangle area.
+                ]
+            ]
+        ].
     ].
 
     "/ if there are many rectangles for this view,
@@ -1652,19 +1652,19 @@
 
     (nDamagesForView > 10
     or:[bounds notNil 
-	and:[(areaOfIndividualRects * 1.5) < bounds area]])  ifTrue:[
-
-	"/ remove all other damages for this view ...
-	1 to:sz do:[:idx |
-	    aDamage := damage at:idx.
-	    aDamage notNil ifTrue:[
-		(aDamage isDamageForView:aView) ifTrue:[
-		    damage at:idx put:nil
-		]
-	    ].
-	].
-
-	r := bounds.
+        and:[(areaOfIndividualRects * 1.5) > bounds area]])  ifTrue:[
+
+        "/ remove all other damages for this view ...
+        1 to:sz do:[:idx |
+            aDamage := damage at:idx.
+            aDamage notNil ifTrue:[
+                (aDamage isDamageForView:aView) ifTrue:[
+                    damage at:idx put:nil
+                ]
+            ].
+        ].
+
+        r := bounds.
     ].
 
     "/ add the new damage
@@ -1673,8 +1673,7 @@
 
     ^ true.
 
-
-
+    "Modified: / 23.5.1999 / 17:39:38 / cg"
 !
 
 damage
@@ -2661,6 +2660,6 @@
 !WindowSensor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Attic/WSensor.st,v 1.156 1999-05-22 14:32:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Attic/WSensor.st,v 1.157 1999-05-25 13:10:50 cg Exp $'
 ! !
 WindowSensor initialize!
--- a/WindowSensor.st	Sun May 23 17:51:45 1999 +0200
+++ b/WindowSensor.st	Tue May 25 15:10:50 1999 +0200
@@ -1585,21 +1585,21 @@
 
     r := aRectangle.
     (fullRedraw := aView redrawsFull) ifTrue:[
-	r := 0@0 corner:9999@9999.
-	newEvent := WindowEvent damageFor:aView rectangle:r.
-	damage add:newEvent.
-
-	"/ remove all other damages for this view ...
-	1 to:sz do:[:idx |
-	    aDamage := damage at:idx.
-	    aDamage notNil ifTrue:[
-		(aDamage isDamageForView:aView) ifTrue:[
-		    damage at:idx put:nil
-		]
-	    ].
-	].
-
-	^ true
+        r := 0@0 corner:9999@9999.
+        newEvent := WindowEvent damageFor:aView rectangle:r.
+        damage add:newEvent.
+
+        "/ remove all other damages for this view ...
+        1 to:sz do:[:idx |
+            aDamage := damage at:idx.
+            aDamage notNil ifTrue:[
+                (aDamage isDamageForView:aView) ifTrue:[
+                    damage at:idx put:nil
+                ]
+            ].
+        ].
+
+        ^ true
     ].
 
     "/ remove other damages which are contained in this rectangle
@@ -1608,42 +1608,42 @@
     bounds := r.
     areaOfIndividualRects := r area.
     1 to:sz do:[:idx |
-	aDamage := damage at:idx.
-	aDamage notNil ifTrue:[
-	    (aDamage isDamageForView:aView) ifTrue:[
-		thisRectangle := aDamage rectangle.
-		(r contains:thisRectangle) ifTrue:[
-		    "/ the new rectangle contains that old damage
-		    damage at:idx put:nil
-		] ifFalse:[
-		    "/ the old damage contains the new rectangle    
-		    (thisRectangle contains:r) ifTrue:[
-			^ false
-		    ].
-
-		    "/ try to merge at left/right    
-		    r top == thisRectangle top ifTrue:[
-			r height == thisRectangle height ifTrue:[
-			    thisRectangle left:(r left min:thisRectangle left).
-			    thisRectangle right:(r right max:thisRectangle right).
-			    ^ false
-			]
-		    ] ifFalse:[
-			"/ try to merge at top/bottom    
-			r left == thisRectangle left ifTrue:[
-			    r width == thisRectangle width ifTrue:[
-				thisRectangle top:(r top min:thisRectangle top).
-				thisRectangle bottom:(r bottom max:thisRectangle bottom).
-				^ false
-			    ]
-			]
-		    ].
-		    nDamagesForView := nDamagesForView + 1.
-		    bounds := bounds merge:thisRectangle.
-		    areaOfIndividualRects := areaOfIndividualRects + thisRectangle area.
-		]
-	    ]
-	].
+        aDamage := damage at:idx.
+        aDamage notNil ifTrue:[
+            (aDamage isDamageForView:aView) ifTrue:[
+                thisRectangle := aDamage rectangle.
+                (r contains:thisRectangle) ifTrue:[
+                    "/ the new rectangle contains that old damage
+                    damage at:idx put:nil
+                ] ifFalse:[
+                    "/ the old damage contains the new rectangle    
+                    (thisRectangle contains:r) ifTrue:[
+                        ^ false
+                    ].
+
+                    "/ try to merge at left/right    
+                    r top == thisRectangle top ifTrue:[
+                        r height == thisRectangle height ifTrue:[
+                            thisRectangle left:(r left min:thisRectangle left).
+                            thisRectangle right:(r right max:thisRectangle right).
+                            ^ false
+                        ]
+                    ] ifFalse:[
+                        "/ try to merge at top/bottom    
+                        r left == thisRectangle left ifTrue:[
+                            r width == thisRectangle width ifTrue:[
+                                thisRectangle top:(r top min:thisRectangle top).
+                                thisRectangle bottom:(r bottom max:thisRectangle bottom).
+                                ^ false
+                            ]
+                        ]
+                    ].
+                    nDamagesForView := nDamagesForView + 1.
+                    bounds := bounds merge:thisRectangle.
+                    areaOfIndividualRects := areaOfIndividualRects + thisRectangle area.
+                ]
+            ]
+        ].
     ].
 
     "/ if there are many rectangles for this view,
@@ -1652,19 +1652,19 @@
 
     (nDamagesForView > 10
     or:[bounds notNil 
-	and:[(areaOfIndividualRects * 1.5) < bounds area]])  ifTrue:[
-
-	"/ remove all other damages for this view ...
-	1 to:sz do:[:idx |
-	    aDamage := damage at:idx.
-	    aDamage notNil ifTrue:[
-		(aDamage isDamageForView:aView) ifTrue:[
-		    damage at:idx put:nil
-		]
-	    ].
-	].
-
-	r := bounds.
+        and:[(areaOfIndividualRects * 1.5) > bounds area]])  ifTrue:[
+
+        "/ remove all other damages for this view ...
+        1 to:sz do:[:idx |
+            aDamage := damage at:idx.
+            aDamage notNil ifTrue:[
+                (aDamage isDamageForView:aView) ifTrue:[
+                    damage at:idx put:nil
+                ]
+            ].
+        ].
+
+        r := bounds.
     ].
 
     "/ add the new damage
@@ -1673,8 +1673,7 @@
 
     ^ true.
 
-
-
+    "Modified: / 23.5.1999 / 17:39:38 / cg"
 !
 
 damage
@@ -2661,6 +2660,6 @@
 !WindowSensor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.156 1999-05-22 14:32:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.157 1999-05-25 13:10:50 cg Exp $'
 ! !
 WindowSensor initialize!