--- a/Color.st Mon Dec 20 00:42:23 1993 +0100
+++ b/Color.st Mon Dec 20 18:29:11 1993 +0100
@@ -28,7 +28,7 @@
see Color documentation for more info
-$Header: /cvs/stx/stx/libview/Color.st,v 1.6 1993-12-12 21:32:17 claus Exp $
+$Header: /cvs/stx/stx/libview/Color.st,v 1.7 1993-12-20 17:28:49 claus Exp $
totally rewritten summer 92 by claus (from XColor)
'!
@@ -661,7 +661,27 @@
disposed
"a color died - free the device color"
+ |otherDevice|
+
+ device == Display ifTrue:[
+ otherDevice := ModalDisplay
+ ] ifFalse:[
+ device == ModalDisplay ifTrue:[
+ otherDevice := Display
+ ]
+ ].
+
colorId notNil ifTrue:[
+ "for now, (until we got rid of ModalDisplay)"
+ lobby contentsDo:[:aColor |
+ aColor notNil ifTrue:[
+ ((aColor colorId == colorId) and:[aColor device == otherDevice])
+ ifTrue:[
+ "dont free - still in use"
+ ^ self
+ ].
+ ].
+ ].
device freeColor:colorId
]
! !
--- a/DevWorkst.st Mon Dec 20 00:42:23 1993 +0100
+++ b/DevWorkst.st Mon Dec 20 18:29:11 1993 +0100
@@ -22,7 +22,7 @@
motionEventCompression
lastId lastView
keyboardMap
- isSlow'
+ isSlow'
classVariableNames: 'ButtonTranslation MultiClickTimeDelta
DeviceErrorSignal'
poolDictionaries:''
@@ -34,7 +34,7 @@
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libview/Attic/DevWorkst.st,v 1.7 1993-12-19 23:42:15 claus Exp $
+$Header: /cvs/stx/stx/libview/Attic/DevWorkst.st,v 1.8 1993-12-20 17:28:54 claus Exp $
written jan 93 by claus
'!
@@ -81,8 +81,8 @@
lastView <View>
keyboardMap <KeyBdMap> mapping for keys
-isSlow <Boolean> set/cleared from startup - used to turn off
- things like popup-shadows etc.
+isSlow <Boolean> set/cleared from startup - used to turn off
+ things like popup-shadows etc.
"
! !
@@ -838,7 +838,7 @@
sema := nil
]
]
- ] forkAt:(Processor userSchedulingPriority + 1).
+ ] forkAt:(Processor userSchedulingPriority).
p name:'event dispatcher'
]
!
@@ -860,11 +860,16 @@
]
!
-dispatchWhile:aBlock
- "get and process next event for any view as long as the argument-block
- evaluates to true"
+dispatchModalWhile:aBlock
+ "get and process next event for any view as long as the
+ argument-block evaluates to true.
+ This is a modal loop, not switching to other processes."
[aBlock value] whileTrue:[
+ self eventPending ifFalse:[
+ Processor evaluateTimeouts.
+ OperatingSystem millisecondDelay:50.
+ ].
self dispatchEvent
].
!
--- a/DeviceWorkstation.st Mon Dec 20 00:42:23 1993 +0100
+++ b/DeviceWorkstation.st Mon Dec 20 18:29:11 1993 +0100
@@ -22,7 +22,7 @@
motionEventCompression
lastId lastView
keyboardMap
- isSlow'
+ isSlow'
classVariableNames: 'ButtonTranslation MultiClickTimeDelta
DeviceErrorSignal'
poolDictionaries:''
@@ -34,7 +34,7 @@
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.7 1993-12-19 23:42:15 claus Exp $
+$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.8 1993-12-20 17:28:54 claus Exp $
written jan 93 by claus
'!
@@ -81,8 +81,8 @@
lastView <View>
keyboardMap <KeyBdMap> mapping for keys
-isSlow <Boolean> set/cleared from startup - used to turn off
- things like popup-shadows etc.
+isSlow <Boolean> set/cleared from startup - used to turn off
+ things like popup-shadows etc.
"
! !
@@ -838,7 +838,7 @@
sema := nil
]
]
- ] forkAt:(Processor userSchedulingPriority + 1).
+ ] forkAt:(Processor userSchedulingPriority).
p name:'event dispatcher'
]
!
@@ -860,11 +860,16 @@
]
!
-dispatchWhile:aBlock
- "get and process next event for any view as long as the argument-block
- evaluates to true"
+dispatchModalWhile:aBlock
+ "get and process next event for any view as long as the
+ argument-block evaluates to true.
+ This is a modal loop, not switching to other processes."
[aBlock value] whileTrue:[
+ self eventPending ifFalse:[
+ Processor evaluateTimeouts.
+ OperatingSystem millisecondDelay:50.
+ ].
self dispatchEvent
].
!
--- a/ModalBox.st Mon Dec 20 00:42:23 1993 +0100
+++ b/ModalBox.st Mon Dec 20 18:29:11 1993 +0100
@@ -22,7 +22,7 @@
COPYRIGHT (c) 1990 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libview/ModalBox.st,v 1.6 1993-12-13 17:10:15 claus Exp $
+$Header: /cvs/stx/stx/libview/ModalBox.st,v 1.7 1993-12-20 17:28:57 claus Exp $
written Jan 90 by claus
'!
@@ -252,7 +252,7 @@
"this is a kludge - we do not have multiple processes, therefore
we start another dispatch loop, which exits when control is lost"
- device dispatchWhile:[haveControl]
+ device dispatchModalWhile:[haveControl]
!
leaveControl
--- a/PseudoV.st Mon Dec 20 00:42:23 1993 +0100
+++ b/PseudoV.st Mon Dec 20 18:29:11 1993 +0100
@@ -35,7 +35,7 @@
delegate instead, if there is one. So you can change views behavior even if they
where not initially designed for it.
-$Header: /cvs/stx/stx/libview/Attic/PseudoV.st,v 1.5 1993-12-11 01:32:26 claus Exp $
+$Header: /cvs/stx/stx/libview/Attic/PseudoV.st,v 1.6 1993-12-20 17:28:58 claus Exp $
rewritten summer 92 by claus
'!
@@ -609,6 +609,15 @@
self enableEvent:#pointerMotion
!
+compressMotionEvents:aBoolean
+ "enable/disable motion event compression
+ (i.e. replacing all motion events by the last one).
+ Compression makes almost always sense, except when
+ doing things like freehand drawing"
+
+ device compressMotionEvents:aBoolean
+!
+
enableButtonMotionEvents
"enable mouse-pointer motion-while-button-is-pressed events"
--- a/StandardSystemView.st Mon Dec 20 00:42:23 1993 +0100
+++ b/StandardSystemView.st Mon Dec 20 18:29:11 1993 +0100
@@ -25,7 +25,7 @@
I represent topViews i.e. those views which have a title-label,
an icon etc.
-$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.5 1993-12-11 01:33:18 claus Exp $
+$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.6 1993-12-20 17:29:01 claus Exp $
written spring/summer 89 by claus
'!
@@ -41,9 +41,9 @@
start
"create, realize the view - this topview and all its subviews will
- run within the currently active process"
+ run as a separate process with its own windowGroup"
- ^ self new realize
+ ^ self new open "realize"
! !
!StandardSystemView class methodsFor:'instance creation'!
--- a/StdSysV.st Mon Dec 20 00:42:23 1993 +0100
+++ b/StdSysV.st Mon Dec 20 18:29:11 1993 +0100
@@ -25,7 +25,7 @@
I represent topViews i.e. those views which have a title-label,
an icon etc.
-$Header: /cvs/stx/stx/libview/Attic/StdSysV.st,v 1.5 1993-12-11 01:33:18 claus Exp $
+$Header: /cvs/stx/stx/libview/Attic/StdSysV.st,v 1.6 1993-12-20 17:29:01 claus Exp $
written spring/summer 89 by claus
'!
@@ -41,9 +41,9 @@
start
"create, realize the view - this topview and all its subviews will
- run within the currently active process"
+ run as a separate process with its own windowGroup"
- ^ self new realize
+ ^ self new open "realize"
! !
!StandardSystemView class methodsFor:'instance creation'!
--- a/View.st Mon Dec 20 00:42:23 1993 +0100
+++ b/View.st Mon Dec 20 18:29:11 1993 +0100
@@ -42,7 +42,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libview/View.st,v 1.7 1993-12-19 23:42:23 claus Exp $
+$Header: /cvs/stx/stx/libview/View.st,v 1.8 1993-12-20 17:29:02 claus Exp $
written spring/summer 89 by claus
3D effects summer 90 by claus
@@ -1363,7 +1363,9 @@
].
self sizeChanged:how.
self computeInnerClip.
- self redrawEdges
+ shown ifTrue:[
+ self redrawEdges
+ ]
]
]
]
@@ -2477,10 +2479,10 @@
windowGroup := WindowGroup new.
windowGroup addTopView:self.
].
- self realize.
- self windowGroup eventLoop
- ] ifFalse:[
- self realize
+ self realize.
+ self windowGroup eventLoop
+ ] ifTrue:[
+ self realize
]
! !
@@ -2919,7 +2921,7 @@
self sizeChanged:how.
- anyEdge ifTrue:[
+ (anyEdge and:[shown]) ifTrue:[
self clipRect:nil.
mustRedrawBottomEdge ifTrue:[
self drawBottomEdge
@@ -2937,7 +2939,13 @@
action - i.e. window manager de-iconified me)"
realized := true.
- shown := true
+ shown := true.
+ "backed views will not get expose events - have
+ to force a redraw here to get things drawn into
+ backing store"
+ backed ifTrue:[
+ self redraw
+ ]
!
unmapped
--- a/XWorkstat.st Mon Dec 20 00:42:23 1993 +0100
+++ b/XWorkstat.st Mon Dec 20 18:29:11 1993 +0100
@@ -36,7 +36,7 @@
this class provides the interface to X11
-$Header: /cvs/stx/stx/libview/Attic/XWorkstat.st,v 1.7 1993-12-16 10:59:26 claus Exp $
+$Header: /cvs/stx/stx/libview/Attic/XWorkstat.st,v 1.8 1993-12-20 17:29:11 claus Exp $
written spring/summer 89 by claus
'!
@@ -4201,7 +4201,8 @@
handled."
self getEventFor:aViewIdOrNil withMask:eventMask.
- self dispatchLastEvent
+ self dispatchLastEvent.
+ Processor yield
!
getEventFor:aViewIdOrNil withMask:eventMask
--- a/XWorkstation.st Mon Dec 20 00:42:23 1993 +0100
+++ b/XWorkstation.st Mon Dec 20 18:29:11 1993 +0100
@@ -36,7 +36,7 @@
this class provides the interface to X11
-$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.7 1993-12-16 10:59:26 claus Exp $
+$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.8 1993-12-20 17:29:11 claus Exp $
written spring/summer 89 by claus
'!
@@ -4201,7 +4201,8 @@
handled."
self getEventFor:aViewIdOrNil withMask:eventMask.
- self dispatchLastEvent
+ self dispatchLastEvent.
+ Processor yield
!
getEventFor:aViewIdOrNil withMask:eventMask