WindowGroup.st
changeset 383 a700611bb24b
parent 375 44d1d4006cdd
child 385 15fd1c806d2a
--- a/WindowGroup.st	Fri Jan 26 13:49:01 1996 +0100
+++ b/WindowGroup.st	Fri Jan 26 18:43:40 1996 +0100
@@ -298,6 +298,9 @@
 device
     "return the device, we receive our events from"
 
+    (topViews notNil and:[topViews isEmpty not]) ifTrue:[
+	^ topViews first device
+    ].
     (views notNil and:[views isEmpty not]) ifTrue:[
 	^ views first device
     ].
@@ -753,58 +756,58 @@
     self processExposeEvents.
 
     [mySensor hasEvents] whileTrue:[
-        event := mySensor nextEvent.
-        event notNil ifTrue:[
-            (views notNil or:[topViews notNil]) ifTrue:[
-                ignore := false.
+	event := mySensor nextEvent.
+	event notNil ifTrue:[
+	    (views notNil or:[topViews notNil]) ifTrue:[
+		ignore := false.
 
-                (preEventHook  notNil 
-                and:[preEventHook processEvent:event]) ifTrue:[
-                    ignore := true.
-                ].
-                ignore ifFalse:[
-                    "/
-                    "/ FocusStepping is done right here
-                    "/
-                    event isKeyPressEvent ifTrue:[
-                        event key == #FocusNext ifTrue:[
-                            self focusNext.
-                            ignore := true
-                        ].
-                        event key == #FocusPrevious ifTrue:[
-                            self focusPrevious.
-                            ignore := true
-                        ].
-                    ].
-                    event isPointerEnterEvent ifTrue:[
-                        pointerView := event view
-                    ].
-                    event isPointerLeaveEvent ifTrue:[
-                        pointerView := nil
-                    ].
+		(preEventHook  notNil 
+		and:[preEventHook processEvent:event]) ifTrue:[
+		    ignore := true.
+		].
+		ignore ifFalse:[
+		    "/
+		    "/ FocusStepping is done right here
+		    "/
+		    event isKeyPressEvent ifTrue:[
+			event key == #FocusNext ifTrue:[
+			    self focusNext.
+			    ignore := true
+			].
+			event key == #FocusPrevious ifTrue:[
+			    self focusPrevious.
+			    ignore := true
+			].
+		    ].
+		    event isPointerEnterEvent ifTrue:[
+			pointerView := event view
+		    ].
+		    event isPointerLeaveEvent ifTrue:[
+			pointerView := nil
+		    ].
 
-                    ignore ifFalse:[
-                        "/
-                        "/  button events turn off explicit focus, and revert
-                        "/  to implicit focus control
-                        "/
-                        (focusView notNil
-                        and:[event isButtonEvent]) ifTrue:[
-                            self focusView:nil
-                        ].
-                        "/
-                        "/ let the event forward itself
-                        "/
-                        LastActiveGroup := self.
-                        LastActiveProcess := Processor activeProcess.
-                        event sendEventWithFocusOn:focusView.
-                    ]
-                ].
-                postEventHook notNil ifTrue:[
-                    postEventHook processEvent:event
-                ]
-            ]
-        ].
+		    ignore ifFalse:[
+			"/
+			"/  button events turn off explicit focus, and revert
+			"/  to implicit focus control
+			"/
+			(focusView notNil
+			and:[event isButtonEvent]) ifTrue:[
+			    self focusView:nil
+			].
+			"/
+			"/ let the event forward itself
+			"/
+			LastActiveGroup := self.
+			LastActiveProcess := Processor activeProcess.
+			event sendEventWithFocusOn:focusView.
+		    ]
+		].
+		postEventHook notNil ifTrue:[
+		    postEventHook processEvent:event
+		]
+	    ]
+	].
     ]
 
     "Modified: 9.1.1996 / 15:52:30 / cg"
@@ -946,17 +949,17 @@
     "give focus to aViewOrNil"
 
     focusView notNil ifTrue:[
-        focusView focusOut.
+	focusView focusOut.
     ] ifFalse:[
-        pointerView notNil ifTrue:[
-            pointerView ~~ aViewOrNil ifTrue:[
-                pointerView focusOut
-            ]
-        ].
+	pointerView notNil ifTrue:[
+	    pointerView ~~ aViewOrNil ifTrue:[
+		pointerView focusOut
+	    ]
+	].
     ].
     focusView := aViewOrNil.
     focusView notNil ifTrue:[
-        focusView focusIn
+	focusView focusIn
     ].
 
     "
@@ -1064,7 +1067,7 @@
 
     |oldCursors dev|
 
-    dev := self device.
+    dev := self device.   
     dev isNil ifTrue:[
 	^ aBlock value
     ].
@@ -1131,6 +1134,6 @@
 !WindowGroup class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.55 1996-01-23 16:36:46 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.56 1996-01-26 17:43:40 ah Exp $'
 ! !
 WindowGroup initialize!