--- a/DevWorkst.st Thu Sep 10 16:51:01 1998 +0200
+++ b/DevWorkst.st Thu Sep 10 18:23:49 1998 +0200
@@ -1727,14 +1727,6 @@
^ Array with:info
!
-supportsViewBackgroundPixmaps
- "return true, if the device allows pixmaps as
- viewBackground. False returned here - redefined in some
- device classes."
-
- ^ false
-!
-
supportsDeepIcons
"return true, if this device supports non b&w (i.e. greyScale
or colored icons). Many Xservers (and/or windowManagers) crash,
@@ -1797,6 +1789,14 @@
"Modified: 10.6.1996 / 21:08:04 / cg"
!
+supportsViewBackgroundPixmaps
+ "return true, if the device allows pixmaps as
+ viewBackground. False returned here - redefined in some
+ device classes."
+
+ ^ false
+!
+
supportsViewGravity
"return true, if this device supports gravity attributes.
We do not depend on the being implemented, but some resizing operations
@@ -4673,12 +4673,17 @@
Start with initialRectangle.
A helper for rectangleFromUser; can also be used for resizing operations."
- |curs1 origin corner root rect|
+ |curs1 origin corner root rect doRegrab|
+
+ "/ regrabbing leads to horrible flicker and
+ "/ events being sent to applications under the mouse.
+ "/ on windows displays.
+ doRegrab := self class ~~ WinWorkstation.
keepExtent ifTrue:[
- curs1 := Cursor origin
+ curs1 := Cursor origin
] ifFalse:[
- curs1 := Cursor corner
+ curs1 := Cursor corner
].
curs1 := curs1 onDevice:self.
root := self rootView.
@@ -4692,93 +4697,94 @@
root foreground:blackColor background:whiteColor.
root xoring:[
- |left right top bottom newOrigin newCorner p curs|
-
- keepExtent ifFalse:[
- corner := origin.
- rect := origin corner:corner.
- root displayRectangle:rect.
- ].
-
- self
- grabPointerIn:root id
- withCursor:curs1 id
- pointerMode:#async
- keyboardMode:#sync
- confineTo:nil.
-
- "
- just in case; wait for button to be down ...
- "
- [self leftButtonPressed] whileFalse:[Delay waitForSeconds:0.05].
-
- keepExtent ifTrue:[
- p := self pointerPosition.
- origin := p.
- corner := origin + initialRectangle extent.
- rect := origin corner:corner.
- root displayRectangle:rect.
- ].
-
- [self leftButtonPressed] whileTrue:[
- left := initialRectangle origin x.
- top := initialRectangle origin y.
- right := initialRectangle corner x.
- bottom := initialRectangle corner y.
-
- p := self pointerPosition.
- keepExtent ifTrue:[
- newOrigin := p.
- newCorner := newOrigin + initialRectangle extent.
- curs := curs1.
- ] ifFalse:[
- p x < initialRectangle left ifTrue:[
- p y < initialRectangle top ifTrue:[
- curs := Cursor topLeft.
- left := p x.
- top := p y.
- ] ifFalse:[
- curs := Cursor bottomLeft.
- left := p x.
- bottom := p y
- ]
- ] ifFalse:[
- p y < initialRectangle top ifTrue:[
- curs := Cursor topRight.
- right := p x.
- top := p y
- ] ifFalse:[
- curs := Cursor bottomRight.
- right := p x.
- bottom := p y
- ]
- ].
-
- newOrigin := left @ top.
- newCorner := right @ bottom.
- ].
-
- ((newOrigin ~= origin) or:[newCorner ~= corner]) ifTrue:[
- root displayRectangle:rect.
-
- self grabPointerIn:root id
- withCursor:curs id
- pointerMode:#async
- keyboardMode:#sync
- confineTo:nil.
-
- origin := newOrigin.
- corner := newCorner.
- rect := origin corner:corner.
- root displayRectangle:rect.
- self disposeButtonEventsFor:nil.
- self flush.
- ] ifFalse:[
- Delay waitForSeconds:0.05
- ]
- ].
- root displayRectangle:rect.
- self ungrabPointer.
+ |left right top bottom newOrigin newCorner p curs|
+
+ keepExtent ifFalse:[
+ corner := origin.
+ rect := origin corner:corner.
+ root displayRectangle:rect.
+ ].
+
+ self
+ grabPointerIn:root id
+ withCursor:curs1 id
+ pointerMode:#async
+ keyboardMode:#sync
+ confineTo:nil.
+
+ "
+ just in case; wait for button to be down ...
+ "
+ [self leftButtonPressed] whileFalse:[Delay waitForSeconds:0.05].
+
+ keepExtent ifTrue:[
+ p := self pointerPosition.
+ origin := p.
+ corner := origin + initialRectangle extent.
+ rect := origin corner:corner.
+ root displayRectangle:rect.
+ ].
+
+ [self leftButtonPressed] whileTrue:[
+ left := initialRectangle origin x.
+ top := initialRectangle origin y.
+ right := initialRectangle corner x.
+ bottom := initialRectangle corner y.
+
+ p := self pointerPosition.
+ keepExtent ifTrue:[
+ newOrigin := p.
+ newCorner := newOrigin + initialRectangle extent.
+ curs := curs1.
+ ] ifFalse:[
+ p x < initialRectangle left ifTrue:[
+ p y < initialRectangle top ifTrue:[
+ curs := Cursor topLeft.
+ left := p x.
+ top := p y.
+ ] ifFalse:[
+ curs := Cursor bottomLeft.
+ left := p x.
+ bottom := p y
+ ]
+ ] ifFalse:[
+ p y < initialRectangle top ifTrue:[
+ curs := Cursor topRight.
+ right := p x.
+ top := p y
+ ] ifFalse:[
+ curs := Cursor bottomRight.
+ right := p x.
+ bottom := p y
+ ]
+ ].
+
+ newOrigin := left @ top.
+ newCorner := right @ bottom.
+ ].
+
+ ((newOrigin ~= origin) or:[newCorner ~= corner]) ifTrue:[
+ root displayRectangle:rect.
+ doRegrab ifTrue:[
+ self grabPointerIn:root id
+ withCursor:curs id
+ pointerMode:#async
+ keyboardMode:#sync
+ confineTo:nil.
+ ].
+
+ origin := newOrigin.
+ corner := newCorner.
+ rect := origin corner:corner.
+ root displayRectangle:rect.
+ self disposeButtonEventsFor:nil.
+ self flush.
+ ] ifFalse:[
+ Delay waitForSeconds:0.05
+ ]
+ ].
+ root displayRectangle:rect.
+ self ungrabPointer.
].
self ungrabPointer.
@@ -4799,7 +4805,7 @@
"
"Created: / 24.7.1997 / 15:26:47 / cg"
- "Modified: / 18.8.1998 / 15:00:29 / cg"
+ "Modified: / 10.9.1998 / 17:38:41 / cg"
!
topviewFromUser
@@ -6100,6 +6106,6 @@
!DeviceWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Attic/DevWorkst.st,v 1.266 1998-09-08 10:06:09 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Attic/DevWorkst.st,v 1.267 1998-09-10 16:23:49 cg Exp $'
! !
DeviceWorkstation initialize!
--- a/DeviceWorkstation.st Thu Sep 10 16:51:01 1998 +0200
+++ b/DeviceWorkstation.st Thu Sep 10 18:23:49 1998 +0200
@@ -1727,14 +1727,6 @@
^ Array with:info
!
-supportsViewBackgroundPixmaps
- "return true, if the device allows pixmaps as
- viewBackground. False returned here - redefined in some
- device classes."
-
- ^ false
-!
-
supportsDeepIcons
"return true, if this device supports non b&w (i.e. greyScale
or colored icons). Many Xservers (and/or windowManagers) crash,
@@ -1797,6 +1789,14 @@
"Modified: 10.6.1996 / 21:08:04 / cg"
!
+supportsViewBackgroundPixmaps
+ "return true, if the device allows pixmaps as
+ viewBackground. False returned here - redefined in some
+ device classes."
+
+ ^ false
+!
+
supportsViewGravity
"return true, if this device supports gravity attributes.
We do not depend on the being implemented, but some resizing operations
@@ -4673,12 +4673,17 @@
Start with initialRectangle.
A helper for rectangleFromUser; can also be used for resizing operations."
- |curs1 origin corner root rect|
+ |curs1 origin corner root rect doRegrab|
+
+ "/ regrabbing leads to horrible flicker and
+ "/ events being sent to applications under the mouse.
+ "/ on windows displays.
+ doRegrab := self class ~~ WinWorkstation.
keepExtent ifTrue:[
- curs1 := Cursor origin
+ curs1 := Cursor origin
] ifFalse:[
- curs1 := Cursor corner
+ curs1 := Cursor corner
].
curs1 := curs1 onDevice:self.
root := self rootView.
@@ -4692,93 +4697,94 @@
root foreground:blackColor background:whiteColor.
root xoring:[
- |left right top bottom newOrigin newCorner p curs|
-
- keepExtent ifFalse:[
- corner := origin.
- rect := origin corner:corner.
- root displayRectangle:rect.
- ].
-
- self
- grabPointerIn:root id
- withCursor:curs1 id
- pointerMode:#async
- keyboardMode:#sync
- confineTo:nil.
-
- "
- just in case; wait for button to be down ...
- "
- [self leftButtonPressed] whileFalse:[Delay waitForSeconds:0.05].
-
- keepExtent ifTrue:[
- p := self pointerPosition.
- origin := p.
- corner := origin + initialRectangle extent.
- rect := origin corner:corner.
- root displayRectangle:rect.
- ].
-
- [self leftButtonPressed] whileTrue:[
- left := initialRectangle origin x.
- top := initialRectangle origin y.
- right := initialRectangle corner x.
- bottom := initialRectangle corner y.
-
- p := self pointerPosition.
- keepExtent ifTrue:[
- newOrigin := p.
- newCorner := newOrigin + initialRectangle extent.
- curs := curs1.
- ] ifFalse:[
- p x < initialRectangle left ifTrue:[
- p y < initialRectangle top ifTrue:[
- curs := Cursor topLeft.
- left := p x.
- top := p y.
- ] ifFalse:[
- curs := Cursor bottomLeft.
- left := p x.
- bottom := p y
- ]
- ] ifFalse:[
- p y < initialRectangle top ifTrue:[
- curs := Cursor topRight.
- right := p x.
- top := p y
- ] ifFalse:[
- curs := Cursor bottomRight.
- right := p x.
- bottom := p y
- ]
- ].
-
- newOrigin := left @ top.
- newCorner := right @ bottom.
- ].
-
- ((newOrigin ~= origin) or:[newCorner ~= corner]) ifTrue:[
- root displayRectangle:rect.
-
- self grabPointerIn:root id
- withCursor:curs id
- pointerMode:#async
- keyboardMode:#sync
- confineTo:nil.
-
- origin := newOrigin.
- corner := newCorner.
- rect := origin corner:corner.
- root displayRectangle:rect.
- self disposeButtonEventsFor:nil.
- self flush.
- ] ifFalse:[
- Delay waitForSeconds:0.05
- ]
- ].
- root displayRectangle:rect.
- self ungrabPointer.
+ |left right top bottom newOrigin newCorner p curs|
+
+ keepExtent ifFalse:[
+ corner := origin.
+ rect := origin corner:corner.
+ root displayRectangle:rect.
+ ].
+
+ self
+ grabPointerIn:root id
+ withCursor:curs1 id
+ pointerMode:#async
+ keyboardMode:#sync
+ confineTo:nil.
+
+ "
+ just in case; wait for button to be down ...
+ "
+ [self leftButtonPressed] whileFalse:[Delay waitForSeconds:0.05].
+
+ keepExtent ifTrue:[
+ p := self pointerPosition.
+ origin := p.
+ corner := origin + initialRectangle extent.
+ rect := origin corner:corner.
+ root displayRectangle:rect.
+ ].
+
+ [self leftButtonPressed] whileTrue:[
+ left := initialRectangle origin x.
+ top := initialRectangle origin y.
+ right := initialRectangle corner x.
+ bottom := initialRectangle corner y.
+
+ p := self pointerPosition.
+ keepExtent ifTrue:[
+ newOrigin := p.
+ newCorner := newOrigin + initialRectangle extent.
+ curs := curs1.
+ ] ifFalse:[
+ p x < initialRectangle left ifTrue:[
+ p y < initialRectangle top ifTrue:[
+ curs := Cursor topLeft.
+ left := p x.
+ top := p y.
+ ] ifFalse:[
+ curs := Cursor bottomLeft.
+ left := p x.
+ bottom := p y
+ ]
+ ] ifFalse:[
+ p y < initialRectangle top ifTrue:[
+ curs := Cursor topRight.
+ right := p x.
+ top := p y
+ ] ifFalse:[
+ curs := Cursor bottomRight.
+ right := p x.
+ bottom := p y
+ ]
+ ].
+
+ newOrigin := left @ top.
+ newCorner := right @ bottom.
+ ].
+
+ ((newOrigin ~= origin) or:[newCorner ~= corner]) ifTrue:[
+ root displayRectangle:rect.
+ doRegrab ifTrue:[
+ self grabPointerIn:root id
+ withCursor:curs id
+ pointerMode:#async
+ keyboardMode:#sync
+ confineTo:nil.
+ ].
+
+ origin := newOrigin.
+ corner := newCorner.
+ rect := origin corner:corner.
+ root displayRectangle:rect.
+ self disposeButtonEventsFor:nil.
+ self flush.
+ ] ifFalse:[
+ Delay waitForSeconds:0.05
+ ]
+ ].
+ root displayRectangle:rect.
+ self ungrabPointer.
].
self ungrabPointer.
@@ -4799,7 +4805,7 @@
"
"Created: / 24.7.1997 / 15:26:47 / cg"
- "Modified: / 18.8.1998 / 15:00:29 / cg"
+ "Modified: / 10.9.1998 / 17:38:41 / cg"
!
topviewFromUser
@@ -6100,6 +6106,6 @@
!DeviceWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.266 1998-09-08 10:06:09 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.267 1998-09-10 16:23:49 cg Exp $'
! !
DeviceWorkstation initialize!