XWorkstation.st
branchjv
changeset 7715 925b859e1758
parent 7599 84f6853ec60d
parent 7662 b603d95107c2
child 7716 3dba89415c91
--- a/XWorkstation.st	Fri Nov 18 20:50:35 2016 +0000
+++ b/XWorkstation.st	Fri Nov 18 21:26:33 2016 +0000
@@ -2910,7 +2910,7 @@
 
 colorNamed:aString
     "allocate a color with color name - return the color index (i.e. colorID).
-     Dont use this method, colornames are mostly X specific"
+     Don't use this method, colornames are mostly X specific"
 
     <context: #return>
 %{
@@ -2923,35 +2923,35 @@
 
     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
@@ -5203,29 +5203,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:[
-	    "/ dont 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
 !
@@ -6680,24 +6680,21 @@
     "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:[
-	    "/ dont 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
-
-
-
 ! !
 
 !XWorkstation methodsFor:'event sending'!