Merge jv
authorHG Automerge
Wed, 25 Jan 2017 17:20:12 +0000
branchjv
changeset 7803 14d6df784ebb
parent 7802 4317b5ed6b82 (current diff)
parent 7792 36150f514d6a (diff)
child 7854 295325696e0d
Merge
DeviceWorkstation.st
GraphicsMedium.st
ShadowView.st
SimpleView.st
TranslucentColor.st
XWorkstation.st
--- a/BitmapFillStyle.st	Thu Jan 19 11:54:19 2017 +0000
+++ b/BitmapFillStyle.st	Wed Jan 25 17:20:12 2017 +0000
@@ -1,5 +1,18 @@
+"
+ COPYRIGHT (c) 2014 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
 "{ Package: 'stx:libview' }"
 
+"{ NameSpace: Smalltalk }"
+
 FillStyle subclass:#BitmapFillStyle
 	instanceVariableNames:'form origin direction'
 	classVariableNames:''
@@ -9,6 +22,21 @@
 
 !BitmapFillStyle class methodsFor:'documentation'!
 
+copyright
+"
+ COPYRIGHT (c) 2014 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+"
+!
+
 documentation
 "
     an as-yet unused class.
@@ -27,14 +55,13 @@
 "
 ! !
 
-
 !BitmapFillStyle class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/BitmapFillStyle.st,v 1.3 2014-12-19 21:31:31 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/BitmapFillStyle.st,v 1.3 2014-12-19 21:31:31 cg Exp $'
+    ^ '$Header$'
 ! !
 
--- a/Color.st	Thu Jan 19 11:54:19 2017 +0000
+++ b/Color.st	Wed Jan 25 17:20:12 2017 +0000
@@ -49,19 +49,23 @@
 
 documentation
 "
-    Color represents colors in a device independent manner, main info I keep about
-    mySelf are the red, green and blue components scaled into 0 .. MaxValue.
-    The device specific color can be acquired by sending a color the 'onDevice:aDevice' message,
-    which will return a color with the same rgb values as the receiver but specific
-    for that device.
-
-    Most of the device dependent coding was to support limited graphics devices (non-true color)
+    Color represents colors in a device independent manner.
+    The main info I keep in mySelf are the red, green and blue components scaled into 0 .. MaxValue.
+    
+    A device specific color can be acquired by sending a color the 'onDevice:aDevice' message,
+    which will return a color with the same r/g/b values as the receiver but with a specific
+    colorID for that device (which may or may not imply a colormap slot allocation on that device).
+    A device-specific color index (i.e. palette-ID) is then found in the newly allocated color's colorID slot.
+    
+    Most of the device dependent coding was to support limited graphics devices (non truecolor, eg. palette)
     in a transparent way. This was required at that time (late 80's, early 90's),
-    but is now almost obsolete, as these days, virtually any graphic systems supports it.
+    but is now almost obsolete, as these days, virtually any graphic systems supports true colors.
     It is arguably, if that stuff should remain here, or if we should simply give up support
-    for old VGA-like displays.
-
-    Colors can be pure or dithered, depending on the capabilities of the device.
+    for old VGA-like displays 
+    (actually, there are still such limited displays around, for example in the embedded area.
+     So we will leave that support in for another few years ;-) ).
+
+    On such limited devices, colors can be pure or dithered, depending on the capabilities of the device.
     For plain colors, the colorId-instvar is a handle (usually lookup-table entry) for that
     device. For dithered colors, the colorId is nil and ditherForm specifies the form
     used to dither that color. The ditherForm can be either a depth-1 bitmap or a pixmap
@@ -4854,18 +4858,17 @@
         ]
     ].
 
-    "/ round a bit within 1% in red & green, 2% in blue
-
     rV := red.
     gV := green.
     bV := blue.
 
+"/    "/ round a bit within 1% in red & green, 2% in blue
 "/    rV := (red / 100.0) rounded * 100.
 "/    gV := (green / 100.0) rounded * 100.
 "/    bV := (blue / 50.0) rounded * 50.
-
-    "/ if I am already assigned to that device ...
-
+"/
+"/    "/ if I am already assigned to that device ...
+"/
 "/    ((device == aDevice) and:[ditherForm notNil]) ifTrue:[
 "/
 "/        "/ mhmh - if I was dithered the last time (not enough colors then)
--- a/DeviceWorkstation.st	Thu Jan 19 11:54:19 2017 +0000
+++ b/DeviceWorkstation.st	Wed Jan 25 17:20:12 2017 +0000
@@ -3614,12 +3614,17 @@
 !
 
 colorScaledRed:red scaledGreen:green scaledBlue:blue
+    "return an id for a color.
+     On trueColor displays, nothing is actually allocated,
+     and the returned colorID is formed by simply packing the RGB values." 
+    
     visualType == #TrueColor ifTrue:[
-	^ (((red asInteger bitShift:-8) bitShift:redShift)
-	  bitOr:((green asInteger bitShift:-8) bitShift:greenShift))
-	  bitOr:((blue asInteger bitShift:-8) bitShift:blueShift)
-    ].
-    self subclassResponsibility:'only supported for trueColor displays'
+        ^ (((red asInteger bitShift:-8) bitShift:redShift)
+          bitOr:((green asInteger bitShift:-8) bitShift:greenShift))
+          bitOr:((blue asInteger bitShift:-8) bitShift:blueShift)
+    ].
+
+    self subclassResponsibility:'this fallback is only valid for trueColor displays'
 
     "Modified: / 03-02-2014 / 11:30:23 / cg"
 !
--- a/FillStyle.st	Thu Jan 19 11:54:19 2017 +0000
+++ b/FillStyle.st	Wed Jan 25 17:20:12 2017 +0000
@@ -1,5 +1,18 @@
+"
+ COPYRIGHT (c) 2014 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
 "{ Package: 'stx:libview' }"
 
+"{ NameSpace: Smalltalk }"
+
 Object subclass:#FillStyle
 	instanceVariableNames:''
 	classVariableNames:''
@@ -9,6 +22,21 @@
 
 !FillStyle class methodsFor:'documentation'!
 
+copyright
+"
+ COPYRIGHT (c) 2014 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+"
+!
+
 documentation
 "
     an as-yet unused class.
@@ -27,15 +55,13 @@
 "
 ! !
 
-
-
 !FillStyle class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/FillStyle.st,v 1.3 2014-12-19 21:31:26 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/FillStyle.st,v 1.3 2014-12-19 21:31:26 cg Exp $'
+    ^ '$Header$'
 ! !
 
--- a/GradientFillStyle.st	Thu Jan 19 11:54:19 2017 +0000
+++ b/GradientFillStyle.st	Wed Jan 25 17:20:12 2017 +0000
@@ -1,5 +1,18 @@
+"
+ COPYRIGHT (c) 2014 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
 "{ Package: 'stx:libview' }"
 
+"{ NameSpace: Smalltalk }"
+
 FillStyle subclass:#GradientFillStyle
 	instanceVariableNames:'colorRamp radial origin direction'
 	classVariableNames:''
@@ -9,6 +22,21 @@
 
 !GradientFillStyle class methodsFor:'documentation'!
 
+copyright
+"
+ COPYRIGHT (c) 2014 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+"
+!
+
 documentation
 "
     an as-yet unused class.
@@ -27,15 +55,13 @@
 "
 ! !
 
-
-
 !GradientFillStyle class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/GradientFillStyle.st,v 1.3 2014-12-19 21:31:27 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/GradientFillStyle.st,v 1.3 2014-12-19 21:31:27 cg Exp $'
+    ^ '$Header$'
 ! !
 
--- a/GraphicsMedium.st	Thu Jan 19 11:54:19 2017 +0000
+++ b/GraphicsMedium.st	Wed Jan 25 17:20:12 2017 +0000
@@ -1803,10 +1803,8 @@
 displayRectangle:aRectangle
     "draw a rectangle"
 
-    self displayRectangleX:(aRectangle left)
-			 y:(aRectangle top)
-		     width:(aRectangle width)
-		    height:(aRectangle height)
+    gc displayRectangleX:(aRectangle left) y:(aRectangle top)
+       width:(aRectangle width) height:(aRectangle height)
 !
 
 displayRectangleOrigin:origin corner:corner
--- a/OrientedFillStyle.st	Thu Jan 19 11:54:19 2017 +0000
+++ b/OrientedFillStyle.st	Wed Jan 25 17:20:12 2017 +0000
@@ -1,5 +1,18 @@
+"
+ COPYRIGHT (c) 2014 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
 "{ Package: 'stx:libview' }"
 
+"{ NameSpace: Smalltalk }"
+
 FillStyle subclass:#OrientedFillStyle
 	instanceVariableNames:'form origin direction normal'
 	classVariableNames:''
@@ -9,6 +22,21 @@
 
 !OrientedFillStyle class methodsFor:'documentation'!
 
+copyright
+"
+ COPYRIGHT (c) 2014 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+"
+!
+
 documentation
 "
     an as-yet unused class.
@@ -27,14 +55,13 @@
 "
 ! !
 
-
 !OrientedFillStyle class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/OrientedFillStyle.st,v 1.3 2014-12-19 21:31:33 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/OrientedFillStyle.st,v 1.3 2014-12-19 21:31:33 cg Exp $'
+    ^ '$Header$'
 ! !
 
--- a/ShadowView.st	Thu Jan 19 11:54:19 2017 +0000
+++ b/ShadowView.st	Wed Jan 25 17:20:12 2017 +0000
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1991 by Claus Gittinger
 	      All Rights Reserved
@@ -101,8 +99,8 @@
                                    width:width height:hs.
 
     ] ifFalse:[
-        self paint:shadowClr.
-        self fillRectangleX:(width - ws) y:0 width:ws height:height
+        gc paint:shadowClr.
+        gc fillRectangleX:(width - ws) y:0 width:ws height:height
     ]
 
     "Modified: 12.5.1996 / 22:00:05 / cg"
--- a/SimpleView.st	Thu Jan 19 11:54:19 2017 +0000
+++ b/SimpleView.st	Wed Jan 25 17:20:12 2017 +0000
@@ -1526,11 +1526,16 @@
 
     |newDevice|
 
+    (XWorkstation notNil and:[ XWorkstation isLoaded ]) ifFalse:[
+        self warn:'Could not open display (no XWorkstation class)'.
+        ^ self
+    ].    
+    
     [
-	newDevice := XWorkstation newDispatchingFor:aScreenName.
+        newDevice := XWorkstation newDispatchingFor:aScreenName.
     ] on:Screen deviceOpenErrorSignal do:[:ex|
-	self warn:'Could not open display: ' , aScreenName.
-	^ self
+        self warn:'Could not open display: ' , aScreenName.
+        ^ self
     ].
     ^ (self onDevice:newDevice) open.
 
@@ -4186,9 +4191,13 @@
 controller:aController
     "set the controller - that's the one handling user events"
 
-    controller := aController.
-    controller notNil ifTrue:[
-	controller view:self.
+    aController == self ifTrue:[
+        controller := nil
+    ] ifFalse:[    
+        controller := aController.
+        controller notNil ifTrue:[
+            controller view:self.
+        ]
     ]
 
     "Modified: / 31.10.1997 / 19:58:33 / cg"
@@ -10553,10 +10562,8 @@
     "redraw a part of the view immediately."
 
     self
-	redrawX:(aRectangle left)
-	      y:(aRectangle top)
-	  width:(aRectangle width)
-	 height:(aRectangle height)
+        redrawX:(aRectangle left) y:(aRectangle top)
+        width:(aRectangle width) height:(aRectangle height)
 
     "Modified: 19.4.1997 / 11:54:23 / cg"
 !
--- a/SolidFillStyle.st	Thu Jan 19 11:54:19 2017 +0000
+++ b/SolidFillStyle.st	Wed Jan 25 17:20:12 2017 +0000
@@ -1,5 +1,18 @@
+"
+ COPYRIGHT (c) 2014 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
 "{ Package: 'stx:libview' }"
 
+"{ NameSpace: Smalltalk }"
+
 FillStyle subclass:#SolidFillStyle
 	instanceVariableNames:'color'
 	classVariableNames:''
@@ -9,6 +22,21 @@
 
 !SolidFillStyle class methodsFor:'documentation'!
 
+copyright
+"
+ COPYRIGHT (c) 2014 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+"
+!
+
 documentation
 "
     an as-yet unused class.
@@ -27,15 +55,13 @@
 "
 ! !
 
-
-
 !SolidFillStyle class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SolidFillStyle.st,v 1.4 2014-12-19 21:31:29 cg Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/SolidFillStyle.st,v 1.4 2014-12-19 21:31:29 cg Exp $'
+    ^ '$Header$'
 ! !
 
--- a/TranslucentColor.st	Thu Jan 19 11:54:19 2017 +0000
+++ b/TranslucentColor.st	Wed Jan 25 17:20:12 2017 +0000
@@ -1,5 +1,18 @@
+"
+ COPYRIGHT (c) 1999 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
 "{ Package: 'stx:libview' }"
 
+"{ NameSpace: Smalltalk }"
+
 Color subclass:#TranslucentColor
 	instanceVariableNames:'alpha'
 	classVariableNames:''
@@ -9,6 +22,20 @@
 
 !TranslucentColor class methodsFor:'documentation'!
 
+copyright
+"
+ COPYRIGHT (c) 1999 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
 documentation
 "
     TranslucentColor represents colors with an alpha (transparency)
@@ -140,6 +167,6 @@
 !TranslucentColor class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/TranslucentColor.st,v 1.5 2014-03-22 09:26:53 cg Exp $'
+    ^ '$Header$'
 ! !
 
--- a/WidgetEvent.st	Thu Jan 19 11:54:19 2017 +0000
+++ b/WidgetEvent.st	Wed Jan 25 17:20:12 2017 +0000
@@ -1,5 +1,18 @@
+"
+ COPYRIGHT (c) 2011 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
 "{ Package: 'stx:libview' }"
 
+"{ NameSpace: Smalltalk }"
+
 WindowEvent subclass:#WidgetEvent
 	instanceVariableNames:''
 	classVariableNames:''
@@ -9,6 +22,20 @@
 
 !WidgetEvent class methodsFor:'documentation'!
 
+copyright
+"
+ COPYRIGHT (c) 2011 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
 documentation
 "
     Abstract superclass for higher level internal widget events (like menu-selections).
@@ -26,5 +53,6 @@
 !WidgetEvent class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/WidgetEvent.st,v 1.2 2011-07-05 11:28:41 cg Exp $'
+    ^ '$Header$'
 ! !
+
--- a/XWorkstation.st	Thu Jan 19 11:54:19 2017 +0000
+++ b/XWorkstation.st	Wed Jan 25 17:20:12 2017 +0000
@@ -2926,7 +2926,9 @@
 
 colorNamed:aString
     "allocate a color with color name - return the color index (i.e. colorID).
-     Don't use this method, colornames are mostly X specific"
+     On trueColor displays, nothing is actually allocated,
+     and the returned colorID is formed by simply packing the RGB values.
+     Don't use this method, colornames are mostly X specific."
 
     <context: #return>
 %{
@@ -2939,42 +2941,45 @@
 
     if (ISCONNECTED
      && __isStringLike(aString)) {
-        Display *dpy = myDpy;
-
-        colorname = (char *) __stringVal(aString);
-
-
-        ENTER_XLIB();
-        ok = XParseColor(dpy, DefaultColormap(dpy, screen), colorname, &ecolor);
-        LEAVE_XLIB();
-        if (ok) {
+	Display *dpy = myDpy;
+
+	colorname = (char *) __stringVal(aString);
+
+
+	ENTER_XLIB();
+	ok = XParseColor(dpy, DefaultColormap(dpy, screen), colorname, &ecolor);
+	LEAVE_XLIB();
+	if (ok) {
 #ifdef QUICK_TRUE_COLORS
-            if (__INST(visualType) == @symbol(TrueColor)) {
-                id = ((ecolor.red >> (16 - __intVal(__INST(bitsRed)))) << __intVal(__INST(redShift))) & __intVal(__INST(redMask));
-                id += ((ecolor.green >> (16 - __intVal(__INST(bitsGreen)))) << __intVal(__INST(greenShift))) & __intVal(__INST(greenMask));
-                id += ((ecolor.blue >> (16 - __intVal(__INST(bitsBlue)))) << __intVal(__INST(blueShift))) & __intVal(__INST(blueMask));
-                RETURN ( __MKSMALLINT(id) );
-            }
-#endif
-            ENTER_XLIB();
-            ok = XAllocColor(dpy, DefaultColormap(dpy, screen), &ecolor);
-            LEAVE_XLIB();
-        }
-
-        if (! ok) {
-            RETURN ( nil );
-        }
+	    if (__INST(visualType) == @symbol(TrueColor)) {
+		id = ((ecolor.red >> (16 - __intVal(__INST(bitsRed)))) << __intVal(__INST(redShift))) & __intVal(__INST(redMask));
+		id += ((ecolor.green >> (16 - __intVal(__INST(bitsGreen)))) << __intVal(__INST(greenShift))) & __intVal(__INST(greenMask));
+		id += ((ecolor.blue >> (16 - __intVal(__INST(bitsBlue)))) << __intVal(__INST(blueShift))) & __intVal(__INST(blueMask));
+		RETURN ( __MKSMALLINT(id) );
+	    }
+#endif
+	    ENTER_XLIB();
+	    ok = XAllocColor(dpy, DefaultColormap(dpy, screen), &ecolor);
+	    LEAVE_XLIB();
+	}
+
+	if (! ok) {
+	    RETURN ( nil );
+	}
 #ifdef COUNT_RESOURCES
-        __cnt_color++;
-#endif
-        RETURN ( __MKSMALLINT(ecolor.pixel) );
+	__cnt_color++;
+#endif
+	RETURN ( __MKSMALLINT(ecolor.pixel) );
     }
 %}.
     ^ super colorNamed:aString
 !
 
 colorScaledRed:r scaledGreen:g scaledBlue:b
-    "allocate a color with rgb values (0..16rFFFF) - return the color index (i.e. colorID)"
+    "allocate a color with rgb values (0..16rFFFF)
+     - return the color index (i.e. colorID).
+     On trueColor displays, nothing is actually allocated,
+     and the returned colorID is formed by simply packing the RGB values."
 
     <context: #return>
 %{
@@ -5219,29 +5224,29 @@
     ].
 
     logicalButton isInteger ifTrue:[
-        buttonsPressed := buttonsPressed bitOr:(1 bitShift:logicalButton-1).
+	buttonsPressed := buttonsPressed bitOr:(1 bitShift:logicalButton-1).
     ].
 
     (multiClickTimeDelta notNil and:[lastButtonPressTime notNil]) ifTrue:[
-        time < (lastButtonPressTime + multiClickTimeDelta) ifTrue:[
-            lastButtonPressTime := time.
-            self buttonMultiPress:logicalButton x:x y:y view:view.
-            ^ self.
-        ].
+	time < (lastButtonPressTime + multiClickTimeDelta) ifTrue:[
+	    lastButtonPressTime := time.
+	    self buttonMultiPress:logicalButton x:x y:y view:view.
+	    ^ self.
+	].
     ].
     lastButtonPressTime := time.
 
     view isNil ifTrue:[
-        "/ event arrived, after I destroyed it myself
-        ^ self
+	"/ event arrived, after I destroyed it myself
+	^ self
     ].
     logicalButton == 1 ifTrue:[
-        activateOnClick == true ifTrue:[
-            "/ don't raise above an active popup view.
-            (activeKeyboardGrab isNil and:[activePointerGrab isNil]) ifTrue:[
-                view topView raise.
-            ]
-        ].
+	activateOnClick == true ifTrue:[
+	    "/ don't raise above an active popup view.
+	    (activeKeyboardGrab isNil and:[activePointerGrab isNil]) ifTrue:[
+		view topView raise.
+	    ]
+	].
     ].
     super buttonPress:logicalButton x:x y:y view:view
 !
@@ -6696,19 +6701,19 @@
     "forward a button-press event for some view"
 
     aView isNil ifTrue:[
-        "/ event arrived, after I destroyed it myself
-        ^ self
+	"/ event arrived, after I destroyed it myself
+	^ self
     ].
     button == 1 ifTrue:[
-        activateOnClick == true ifTrue:[
-            "/ don't raise above an active popup view.
-            (activeKeyboardGrab isNil and:[activePointerGrab isNil]) ifTrue:[
-                aView topView raise.
+	activateOnClick == true ifTrue:[
+	    "/ don't raise above an active popup view.
+	    (activeKeyboardGrab isNil and:[activePointerGrab isNil]) ifTrue:[
+		aView topView raise.
 "/            ] ifFalse:[
 "/                activeKeyboardGrab printCR.
 "/                activePointerGrab printCR.
-            ]
-        ].
+	    ]
+	].
     ].
     super buttonPress:button x:x y:y view:aView
 ! !
@@ -9506,12 +9511,12 @@
     hasColors := hasGreyscales := true.
     (visualType == #StaticGray
      or:[ visualType == #GrayScale]) ifTrue:[
-        hasColors := false.
-        monitorType := #monochrome.
+	hasColors := false.
+	monitorType := #monochrome.
     ].
 
     ncells == 2 ifTrue:[
-        hasColors := hasGreyscales := false.
+	hasColors := hasGreyscales := false.
     ].
 
     masks := self queryRGBMasks.
@@ -9521,13 +9526,13 @@
     bitsPerRGB := masks at:4.
 
     visualType == #TrueColor ifTrue:[
-        redShift := redMask lowBit - 1.
-        greenShift := greenMask lowBit - 1.
-        blueShift := blueMask lowBit - 1.
-
-        bitsRed := redMask highBit - redMask lowBit + 1.
-        bitsGreen := greenMask highBit - greenMask lowBit + 1.
-        bitsBlue := blueMask highBit - blueMask lowBit + 1.
+	redShift := redMask lowBit - 1.
+	greenShift := greenMask lowBit - 1.
+	blueShift := blueMask lowBit - 1.
+
+	bitsRed := redMask highBit - redMask lowBit + 1.
+	bitsGreen := greenMask highBit - greenMask lowBit + 1.
+	bitsBlue := blueMask highBit - blueMask lowBit + 1.
     ].
 
 %{
@@ -9546,52 +9551,52 @@
     int dummy;
 
     if (ISCONNECTED) {
-        dpy = myDpy;
-
-        /*
-         * look for RGB visual with the highest depth
-         */
-        nvi = 0;
-        viproto.screen = scr;
-        vip = XGetVisualInfo (dpy, VisualScreenMask, &viproto, &nvi);
-        maxRGBDepth = maxRGBADepth = 0;
-        for (i = 0; i < nvi; i++) {
-            int thisDepth = vip[i].depth;
-
-            switch (vip[i].class) {
-                case TrueColor:
-                    if (thisDepth > maxRGBDepth) {
-                        if (thisDepth <= 24) {
-                            maxRGBDepth = thisDepth;
-                            rgbRedMask = vip[i].red_mask;
-                            rgbGreenMask = vip[i].green_mask;
-                            rgbBlueMask = vip[i].blue_mask;
-                            rgbVisualID = vip[i].visualid;
-                        } else {
-                            if (thisDepth > maxRGBADepth) {
-                                // printf("found rgba visual!\n");
-                                maxRGBADepth = thisDepth;
-                                rgbaRedMask = vip[i].red_mask;
-                                rgbaGreenMask = vip[i].green_mask;
-                                rgbaBlueMask = vip[i].blue_mask;
-                                rgbaVisualID = vip[i].visualid;
-                            }
-                        }
-                    }
-                    break;
-            }
-        }
-        if (vip) XFree ((char *) vip);
-
-        if (maxRGBDepth) {
-            __INST(rgbVisual) = __MKEXTERNALADDRESS(rgbVisualID); __STORESELF(rgbVisual);
-        }
-        if (maxRGBADepth) {
-            __INST(rgbaVisual) = __MKEXTERNALADDRESS(rgbaVisualID); __STORESELF(rgbaVisual);
-            if (!maxRGBDepth) {
-                __INST(rgbVisual) = __INST(rgbaVisual); __STORESELF(rgbVisual);
-            }
-        }
+	dpy = myDpy;
+
+	/*
+	 * look for RGB visual with the highest depth
+	 */
+	nvi = 0;
+	viproto.screen = scr;
+	vip = XGetVisualInfo (dpy, VisualScreenMask, &viproto, &nvi);
+	maxRGBDepth = maxRGBADepth = 0;
+	for (i = 0; i < nvi; i++) {
+	    int thisDepth = vip[i].depth;
+
+	    switch (vip[i].class) {
+		case TrueColor:
+		    if (thisDepth > maxRGBDepth) {
+			if (thisDepth <= 24) {
+			    maxRGBDepth = thisDepth;
+			    rgbRedMask = vip[i].red_mask;
+			    rgbGreenMask = vip[i].green_mask;
+			    rgbBlueMask = vip[i].blue_mask;
+			    rgbVisualID = vip[i].visualid;
+			} else {
+			    if (thisDepth > maxRGBADepth) {
+				// printf("found rgba visual!\n");
+				maxRGBADepth = thisDepth;
+				rgbaRedMask = vip[i].red_mask;
+				rgbaGreenMask = vip[i].green_mask;
+				rgbaBlueMask = vip[i].blue_mask;
+				rgbaVisualID = vip[i].visualid;
+			    }
+			}
+		    }
+		    break;
+	    }
+	}
+	if (vip) XFree ((char *) vip);
+
+	if (maxRGBDepth) {
+	    __INST(rgbVisual) = __MKEXTERNALADDRESS(rgbVisualID); __STORESELF(rgbVisual);
+	}
+	if (maxRGBADepth) {
+	    __INST(rgbaVisual) = __MKEXTERNALADDRESS(rgbaVisualID); __STORESELF(rgbaVisual);
+	    if (!maxRGBDepth) {
+		__INST(rgbVisual) = __INST(rgbaVisual); __STORESELF(rgbVisual);
+	    }
+	}
 
     }
 #ifdef SHM