XWorkstation.st
changeset 8760 177561518e39
parent 8759 d0067d2da2ef
child 8761 b8c491882560
--- a/XWorkstation.st	Mon Aug 05 21:23:18 2019 +0200
+++ b/XWorkstation.st	Tue Aug 06 11:34:14 2019 +0200
@@ -2,7 +2,7 @@
 
 "
 COPYRIGHT (c) 1989 by Claus Gittinger
-              All Rights Reserved
+	      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
@@ -16,51 +16,51 @@
 "{ NameSpace: Smalltalk }"
 
 DeviceWorkstation subclass:#XWorkstation
-        instanceVariableNames:'hasShapeExtension hasShmExtension hasDPSExtension
-                hasMbufExtension hasXVideoExtension hasSaveUnder hasPEXExtension
-                hasImageExtension hasInputExtension hasXineramaExtension
-                hasRenderExtension hasXTestExtension hasXftLibrary
-                ignoreBackingStore blackpixel whitepixel atoms protocolsAtom
-                deleteWindowAtom saveYourselfAtom quitAppAtom primaryAtom
-                clipboardAtom stringAtom wmStateAtom motifWMHintsAtom
-                listOfXFonts buttonsPressed eventRootX eventRootY displayName
-                eventTrace dispatchingExpose rgbVisual rgbaVisual virtualRootId
-                rootId altModifierMask metaModifierMask lastEventTime
-                rawMonitorBounds monitorBounds lastButtonPressTime
-                lastButtonPressPosition deviceIOTimeoutErrorSignal
-                activateOnClick rawKeySymTranslation clipboardSelectionTime
-                primarySelectionTime selectionFetchers selectionHandlers
-                preWaitAction xlibTimeout xlibTimeoutForWindowCreation
-                hasConnectionBroken uniqueDeviceID stxDeviceAtom uuidAtom
-                primaryBuffer windowGroupWindow maxOperationsUntilFlush
-                operationsUntilFlush lastError'
-        classVariableNames:'RawKeySymTranslation ConservativeSync MaxStringLength
-                DefaultXLibTimeout DefaultXLibTimeoutForWindowCreation
-                ErrorDBCache'
-        poolDictionaries:''
-        category:'Interface-Graphics'
+	instanceVariableNames:'hasShapeExtension hasShmExtension hasDPSExtension
+		hasMbufExtension hasXVideoExtension hasSaveUnder hasPEXExtension
+		hasImageExtension hasInputExtension hasXineramaExtension
+		hasRenderExtension hasXTestExtension hasXftLibrary
+		ignoreBackingStore blackpixel whitepixel atoms protocolsAtom
+		deleteWindowAtom saveYourselfAtom quitAppAtom primaryAtom
+		clipboardAtom stringAtom wmStateAtom motifWMHintsAtom
+		listOfXFonts buttonsPressed eventRootX eventRootY displayName
+		eventTrace dispatchingExpose rgbVisual rgbaVisual virtualRootId
+		rootId altModifierMask metaModifierMask lastEventTime
+		rawMonitorBounds monitorBounds lastButtonPressTime
+		lastButtonPressPosition deviceIOTimeoutErrorSignal
+		activateOnClick rawKeySymTranslation clipboardSelectionTime
+		primarySelectionTime selectionFetchers selectionHandlers
+		preWaitAction xlibTimeout xlibTimeoutForWindowCreation
+		hasConnectionBroken uniqueDeviceID stxDeviceAtom uuidAtom
+		primaryBuffer windowGroupWindow maxOperationsUntilFlush
+		operationsUntilFlush lastError'
+	classVariableNames:'RawKeySymTranslation ConservativeSync MaxStringLength
+		DefaultXLibTimeout DefaultXLibTimeoutForWindowCreation
+		ErrorDBCache'
+	poolDictionaries:''
+	category:'Interface-Graphics'
 !
 
 Object subclass:#PseudoDeviceWithoutXFTSupport
-        instanceVariableNames:'realDevice'
-        classVariableNames:''
-        poolDictionaries:''
-        privateIn:XWorkstation
+	instanceVariableNames:'realDevice'
+	classVariableNames:''
+	poolDictionaries:''
+	privateIn:XWorkstation
 !
 
 Object subclass:#SelectionFetcher
-        instanceVariableNames:'sema message display drawableID selectionID propertyID targetID
-                buffer done incremental'
-        classVariableNames:''
-        poolDictionaries:''
-        privateIn:XWorkstation
+	instanceVariableNames:'sema message display drawableID selectionID propertyID targetID
+		buffer done incremental'
+	classVariableNames:''
+	poolDictionaries:''
+	privateIn:XWorkstation
 !
 
 SimpleView subclass:#WindowGroupWindow
-        instanceVariableNames:''
-        classVariableNames:''
-        poolDictionaries:''
-        privateIn:XWorkstation
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	privateIn:XWorkstation
 !
 
 !XWorkstation primitiveDefinitions!
@@ -130,16 +130,16 @@
 extern OBJ __GLOBAL_GET_BY_NAME(char *);
 
 # define __HANDLE_VAL(type, externalAddress) \
-        ((type)__externalAddressVal(externalAddress))
+	((type)__externalAddressVal(externalAddress))
 
 # define __HANDLE_NEW(ptr, __cls)                    \
-        ({                                           \
-            OBJ handle = __MKEXTERNALADDRESS(ptr);   \
-            OBJ clsObj = __GLOBAL_GET_BY_NAME(__cls);\
-            __InstPtr(handle)->o_class = clsObj;     \
-            __STORE(handle, clsObj);                 \
-            handle;                                  \
-        })
+	({                                           \
+	    OBJ handle = __MKEXTERNALADDRESS(ptr);   \
+	    OBJ clsObj = __GLOBAL_GET_BY_NAME(__cls);\
+	    __InstPtr(handle)->o_class = clsObj;     \
+	    __STORE(handle, clsObj);                 \
+	    handle;                                  \
+	})
 
 /*
  * this define suppresses XAllocColor/XFreeColor on
@@ -303,16 +303,16 @@
  */
 #define __ENTER_XLIB(whichTimeout)   \
     { \
-        __blockingPrimitiveTimoutHandler__ = (voidFUNC)__XTimeoutErrorHandler; \
-        __blockingPrimitiveTimeoutArg__ = self; \
-        __blockingPrimitiveTimeout__ = whichTimeout; \
+	__blockingPrimitiveTimoutHandler__ = (voidFUNC)__XTimeoutErrorHandler; \
+	__blockingPrimitiveTimeoutArg__ = self; \
+	__blockingPrimitiveTimeout__ = whichTimeout; \
     } {
 
 #define LEAVE_XLIB()   \
     { \
-        __blockingPrimitiveTimoutHandler__ = (voidFUNC)0; \
-        __blockingPrimitiveTimeoutArg__ = nil; \
-        __blockingPrimitiveTimeout__ = 0; \
+	__blockingPrimitiveTimoutHandler__ = (voidFUNC)0; \
+	__blockingPrimitiveTimeoutArg__ = nil; \
+	__blockingPrimitiveTimeout__ = 0; \
     } }
 
 #define ENTER_XLIB()   __ENTER_XLIB(__intVal(__INST(xlibTimeout)) * 1000)
@@ -405,18 +405,18 @@
 # endif
 static void
 dummyToForceLoading() {
-        XCreateSimpleWindow(0, 0, 0, 0, 0, 0, 0, 0, 0);
-        XCloseDisplay(0);
-        XCreateImage(0, 0, 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0);
-        XSetWindowColormap(0, 0, 0);
-        XQueryColors(0,0,0,0);
+	XCreateSimpleWindow(0, 0, 0, 0, 0, 0, 0, 0, 0);
+	XCloseDisplay(0);
+	XCreateImage(0, 0, 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0);
+	XSetWindowColormap(0, 0, 0);
+	XQueryColors(0,0,0,0);
 # ifdef SHM
-        XShmAttach(0, 0);
-        XShmCreateImage(0, 0, 0, 0, 0, 0, 0 ,0);
-        XShmDetach(0, 0);
-        XShmPutImage(0, 0, 0, 0 , 0,0,0,0,0,0,0);
-        shmctl(0,0,0);
-        fgetc(0);
+	XShmAttach(0, 0);
+	XShmCreateImage(0, 0, 0, 0, 0, 0, 0 ,0);
+	XShmDetach(0, 0);
+	XShmPutImage(0, 0, 0, 0 , 0,0,0,0,0,0,0);
+	shmctl(0,0,0);
+	fgetc(0);
 # endif  // SHM
 }
 #endif // !ELF
@@ -563,42 +563,42 @@
     lastErrorMsg[127] = '\0';
 
     if (lastErrorMsg[0] == '\0') {
-        sprintf(lastErrorMsg, "code: %d", event->error_code);
+	sprintf(lastErrorMsg, "code: %d", event->error_code);
     }
     lastRequestCode = event->request_code;
     lastMinorCode = event->minor_code;
     lastResource = event->resourceid;
     if ((event->error_code == BadWindow) && (lastRequestCode == 4) && (lastMinorCode == 0)) {
-        /*
-         * this is a BadWindow error for X_DestroyWindow.
-         * ignore it here, since it results from the GC freeing windows
-         * in non bottom-up window order.
-         */
-        return 0;
+	/*
+	 * this is a BadWindow error for X_DestroyWindow.
+	 * ignore it here, since it results from the GC freeing windows
+	 * in non bottom-up window order.
+	 */
+	return 0;
     }
 
     if (@global(DeviceWorkstation:ErrorPrinting) == true) {
-        char *requestName = "?";
-
-        if (event->request_code < (sizeof(requestNames)/sizeof(char *))) {
-            requestName = requestNames[event->request_code];
-        }
-        console_fprintf(stderr, "XWorkstation [error]: x-error caught maj=%d (0x%x) \"%s\", min=%d (0x%x), resource=%"_lx_"\n",
-                        event->request_code, event->request_code, requestName,
-                        event->minor_code, event->minor_code, (INT)(event->resourceid));
-        console_fprintf(stderr, "XWorkstation [error]: x-error message is [%d] '%s'\n",
-                        event->error_code, lastErrorMsg);
+	char *requestName = "?";
+
+	if (event->request_code < (sizeof(requestNames)/sizeof(char *))) {
+	    requestName = requestNames[event->request_code];
+	}
+	console_fprintf(stderr, "XWorkstation [error]: x-error caught maj=%d (0x%x) \"%s\", min=%d (0x%x), resource=%"_lx_"\n",
+			event->request_code, event->request_code, requestName,
+			event->minor_code, event->minor_code, (INT)(event->resourceid));
+	console_fprintf(stderr, "XWorkstation [error]: x-error message is [%d] '%s'\n",
+			event->error_code, lastErrorMsg);
     }
 #if 0
     // cg: should no longer be needed - librun no longer sends an errorInterrupt while running on C-stack
 #ifdef XFT
     if ((strncmp(lastErrorMsg, "RenderBadPicture", 16) == 0)) {
-        /*
-         * this is a RenderBadPicture error from XFT drawing.
-         * ignore it for now, as this is due to an incomplete implementation
-         */
-        console_fprintf(stderr, "XWorkstation [info]: x-error ignored\n");
-        return 0;
+	/*
+	 * this is a RenderBadPicture error from XFT drawing.
+	 * ignore it for now, as this is due to an incomplete implementation
+	 */
+	console_fprintf(stderr, "XWorkstation [info]: x-error ignored\n");
+	return 0;
     }
 #endif
 #endif
@@ -618,10 +618,10 @@
 __XIOErrorHandler__(Display *dpy)
 {
     if (@global(DeviceWorkstation:ErrorPrinting) == true) {
-        console_fprintf(stderr, "XWorkstation [error]: I/O error\n");
+	console_fprintf(stderr, "XWorkstation [error]: I/O error\n");
     }
     __immediateErrorInterruptWithIDAndParameter__(@symbol(DisplayIOError),
-                                                  __MKEXTERNALADDRESS(dpy));
+						  __MKEXTERNALADDRESS(dpy));
 
 #if 0
     /*
@@ -652,12 +652,12 @@
 __XTimeoutErrorHandler(OBJ displayDeviceInst)
 {
     if ((displayDeviceInst == @global(MainDisplay))
-        || (displayDeviceInst == @global(DeviceWorkstation:DefaultScreen))) {
-        console_fprintf(stderr, "XWorkstation [error]: keep display connection for master display after X11 timeout (no shutdown)\n");
-        return;
+	|| (displayDeviceInst == @global(DeviceWorkstation:DefaultScreen))) {
+	console_fprintf(stderr, "XWorkstation [error]: keep display connection for master display after X11 timeout (no shutdown)\n");
+	return;
     }
     if (@global(DeviceWorkstation:ErrorPrinting) == true) {
-        console_fprintf(stderr, "XWorkstation [error]: X11 request timeout dpy=%"_lx_"\n", (INT)displayDeviceInst);
+	console_fprintf(stderr, "XWorkstation [error]: X11 request timeout dpy=%"_lx_"\n", (INT)displayDeviceInst);
     }
     __OINST(displayDeviceInst, hasConnectionBroken) = true;
 
@@ -669,14 +669,14 @@
      * if we return from the error interrupt ...
      */
     if (__OINST(displayDeviceInst, displayId) != nil) {
-        __internalError("unhandled X11 display timeout error");
-
-        /*
-         * the current process failed to do an X11 request.
-         * Terminate it!
-         */
-        __terminateProcess(0);      /* soft terminate */
-        __terminateProcess(1);      /* hard terminate */
+	__internalError("unhandled X11 display timeout error");
+
+	/*
+	 * the current process failed to do an X11 request.
+	 * Terminate it!
+	 */
+	__terminateProcess(0);      /* soft terminate */
+	__terminateProcess(1);      /* hard terminate */
     }
 }
 #endif // __INCREMENTAL_COMPILE__
@@ -689,7 +689,7 @@
 copyright
 "
 COPYRIGHT (c) 1989 by Claus Gittinger
-              All Rights Reserved
+	      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
@@ -715,21 +715,21 @@
     query is answered by the launcher when opening its applications.
 
     Timeouts:
-        sometimes, X-connections are lost and, as the Xlib is blocking and synchronous by
-        default, this would lead to a locked ST/X system.
-        Therefore, this class defines a timeOut, whenever doing an Xlib call.
-        The default for this timeout is 30seconds.
-        This may be a problem with windowmanagers which show a rubber-band rectangle
-        when creating windows.
-        If the user does not specify the rectangle within 30 seconds, the device assumes
-        a timeout and closes the connection.
-        As a (kludgy) workaround, a second timeout value is used for window-creation.
-        This secondary timeout value defaults to 60*5 seconds (5 minutes).
+	sometimes, X-connections are lost and, as the Xlib is blocking and synchronous by
+	default, this would lead to a locked ST/X system.
+	Therefore, this class defines a timeOut, whenever doing an Xlib call.
+	The default for this timeout is 30seconds.
+	This may be a problem with windowmanagers which show a rubber-band rectangle
+	when creating windows.
+	If the user does not specify the rectangle within 30 seconds, the device assumes
+	a timeout and closes the connection.
+	As a (kludgy) workaround, a second timeout value is used for window-creation.
+	This secondary timeout value defaults to 60*5 seconds (5 minutes).
 
     See more documentation in my superclass, DeviceWorkstation.
 
     [author:]
-        Claus Gittinger
+	Claus Gittinger
 "
 ! !
 
@@ -750,18 +750,18 @@
     DefaultXLibTimeoutForWindowCreation := 5*60.
 
     RawKeySymTranslation isNil ifTrue:[
-        "/ the following table maps X-keyevents to ST/X
-        "/ device independend events.
-        "/ It is NOT meant as a keyboardMap replacement.
-
-        RawKeySymTranslation := Dictionary new:6.
-        RawKeySymTranslation
-            at:#'Delete_line' put:#DeleteLine;
-            at:#'Delete_word' put:#DeleteWord;
-            at:#Down put:#CursorDown;
-            at:#Up put:#CursorUp;
-            at:#Left put:#CursorLeft;
-            at:#Right put:#CursorRight.
+	"/ the following table maps X-keyevents to ST/X
+	"/ device independend events.
+	"/ It is NOT meant as a keyboardMap replacement.
+
+	RawKeySymTranslation := Dictionary new:6.
+	RawKeySymTranslation
+	    at:#'Delete_line' put:#DeleteLine;
+	    at:#'Delete_word' put:#DeleteWord;
+	    at:#Down put:#CursorDown;
+	    at:#Up put:#CursorUp;
+	    at:#Left put:#CursorLeft;
+	    at:#Right put:#CursorRight.
     ]
 
     "Modified: / 27.4.1999 / 17:21:30 / cg"
@@ -808,8 +808,8 @@
 %{
 #ifdef COUNT_RESOURCES
     console_fprintf(stderr, "colors:%d bitmaps:%d views:%d gc:%d cursors:%d fonts:%d\n",
-            __cnt_color, __cnt_bitmap,
-            __cnt_view, __cnt_gc, __cnt_cursor, __cnt_font);
+	    __cnt_color, __cnt_bitmap,
+	    __cnt_view, __cnt_gc, __cnt_cursor, __cnt_font);
 #endif
 %}
 
@@ -852,31 +852,31 @@
     "
     match := 'XRequest.' , requestCode printString.
     ErrorDBCache isNil ifTrue:[
-        ErrorDBCache := IdentityDictionary new.
+	ErrorDBCache := IdentityDictionary new.
     ].
 
     "if there is no XErrorDB or no entry, the line for the requestCode is cached as nil"
     line := ErrorDBCache at:requestCode ifAbsentPut:[
-            |errorLine|
-
-            s := '/usr/share/X11/XErrorDB' asFilename readStreamOrNil.
-            s notNil ifTrue:[
-                errorLine := s peekForLineStartingWith:match.
-                errorLine notNil ifTrue:[
-                    errorLine := errorLine copyFrom:(errorLine indexOf:$:)+1.
-                ].
-                s close.
-            ].
-            errorLine
-        ].
+	    |errorLine|
+
+	    s := '/usr/share/X11/XErrorDB' asFilename readStreamOrNil.
+	    s notNil ifTrue:[
+		errorLine := s peekForLineStartingWith:match.
+		errorLine notNil ifTrue:[
+		    errorLine := errorLine copyFrom:(errorLine indexOf:$:)+1.
+		].
+		s close.
+	    ].
+	    errorLine
+	].
 
     line isNil ifTrue:[
-        line := match
+	line := match
     ].
     ^ string , ' in ' , line.
 
     "
-        Screen lastErrorString
+	Screen lastErrorString
     "
 !
 
@@ -898,7 +898,7 @@
 %{  /* NOCONTEXT */
 
       if (lastResource != 0) {
-         RETURN ( __MKEXTERNALADDRESS(lastResource) );
+	 RETURN ( __MKEXTERNALADDRESS(lastResource) );
       }
 %}.
 
@@ -906,7 +906,7 @@
 
 
      "
-         Screen resourceIdOfLastError
+	 Screen resourceIdOfLastError
      "
 !
 
@@ -957,15 +957,15 @@
 
 displayIdOrErrorIfBroken
     (hasConnectionBroken or:[displayId isNil]) ifTrue:[
-        self primitiveFailedOrClosedConnection.
-        ^ nil.
+	self primitiveFailedOrClosedConnection.
+	^ nil.
     ].
     ^ displayId
 !
 
 displayIdOrNilIfBroken
     hasConnectionBroken ifTrue:[
-        ^ nil.
+	^ nil.
     ].
     ^ displayId
 !
@@ -1005,7 +1005,7 @@
 
     prev := activateOnClick ? false.
     aBoolean notNil ifTrue:[
-        activateOnClick := aBoolean.
+	activateOnClick := aBoolean.
     ].
     ^ prev
 
@@ -1021,7 +1021,7 @@
 
 %{  /* NOCONTEXT */
     RETURN (__MKSMALLINT(Button1MotionMask | Button2MotionMask | Button3MotionMask
-                                           | Button4MotionMask | Button5MotionMask));
+					   | Button4MotionMask | Button5MotionMask));
 %}.
     ^ nil
 !
@@ -1078,23 +1078,23 @@
 
 %{  /* NOCONTEXT */
     if (aButtonNr == __MKSMALLINT(1)) {
-        RETURN (__MKSMALLINT(Button1MotionMask));
+	RETURN (__MKSMALLINT(Button1MotionMask));
     }
     if (aButtonNr == __MKSMALLINT(2)) {
-        RETURN (__MKSMALLINT(Button2MotionMask));
+	RETURN (__MKSMALLINT(Button2MotionMask));
     }
     if (aButtonNr == __MKSMALLINT(3)) {
-        RETURN (__MKSMALLINT(Button3MotionMask));
+	RETURN (__MKSMALLINT(Button3MotionMask));
     }
     if (aButtonNr == __MKSMALLINT(4)) {
-        RETURN (__MKSMALLINT(Button4MotionMask));
+	RETURN (__MKSMALLINT(Button4MotionMask));
     }
     if (aButtonNr == __MKSMALLINT(5)) {
-        RETURN (__MKSMALLINT(Button5MotionMask));
+	RETURN (__MKSMALLINT(Button5MotionMask));
     }
     if (aButtonNr == @symbol(all)) {
-        RETURN (__MKSMALLINT(Button1MotionMask | Button2MotionMask | Button3MotionMask
-                                               | Button4MotionMask | Button5MotionMask));
+	RETURN (__MKSMALLINT(Button1MotionMask | Button2MotionMask | Button3MotionMask
+					       | Button4MotionMask | Button5MotionMask));
     }
 %}.
     ^ nil
@@ -1115,7 +1115,7 @@
 %{  /* NOCONTEXT */
 #ifndef __win32__
     if (ISCONNECTED) {
-        RETURN ( __MKSMALLINT(ConnectionNumber(myDpy)) );
+	RETURN ( __MKSMALLINT(ConnectionNumber(myDpy)) );
     }
 #endif
     RETURN (nil);
@@ -1142,7 +1142,7 @@
 
 %{  /* NOCONTEXT */
     if (ISCONNECTED) {
-        RETURN ( __MKSMALLINT(XProtocolVersion(myDpy)) );
+	RETURN ( __MKSMALLINT(XProtocolVersion(myDpy)) );
     }
     RETURN (nil);
 %}
@@ -1158,7 +1158,7 @@
      (to avoid bugs in certain implementations)"
 %{
     if (ISCONNECTED) {
-        RETURN ( __MKSTRING(XServerVendor(myDpy)) );
+	RETURN ( __MKSTRING(XServerVendor(myDpy)) );
     }
     RETURN (nil);
 %}
@@ -1199,28 +1199,28 @@
      && __isExternalAddress(windowId1)
      && __isExternalAddress(windowId2)
      && __bothSmallInteger(x1, y1)) {
-        Display *dpy = myDpy;
-        Window rootWin;
-
-        w1 = __WindowVal(windowId1);
-        w2 = __WindowVal(windowId2);
-
-        rootWin = RootWindow(dpy, screen);
-        if (w1 == rootWin) {
-            w1 = (Window)__externalAddressVal(rootWindowId);
-        }
-        if (w2 == rootWin) {
-            w2 = (Window)__externalAddressVal(rootWindowId);
-        }
-
-        ENTER_XLIB();
-        XTranslateCoordinates(dpy, w1, w2,
-                              __intVal(x1), __intVal(y1),
-                              &xpos, &ypos, &child_ret);
-        LEAVE_XLIB();
-
-        x2 = __MKSMALLINT(xpos);
-        y2 = __MKSMALLINT(ypos);
+	Display *dpy = myDpy;
+	Window rootWin;
+
+	w1 = __WindowVal(windowId1);
+	w2 = __WindowVal(windowId2);
+
+	rootWin = RootWindow(dpy, screen);
+	if (w1 == rootWin) {
+	    w1 = (Window)__externalAddressVal(rootWindowId);
+	}
+	if (w2 == rootWin) {
+	    w2 = (Window)__externalAddressVal(rootWindowId);
+	}
+
+	ENTER_XLIB();
+	XTranslateCoordinates(dpy, w1, w2,
+			      __intVal(x1), __intVal(y1),
+			      &xpos, &ypos, &child_ret);
+	LEAVE_XLIB();
+
+	x2 = __MKSMALLINT(xpos);
+	y2 = __MKSMALLINT(ypos);
     }
 %}.
 
@@ -1234,7 +1234,7 @@
 
 %{  /* NOCONTEXT */
     if (ISCONNECTED) {
-        RETURN ( __MKSMALLINT(XVendorRelease(myDpy)) );
+	RETURN ( __MKSMALLINT(XVendorRelease(myDpy)) );
     }
     RETURN (nil);
 %}
@@ -1261,31 +1261,31 @@
     if (ISCONNECTED
      && __isExternalAddress(windowId)
      && __isPoint(aPoint)) {
-        Display *dpy = myDpy;
-
-        xp = _point_X(aPoint);
-        yp = _point_Y(aPoint);
-        if (__bothSmallInteger(xp, yp)) {
-
-            ENTER_XLIB();
-            XTranslateCoordinates(dpy,
-                                  RootWindow(dpy, screen),
-                                  __WindowVal(windowId),
-                                  __intVal(xp), __intVal(yp),
-                                  &xpos, &ypos, &child_ret);
-            LEAVE_XLIB();
-
-            if (child_ret) {
-                RETURN ( __MKEXTERNALADDRESS(child_ret) );
-            }
-            RETURN ( nil );
-        }
+	Display *dpy = myDpy;
+
+	xp = _point_X(aPoint);
+	yp = _point_Y(aPoint);
+	if (__bothSmallInteger(xp, yp)) {
+
+	    ENTER_XLIB();
+	    XTranslateCoordinates(dpy,
+				  RootWindow(dpy, screen),
+				  __WindowVal(windowId),
+				  __intVal(xp), __intVal(yp),
+				  &xpos, &ypos, &child_ret);
+	    LEAVE_XLIB();
+
+	    if (child_ret) {
+		RETURN ( __MKEXTERNALADDRESS(child_ret) );
+	    }
+	    RETURN ( nil );
+	}
     }
 %}.
     windowId notNil ifTrue:[
-        aPoint isPoint ifTrue:[
-            ^ self viewIdFromPoint:aPoint asPoint truncated in:windowId
-        ]
+	aPoint isPoint ifTrue:[
+	    ^ self viewIdFromPoint:aPoint asPoint truncated in:windowId
+	]
     ].
 
     ^ nil
@@ -1307,21 +1307,21 @@
     if (ISCONNECTED
      && (__INST(rootId) != __INST(virtualRootId))
      && __isExternalAddress(__INST(virtualRootId))) {
-        Window vRootWin;
-        Window root;
-        int x, y;
-        unsigned int width, height;
-        unsigned int dummy;
-        int ret;
-
-        vRootWin = __WindowVal(__INST(virtualRootId));
-        ENTER_XLIB();
-        ret = XGetGeometry(myDpy, vRootWin, &root, &x, &y, &width, &height,
-                                          &dummy, &dummy);
-        LEAVE_XLIB();
-        if (ret) {
-            RETURN ( __MKPOINT_INT(width, height) );
-        }
+	Window vRootWin;
+	Window root;
+	int x, y;
+	unsigned int width, height;
+	unsigned int dummy;
+	int ret;
+
+	vRootWin = __WindowVal(__INST(virtualRootId));
+	ENTER_XLIB();
+	ret = XGetGeometry(myDpy, vRootWin, &root, &x, &y, &width, &height,
+					  &dummy, &dummy);
+	LEAVE_XLIB();
+	if (ret) {
+	    RETURN ( __MKPOINT_INT(width, height) );
+	}
     }
 %}.
     ^ width @ height
@@ -1366,9 +1366,9 @@
      This method must be redefined for displays which need it (i.e. X11 on osx)"
 
     OperatingSystem getOSType == #osx ifTrue:[
-        "/ should check for local display here - sigh, osx's Xserver does not give
-        "/ us a hint through the server vendor...
-        ^ 16@16
+	"/ should check for local display here - sigh, osx's Xserver does not give
+	"/ us a hint through the server vendor...
+	^ 16@16
     ].
     ^ 0@0
 !
@@ -1409,11 +1409,11 @@
 
     if (ISCONNECTED
      && __isStringLike(extensionString)) {
-        ENTER_XLIB();
-        if (XQueryExtension(myDpy, __stringVal(extensionString), &dummy, &dummy, &dummy)) {
-            rslt = true;
-        }
-        LEAVE_XLIB();
+	ENTER_XLIB();
+	if (XQueryExtension(myDpy, __stringVal(extensionString), &dummy, &dummy, &dummy)) {
+	    rslt = true;
+	}
+	LEAVE_XLIB();
     }
     RETURN (rslt);
 %}
@@ -1429,29 +1429,29 @@
      Display hasExtension:'SGIFullScreenStereo'
 
      XQuartz supports the following:
-        Apple-DRI
-        Apple-WM
-        BIG-REQUESTS
-        DAMAGE
-        DOUBLE-BUFFER
-        GLX
-        Generic Event Extension
-        MIT-SCREEN-SAVER
-        MIT-SHM
-        Present
-        RANDR
-        RENDER
-        SECURITY
-        SGI-GLX
-        SHAPE
-        SYNC
-        X-Resource
-        XC-MISC
-        XFIXES
-        XINERAMA
-        XInputExtension
-        XKEYBOARD
-        XVideo
+	Apple-DRI
+	Apple-WM
+	BIG-REQUESTS
+	DAMAGE
+	DOUBLE-BUFFER
+	GLX
+	Generic Event Extension
+	MIT-SCREEN-SAVER
+	MIT-SHM
+	Present
+	RANDR
+	RENDER
+	SECURITY
+	SGI-GLX
+	SHAPE
+	SYNC
+	X-Resource
+	XC-MISC
+	XFIXES
+	XINERAMA
+	XInputExtension
+	XKEYBOARD
+	XVideo
     "
 !
 
@@ -1578,42 +1578,42 @@
     int cnt;
 
     if (ISCONNECTED) {
-        Display *dpy = myDpy;
-        int status;
-
-        ENTER_XLIB();
-        status = XGetIconSizes(dpy, RootWindow(dpy, screen), &sizeList, &cnt);
-        LEAVE_XLIB();
-        if (status > 0) {
-           xIconSizes = __MKEXTERNALBYTES(sizeList);
-           count = __MKSMALLINT(cnt);
-        }
+	Display *dpy = myDpy;
+	int status;
+
+	ENTER_XLIB();
+	status = XGetIconSizes(dpy, RootWindow(dpy, screen), &sizeList, &cnt);
+	LEAVE_XLIB();
+	if (status > 0) {
+	   xIconSizes = __MKEXTERNALBYTES(sizeList);
+	   count = __MKSMALLINT(cnt);
+	}
     }
 %}.
     count == 0 ifTrue:[^ nil].
 
     ret := Array new:count.
     1 to:count do:[ :i |
-        |minWidth minHeight maxWidth maxHeight widthStep heightStep d|
-
-%{
-        XIconSize *slp = &((XIconSize *)__externalAddressVal(xIconSizes))[__intVal(i)-1];
-        minWidth = __MKSMALLINT(slp->min_width);
-        minHeight = __MKSMALLINT(slp->min_height);
-        maxWidth = __MKSMALLINT(slp->max_width);
-        maxHeight = __MKSMALLINT(slp->max_height);
-        widthStep = __MKSMALLINT(slp->width_inc);
-        heightStep = __MKSMALLINT(slp->height_inc);
-%}.
-        d := IdentityDictionary new:6.
-        d at:#minWidth put:minWidth.
-        d at:#maxWidth put:maxWidth.
-        d at:#widthStep put:widthStep.
-        d at:#minHeight put:minHeight.
-        d at:#maxHeight put:maxHeight.
-        d at:#heightStep put:heightStep.
-
-        ret at:i put:d.
+	|minWidth minHeight maxWidth maxHeight widthStep heightStep d|
+
+%{
+	XIconSize *slp = &((XIconSize *)__externalAddressVal(xIconSizes))[__intVal(i)-1];
+	minWidth = __MKSMALLINT(slp->min_width);
+	minHeight = __MKSMALLINT(slp->min_height);
+	maxWidth = __MKSMALLINT(slp->max_width);
+	maxHeight = __MKSMALLINT(slp->max_height);
+	widthStep = __MKSMALLINT(slp->width_inc);
+	heightStep = __MKSMALLINT(slp->height_inc);
+%}.
+	d := IdentityDictionary new:6.
+	d at:#minWidth put:minWidth.
+	d at:#maxWidth put:maxWidth.
+	d at:#widthStep put:widthStep.
+	d at:#minHeight put:minHeight.
+	d at:#maxHeight put:maxHeight.
+	d at:#heightStep put:heightStep.
+
+	ret at:i put:d.
     ].
 
     xIconSizes free.
@@ -1641,52 +1641,52 @@
 %{
 #ifdef XINERAMA
     if (ISCONNECTED && __INST(hasXineramaExtension) == true) {
-        Display *dpy = myDpy;
-        XineramaScreenInfo *screenInfo;
-        int numDisplays;
-        OBJ *cResultArray;
-        int i, ci;
-
-        screenInfo = XineramaQueryScreens (dpy, &numDisplays);
-        if (screenInfo == 0) {
-            goto out;
-        }
-
-        numberOfMonitors = __mkSmallInteger(numDisplays);
-        resultArray = __ARRAY_NEW_INT(numDisplays * 5);
-        cResultArray = __ArrayInstPtr(resultArray)->a_element;
-
-        for (i=0, ci=0; i < numDisplays; i++, ci+=5) {
-            cResultArray[ci] = __mkSmallInteger(screenInfo[i].screen_number);
-            cResultArray[ci+1] = __mkSmallInteger(screenInfo[i].x_org);
-            cResultArray[ci+2] = __mkSmallInteger(screenInfo[i].y_org);
-            cResultArray[ci+3] = __mkSmallInteger(screenInfo[i].width);
-            cResultArray[ci+4] = __mkSmallInteger(screenInfo[i].height);
-        }
-
-        XFree(screenInfo);
+	Display *dpy = myDpy;
+	XineramaScreenInfo *screenInfo;
+	int numDisplays;
+	OBJ *cResultArray;
+	int i, ci;
+
+	screenInfo = XineramaQueryScreens (dpy, &numDisplays);
+	if (screenInfo == 0) {
+	    goto out;
+	}
+
+	numberOfMonitors = __mkSmallInteger(numDisplays);
+	resultArray = __ARRAY_NEW_INT(numDisplays * 5);
+	cResultArray = __ArrayInstPtr(resultArray)->a_element;
+
+	for (i=0, ci=0; i < numDisplays; i++, ci+=5) {
+	    cResultArray[ci] = __mkSmallInteger(screenInfo[i].screen_number);
+	    cResultArray[ci+1] = __mkSmallInteger(screenInfo[i].x_org);
+	    cResultArray[ci+2] = __mkSmallInteger(screenInfo[i].y_org);
+	    cResultArray[ci+3] = __mkSmallInteger(screenInfo[i].width);
+	    cResultArray[ci+4] = __mkSmallInteger(screenInfo[i].height);
+	}
+
+	XFree(screenInfo);
     }
 #endif
 out:;
 %}.
     numberOfMonitors isNil ifTrue:[
-        "no xinerama - the display is the only monitor"
-        ^ Array with:self bounds.
+	"no xinerama - the display is the only monitor"
+	^ Array with:self bounds.
     ].
     rawMonitorBounds = resultArray ifTrue:[
-        ^ monitorBounds.
+	^ monitorBounds.
     ].
 
     bounds := Array new:numberOfMonitors.
     1 to:numberOfMonitors do:[:idx|
-        |rect baseIdx|
-        baseIdx := (idx-1) * 5.
-        rect := Rectangle
-                    left:(resultArray at:baseIdx+2)
-                    top:(resultArray at:baseIdx+3)
-                    width:(resultArray at:baseIdx+4)
-                    height:(resultArray at:baseIdx+5).
-        bounds at:idx put:rect.
+	|rect baseIdx|
+	baseIdx := (idx-1) * 5.
+	rect := Rectangle
+		    left:(resultArray at:baseIdx+2)
+		    top:(resultArray at:baseIdx+3)
+		    width:(resultArray at:baseIdx+4)
+		    height:(resultArray at:baseIdx+5).
+	bounds at:idx put:rect.
     ].
 
     rawMonitorBounds := resultArray.
@@ -1711,8 +1711,8 @@
 
     bounds := self monitorBounds.
     ^ bounds
-        detect:[:eachRectangle| eachRectangle containsPoint:aPoint]
-        ifNone:[super monitorBoundsAt:aPoint].
+	detect:[:eachRectangle| eachRectangle containsPoint:aPoint]
+	ifNone:[super monitorBoundsAt:aPoint].
 
     "
      Screen current monitorBoundsAt:(0@0)
@@ -1727,7 +1727,7 @@
     ^ self monitorBounds size
 
     "
-        Display numberOfMonitors
+	Display numberOfMonitors
     "
 !
 
@@ -1758,7 +1758,7 @@
      Redefined to return a special value on SGI servers."
 
     self serverVendor = 'Silicon Graphics' ifTrue:[
-        ^ 86@68
+	^ 86@68
     ].
     ^ super preferredIconSize
 
@@ -1781,12 +1781,12 @@
 
     minH := self usableHeight.
     self monitorBounds do:[:eachBounds |
-        minH := minH min: eachBounds height.
+	minH := minH min: eachBounds height.
     ].
     ^ minH
 
     "
-        Display smallestMonitorHeight
+	Display smallestMonitorHeight
     "
 !
 
@@ -1809,7 +1809,7 @@
     Display *dpy;
 
     if (! ISCONNECTED) {
-        RETURN (nil);
+	RETURN (nil);
     }
 
     dpy = myDpy;
@@ -1821,30 +1821,30 @@
 %}.
     formatArray := Array new:nFormats.
     1 to:nFormats do:[:index |
-        |info bitsPerPixelInfo depthInfo paddingInfo i|
-
-        i := index.
-%{
-        ScreenFormat *format;
-        Display *dpy = myDpy;
+	|info bitsPerPixelInfo depthInfo paddingInfo i|
+
+	i := index.
+%{
+	ScreenFormat *format;
+	Display *dpy = myDpy;
 
 #ifdef NO_PRIVATE_DISPLAY_ACCESS
-        depthInfo = __MKSMALLINT(1);
-        bitsPerPixelInfo = __MKSMALLINT(1);
-        paddingInfo = __MKSMALLINT(8);
+	depthInfo = __MKSMALLINT(1);
+	bitsPerPixelInfo = __MKSMALLINT(1);
+	paddingInfo = __MKSMALLINT(8);
 #else
-        format = DISPLAYACCESS(dpy)->pixmap_format;
-        format += (__intVal(i)-1);
-        bitsPerPixelInfo = __MKSMALLINT(format->bits_per_pixel);
-        depthInfo = __MKSMALLINT(format->depth);
-        paddingInfo = __MKSMALLINT(format->scanline_pad);
-#endif
-%}.
-        info := IdentityDictionary new.
-        info at:#depth put:depthInfo.
-        info at:#bitsPerPixel put:bitsPerPixelInfo.
-        info at:#padding put:paddingInfo.
-        formatArray at:index put:info.
+	format = DISPLAYACCESS(dpy)->pixmap_format;
+	format += (__intVal(i)-1);
+	bitsPerPixelInfo = __MKSMALLINT(format->bits_per_pixel);
+	depthInfo = __MKSMALLINT(format->depth);
+	paddingInfo = __MKSMALLINT(format->scanline_pad);
+#endif
+%}.
+	info := IdentityDictionary new.
+	info at:#depth put:depthInfo.
+	info at:#bitsPerPixel put:bitsPerPixelInfo.
+	info at:#padding put:paddingInfo.
+	formatArray at:index put:info.
     ].
     ^ formatArray
 
@@ -1918,7 +1918,7 @@
      Blame: I cannot ask via server vendor, if it's a Quartz display, because
      it does not return a valid server vendor string"
     OperatingSystem isOSXlike ifTrue:[
-        ^ false
+	^ false
     ].
     ^ true
 
@@ -1969,7 +1969,7 @@
      to return true here."
 
      ^ self class hasXCursorLibrary
-        and:[self hasCursorExtension]
+	and:[self hasCursorExtension]
 
     "
      Display supportsXCursor
@@ -2017,7 +2017,7 @@
      Also, with XQuartz, it does not work, because we cannot readout the screen..."
 
     OperatingSystem isOSXlike ifTrue:[
-        ^ true
+	^ true
     ].
     ^ super suppressShadowViews
 !
@@ -2033,8 +2033,8 @@
 
     h := (self monitorBoundsAt:aPoint) height.
     OperatingSystem isOSXlike ifTrue:[
-        "/ take away some space for the dock at the bottom.
-        ^ h - 50
+	"/ take away some space for the dock at the bottom.
+	^ h - 50
     ].
     ^ h
 
@@ -2059,7 +2059,7 @@
 
     bitmapId := self primCreateBitmapFromArray:anArray width:w height:h.
     bitmapId isNil ifTrue:[
-        self primitiveFailedOrClosedConnection
+	self primitiveFailedOrClosedConnection
     ].
     ^ bitmapId
 !
@@ -2074,35 +2074,35 @@
 
     if (ISCONNECTED
      && __isStringLike(aString)) {
-        Display *dpy = myDpy;
-        char *filename;
-        int status;
-        Pixmap newBitmap;
-        unsigned b_width, b_height;
-        int b_x_hot, b_y_hot;
-
-        filename = (char *) __stringVal(aString);
-
-
-        ENTER_XLIB();
-        status = XReadBitmapFile(dpy, RootWindow(dpy, screen),
-                                 filename, &b_width, &b_height, &newBitmap,
-                                 &b_x_hot, &b_y_hot);
-        LEAVE_XLIB();
-
-
-        if ((status == BitmapSuccess)  && newBitmap) {
+	Display *dpy = myDpy;
+	char *filename;
+	int status;
+	Pixmap newBitmap;
+	unsigned b_width, b_height;
+	int b_x_hot, b_y_hot;
+
+	filename = (char *) __stringVal(aString);
+
+
+	ENTER_XLIB();
+	status = XReadBitmapFile(dpy, RootWindow(dpy, screen),
+				 filename, &b_width, &b_height, &newBitmap,
+				 &b_x_hot, &b_y_hot);
+	LEAVE_XLIB();
+
+
+	if ((status == BitmapSuccess)  && newBitmap) {
 #ifdef COUNT_RESOURCES
-            __cnt_bitmap++;
-#endif
-            w = __MKSMALLINT(b_width);
-            h = __MKSMALLINT(b_height);
-            id = __MKEXTERNALADDRESS(newBitmap);
-        }
+	    __cnt_bitmap++;
+#endif
+	    w = __MKSMALLINT(b_width);
+	    h = __MKSMALLINT(b_height);
+	    id = __MKEXTERNALADDRESS(newBitmap);
+	}
     }
 %}.
     id notNil ifTrue:[
-        aForm setWidth:w height:h
+	aForm setWidth:w height:h
     ].
     ^ id
 !
@@ -2118,19 +2118,19 @@
     Pixmap newBitmap;
 
     if (__bothSmallInteger(w, h) && ISCONNECTED) {
-        Display *dpy = myDpy;
-
-
-        ENTER_XLIB();
-        newBitmap = XCreatePixmap(dpy, RootWindow(dpy, screen),
-                                       __intVal(w), __intVal(h), 1);
-        LEAVE_XLIB();
+	Display *dpy = myDpy;
+
+
+	ENTER_XLIB();
+	newBitmap = XCreatePixmap(dpy, RootWindow(dpy, screen),
+				       __intVal(w), __intVal(h), 1);
+	LEAVE_XLIB();
 #ifdef COUNT_RESOURCES
-        if (newBitmap)
-            __cnt_bitmap++;
-#endif
-
-        RETURN ( (newBitmap != (Pixmap)0) ? __MKEXTERNALADDRESS(newBitmap) : nil );
+	if (newBitmap)
+	    __cnt_bitmap++;
+#endif
+
+	RETURN ( (newBitmap != (Pixmap)0) ? __MKEXTERNALADDRESS(newBitmap) : nil );
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -2148,19 +2148,19 @@
     Pixmap newBitmap;
 
     if (__bothSmallInteger(w, h) && ISCONNECTED) {
-        Display *dpy = myDpy;
-
-
-        ENTER_XLIB();
-        newBitmap = XCreatePixmap(dpy, RootWindow(dpy, screen),
-                                       __intVal(w), __intVal(h), __intVal(d));
-        LEAVE_XLIB();
+	Display *dpy = myDpy;
+
+
+	ENTER_XLIB();
+	newBitmap = XCreatePixmap(dpy, RootWindow(dpy, screen),
+				       __intVal(w), __intVal(h), __intVal(d));
+	LEAVE_XLIB();
 #ifdef COUNT_RESOURCES
-        if (newBitmap)
-            __cnt_bitmap++;
-#endif
-
-        RETURN ( (newBitmap != (Pixmap)0) ? __MKEXTERNALADDRESS(newBitmap) : nil );
+	if (newBitmap)
+	    __cnt_bitmap++;
+#endif
+
+	RETURN ( (newBitmap != (Pixmap)0) ? __MKEXTERNALADDRESS(newBitmap) : nil );
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -2168,18 +2168,18 @@
 !
 
 createWindowFor:aView type:typeSymbol
-                 origin:origin
-                 extent:extent
-                 minExtent:minExt
-                 maxExtent:maxExt
-                 borderWidth:bWidth
-                 subViewOf:wsuperView
-                 style:wStyle
-                 inputOnly:winputOnly
-                 label:wlabel
-                 owner:wowner
-                 icon:wicon iconMask:wiconMask
-                 iconView:wiconView
+		 origin:origin
+		 extent:extent
+		 minExtent:minExt
+		 maxExtent:maxExt
+		 borderWidth:bWidth
+		 subViewOf:wsuperView
+		 style:wStyle
+		 inputOnly:winputOnly
+		 label:wlabel
+		 owner:wowner
+		 icon:wicon iconMask:wiconMask
+		 iconView:wiconView
 
     <context: #return>
 
@@ -2190,46 +2190,46 @@
      wiconId wiconMaskId wiconViewId windowGroupWindowId|
 
     self isOpen ifFalse:[
-        self primitiveFailedOrClosedConnection.
-        ^ nil
+	self primitiveFailedOrClosedConnection.
+	^ nil
     ].
 
     origin notNil ifTrue:[
-        xpos := origin x.
-        ypos := origin y.
+	xpos := origin x.
+	ypos := origin y.
     ].
     extent notNil ifTrue:[
-        wwidth := extent x.
-        wheight := extent y.
+	wwidth := extent x.
+	wheight := extent y.
     ].
     minExt notNil ifTrue:[
-        minWidth := minExt x.
-        minHeight := minExt y
+	minWidth := minExt x.
+	minHeight := minExt y
     ].
     maxExt notNil ifTrue:[
-        maxWidth := maxExt x.
-        maxHeight := maxExt y
+	maxWidth := maxExt x.
+	maxHeight := maxExt y
     ].
 
     wsuperView notNil ifTrue:[
-        wsuperViewId := wsuperView drawableId.
+	wsuperViewId := wsuperView drawableId.
     ] ifFalse:[
-        isTopWindow := true.
-        aView class ~~ WindowGroupWindow ifTrue:[
-            windowGroupWindow isNil ifTrue:[
-                self getWindowGroupWindow.
-            ].
-            windowGroupWindowId := windowGroupWindow drawableId.
-        ].
-        wicon notNil ifTrue:[
-            wiconId := wicon drawableId.
-            wiconMask notNil ifTrue:[
-                wiconMaskId := wiconMask drawableId.
-            ]
-        ].
-        wiconView notNil ifTrue:[
-            wiconViewId := wiconView drawableId.
-        ].
+	isTopWindow := true.
+	aView class ~~ WindowGroupWindow ifTrue:[
+	    windowGroupWindow isNil ifTrue:[
+		self getWindowGroupWindow.
+	    ].
+	    windowGroupWindowId := windowGroupWindow drawableId.
+	].
+	wicon notNil ifTrue:[
+	    wiconId := wicon drawableId.
+	    wiconMask notNil ifTrue:[
+		wiconMaskId := wiconMask drawableId.
+	    ]
+	].
+	wiconView notNil ifTrue:[
+	    wiconViewId := wiconView drawableId.
+	].
     ].
 
     weventMask := aView eventMask.
@@ -2263,122 +2263,122 @@
     sizehints.y = 0;
 
     if (__bothSmallInteger(wwidth, wheight)) {
-        sizehints.flags |= PSize;
-        sizehints.width = __intVal(wwidth);
-        sizehints.height = __intVal(wheight);
+	sizehints.flags |= PSize;
+	sizehints.width = __intVal(wwidth);
+	sizehints.height = __intVal(wheight);
     }
     if (__bothSmallInteger(xpos, ypos)) {
-        sizehints.flags |= PPosition;
-        sizehints.x = __intVal(xpos);
-        sizehints.y = __intVal(ypos);
+	sizehints.flags |= PPosition;
+	sizehints.x = __intVal(xpos);
+	sizehints.y = __intVal(ypos);
     }
     if (__bothSmallInteger(minWidth, minHeight)) {
-        sizehints.flags |= PMinSize;
-        sizehints.min_width = __intVal(minWidth);
-        sizehints.min_height = __intVal(minHeight);
+	sizehints.flags |= PMinSize;
+	sizehints.min_width = __intVal(minWidth);
+	sizehints.min_height = __intVal(minHeight);
     }
     if (__bothSmallInteger(maxWidth, maxHeight)) {
-        sizehints.flags |= PMaxSize;
-        sizehints.max_width = __intVal(maxWidth);
-        sizehints.max_height = __intVal(maxHeight);
+	sizehints.flags |= PMaxSize;
+	sizehints.max_width = __intVal(maxWidth);
+	sizehints.max_height = __intVal(maxHeight);
     }
 
     bg = WhitePixel(dpy, screen);
 
     if (__isSmallInteger(bWidth)) {
-        bw = __intVal(bWidth);
+	bw = __intVal(bWidth);
     } else {
-        bw = 0;
+	bw = 0;
     }
 
     bd = BlackPixel(dpy, screen);
 
     if (__isExternalAddress(wsuperViewId)) {
-        parentWindow = __WindowVal(wsuperViewId);
+	parentWindow = __WindowVal(wsuperViewId);
     } else {
-        parentWindow = RootWindow(dpy, screen);
+	parentWindow = RootWindow(dpy, screen);
     }
 
     if (wStyle == @symbol(popUp))
-        xswa.override_redirect = 1;
+	xswa.override_redirect = 1;
     else
-        xswa.override_redirect = 0;
+	xswa.override_redirect = 0;
 
     if (winputOnly == true)
-        ioClass = InputOnly;
+	ioClass = InputOnly;
     else
-        ioClass = InputOutput;
+	ioClass = InputOutput;
 
     if (__isSmallInteger(weventMask)) {
-        xswa.event_mask = __intVal(weventMask);
+	xswa.event_mask = __intVal(weventMask);
     } else {
-        xswa.event_mask = 0;
+	xswa.event_mask = 0;
     }
 
     if (ioClass == InputOnly) {
-        bw = 0;
-        depth = 0;
-        flags |= CWEventMask;
+	bw = 0;
+	depth = 0;
+	flags |= CWEventMask;
     } else {
-        depth = DefaultDepth(dpy,screen);
-        flags |= CWEventMask | CWBorderPixel | CWOverrideRedirect;
-
-        if (backPixmap != (Pixmap)0) {
-            xswa.background_pixmap = backPixmap;
-            flags |= CWBackPixmap;
-        } else {
-            xswa.background_pixel = bg;
-            flags |= CWBackPixel;
-        }
-        xswa.border_pixel = bd;
+	depth = DefaultDepth(dpy,screen);
+	flags |= CWEventMask | CWBorderPixel | CWOverrideRedirect;
+
+	if (backPixmap != (Pixmap)0) {
+	    xswa.background_pixmap = backPixmap;
+	    flags |= CWBackPixmap;
+	} else {
+	    xswa.background_pixel = bg;
+	    flags |= CWBackPixel;
+	}
+	xswa.border_pixel = bd;
     }
 
     visual.visualid = CopyFromParent;
     if (__isSmallInteger(preferredDepth)) {
-        depth = __intVal(preferredDepth);
+	depth = __intVal(preferredDepth);
     }
 
 
     if (preferredVisual != nil) {
-        XVisualInfo vi;
-        int cls;
-
-        if (preferredVisual == @symbol(StaticGray))
-            cls = StaticGray;
-        else if (preferredVisual == @symbol(GrayScale))
-            cls = GrayScale;
-        else if (preferredVisual == @symbol(StaticColor))
-            cls = StaticColor;
-        else if (preferredVisual == @symbol(PseudoColor))
-            cls = PseudoColor;
-        else if (preferredVisual == @symbol(TrueColor))
-            cls = TrueColor;
-        else if (preferredVisual == @symbol(DirectColor))
-            cls = DirectColor;
-        else
-            cls = PseudoColor;
-
-        ENTER_XLIB();
-        if (XMatchVisualInfo(dpy, screen, depth, cls, &vi)) {
-            visual.visualid = vi.visualid;
+	XVisualInfo vi;
+	int cls;
+
+	if (preferredVisual == @symbol(StaticGray))
+	    cls = StaticGray;
+	else if (preferredVisual == @symbol(GrayScale))
+	    cls = GrayScale;
+	else if (preferredVisual == @symbol(StaticColor))
+	    cls = StaticColor;
+	else if (preferredVisual == @symbol(PseudoColor))
+	    cls = PseudoColor;
+	else if (preferredVisual == @symbol(TrueColor))
+	    cls = TrueColor;
+	else if (preferredVisual == @symbol(DirectColor))
+	    cls = DirectColor;
+	else
+	    cls = PseudoColor;
+
+	ENTER_XLIB();
+	if (XMatchVisualInfo(dpy, screen, depth, cls, &vi)) {
+	    visual.visualid = vi.visualid;
 /*
-            console_fprintf(stderr, "visualId=%x\n", vi.visualid);
+	    console_fprintf(stderr, "visualId=%x\n", vi.visualid);
 */
-        }
-        LEAVE_XLIB();
+	}
+	LEAVE_XLIB();
     }
 
     ENTER_XLIB2();
     newWindow = XCreateWindow(dpy, parentWindow,
-                           sizehints.x, sizehints.y,
-                           sizehints.width, sizehints.height,
-                           bw, depth, ioClass, &visual,
-                           flags, &xswa);
+			   sizehints.x, sizehints.y,
+			   sizehints.width, sizehints.height,
+			   bw, depth, ioClass, &visual,
+			   flags, &xswa);
     LEAVE_XLIB();
 
 
     if (! newWindow) {
-        RETURN ( nil );
+	RETURN ( nil );
     }
 
 #ifdef COUNT_RESOURCES
@@ -2390,168 +2390,168 @@
      * (only makes sense for topWindows)
      */
     if (isTopWindow == true) {
-        XWMHints wmhints;
-
-        wmhints.flags = 0;
-
-        if (__isExternalAddress(wiconId)) {
-            wmhints.icon_pixmap = __PixmapVal(wiconId);
-            wmhints.flags = IconPixmapHint;
-            if (__isExternalAddress(wiconMaskId)) {
-                wmhints.icon_mask = __PixmapVal(wiconMaskId);
-                wmhints.flags |= IconMaskHint;
-            }
-        }
-
-        if (__isExternalAddress(windowGroupWindowId)) {
-            wmhints.window_group = __WindowVal(windowGroupWindowId);
-            wmhints.flags |= WindowGroupHint;
-        }
-
-        if (__isExternalAddress(wiconViewId)) {
-            wmhints.flags |= IconWindowHint;
-            wmhints.icon_window = __WindowVal(wiconViewId);
-        };
+	XWMHints wmhints;
+
+	wmhints.flags = 0;
+
+	if (__isExternalAddress(wiconId)) {
+	    wmhints.icon_pixmap = __PixmapVal(wiconId);
+	    wmhints.flags = IconPixmapHint;
+	    if (__isExternalAddress(wiconMaskId)) {
+		wmhints.icon_mask = __PixmapVal(wiconMaskId);
+		wmhints.flags |= IconMaskHint;
+	    }
+	}
+
+	if (__isExternalAddress(windowGroupWindowId)) {
+	    wmhints.window_group = __WindowVal(windowGroupWindowId);
+	    wmhints.flags |= WindowGroupHint;
+	}
+
+	if (__isExternalAddress(wiconViewId)) {
+	    wmhints.flags |= IconWindowHint;
+	    wmhints.icon_window = __WindowVal(wiconViewId);
+	};
 
 /*
-        wmhints.flags |= InputHint;
-        wmhints.input = True;
+	wmhints.flags |= InputHint;
+	wmhints.input = True;
 */
-        ENTER_XLIB();
-        XSetWMHints(dpy, newWindow, &wmhints);
-        XSetWMNormalHints(dpy, newWindow, &sizehints);
-        LEAVE_XLIB();
-
-        /*
-         * get atoms first (if not already known)
-         */
-        if (__INST(protocolsAtom) == nil) {
-            ENTER_XLIB();
-            WmProtocolsAtom = XInternAtom(dpy, "WM_PROTOCOLS", False);
-            __INST(protocolsAtom) = __MKATOMOBJ(WmProtocolsAtom);
+	ENTER_XLIB();
+	XSetWMHints(dpy, newWindow, &wmhints);
+	XSetWMNormalHints(dpy, newWindow, &sizehints);
+	LEAVE_XLIB();
+
+	/*
+	 * get atoms first (if not already known)
+	 */
+	if (__INST(protocolsAtom) == nil) {
+	    ENTER_XLIB();
+	    WmProtocolsAtom = XInternAtom(dpy, "WM_PROTOCOLS", False);
+	    __INST(protocolsAtom) = __MKATOMOBJ(WmProtocolsAtom);
 #ifdef USE_SAVEYOURSELF_ATOM
-            WmSaveYourselfAtom = XInternAtom(dpy, "WM_SAVE_YOURSELF", False);
-            __INST(saveYourselfAtom) = __MKATOMOBJ(WmSaveYourselfAtom);
+	    WmSaveYourselfAtom = XInternAtom(dpy, "WM_SAVE_YOURSELF", False);
+	    __INST(saveYourselfAtom) = __MKATOMOBJ(WmSaveYourselfAtom);
 #endif
 #ifdef USE_QUIT_APP_ATOM
-            WmQuitAppAtom = XInternAtom(dpy, "_WM_QUIT_APP", False);
-            __INST(quitAppAtom) = __MKATOMOBJ(WmQuitAppAtom);
-#endif
-            WmDeleteWindowAtom = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
-            __INST(deleteWindowAtom) = __MKATOMOBJ(WmDeleteWindowAtom);
-
-            UUIDAtom = XInternAtom(dpy, "UUID", False);
-            __INST(uuidAtom) = __MKATOMOBJ(UUIDAtom);
-            STXDeviceAtom = XInternAtom(dpy, "STX_DEVICE_ID", False);
-            __INST(stxDeviceAtom) = __MKATOMOBJ(STXDeviceAtom);
-
-            LEAVE_XLIB();
-        } else {
+	    WmQuitAppAtom = XInternAtom(dpy, "_WM_QUIT_APP", False);
+	    __INST(quitAppAtom) = __MKATOMOBJ(WmQuitAppAtom);
+#endif
+	    WmDeleteWindowAtom = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
+	    __INST(deleteWindowAtom) = __MKATOMOBJ(WmDeleteWindowAtom);
+
+	    UUIDAtom = XInternAtom(dpy, "UUID", False);
+	    __INST(uuidAtom) = __MKATOMOBJ(UUIDAtom);
+	    STXDeviceAtom = XInternAtom(dpy, "STX_DEVICE_ID", False);
+	    __INST(stxDeviceAtom) = __MKATOMOBJ(STXDeviceAtom);
+
+	    LEAVE_XLIB();
+	} else {
 #ifdef USE_QUIT_APP_ATOM
-            WmQuitAppAtom = __AtomVal(__INST(quitAppAtom));
+	    WmQuitAppAtom = __AtomVal(__INST(quitAppAtom));
 #else
-            WmQuitAppAtom = 0;
-#endif
-            WmProtocolsAtom = __AtomVal(__INST(protocolsAtom));
-            WmDeleteWindowAtom = __AtomVal(__INST(deleteWindowAtom));
+	    WmQuitAppAtom = 0;
+#endif
+	    WmProtocolsAtom = __AtomVal(__INST(protocolsAtom));
+	    WmDeleteWindowAtom = __AtomVal(__INST(deleteWindowAtom));
 #ifdef USE_SAVEYOURSELF_ATOM
-            WmSaveYourselfAtom = __AtomVal(__INST(saveYourselfAtom));
+	    WmSaveYourselfAtom = __AtomVal(__INST(saveYourselfAtom));
 #else
-            WmSaveYourselfAtom = 0;
-#endif
-            UUIDAtom = __AtomVal(__INST(uuidAtom));;
-            STXDeviceAtom = __AtomVal(__INST(stxDeviceAtom));;
-        }
-
-        /*
-         * tell window manager to not kill us but send an event instead
-         */
-        atoms[0] = WmDeleteWindowAtom; atomCount++;
+	    WmSaveYourselfAtom = 0;
+#endif
+	    UUIDAtom = __AtomVal(__INST(uuidAtom));;
+	    STXDeviceAtom = __AtomVal(__INST(stxDeviceAtom));;
+	}
+
+	/*
+	 * tell window manager to not kill us but send an event instead
+	 */
+	atoms[0] = WmDeleteWindowAtom; atomCount++;
 #ifdef USE_SAVEYOURSELF_ATOM
-        atoms[atomCount] = WmSaveYourselfAtom; atomCount++;
+	atoms[atomCount] = WmSaveYourselfAtom; atomCount++;
 #endif
 #ifdef USE_QUIT_APP_ATOM
-        atoms[atomCount] = WmQuitAppAtom; atomCount++;
-#endif
-        ENTER_XLIB();
-        XChangeProperty(dpy, newWindow, WmProtocolsAtom, XA_ATOM,
-                        32, PropModeReplace, (unsigned char *)atoms, atomCount);
-        LEAVE_XLIB();
-
-        /*
-         * an optional unique id (to mark stx-windows)
-         */
-        if (__isBytes(__INST(uniqueDeviceID))) {
-            int numUUIDBytes = __byteArraySize(__INST(uniqueDeviceID));
-            unsigned char uuidBytes[32];
-
-            if (numUUIDBytes <= sizeof(uuidBytes)) {
-                Atom uuidAtom;
-
-                bcopy(__byteArrayVal(__INST(uniqueDeviceID)), uuidBytes, numUUIDBytes);
-
-                ENTER_XLIB();
-                XChangeProperty (dpy, newWindow, STXDeviceAtom, UUIDAtom, 8, PropModeReplace,
-                                 uuidBytes, numUUIDBytes );
-                LEAVE_XLIB();
-            }
-        }
+	atoms[atomCount] = WmQuitAppAtom; atomCount++;
+#endif
+	ENTER_XLIB();
+	XChangeProperty(dpy, newWindow, WmProtocolsAtom, XA_ATOM,
+			32, PropModeReplace, (unsigned char *)atoms, atomCount);
+	LEAVE_XLIB();
+
+	/*
+	 * an optional unique id (to mark stx-windows)
+	 */
+	if (__isBytes(__INST(uniqueDeviceID))) {
+	    int numUUIDBytes = __byteArraySize(__INST(uniqueDeviceID));
+	    unsigned char uuidBytes[32];
+
+	    if (numUUIDBytes <= sizeof(uuidBytes)) {
+		Atom uuidAtom;
+
+		bcopy(__byteArrayVal(__INST(uniqueDeviceID)), uuidBytes, numUUIDBytes);
+
+		ENTER_XLIB();
+		XChangeProperty (dpy, newWindow, STXDeviceAtom, UUIDAtom, 8, PropModeReplace,
+				 uuidBytes, numUUIDBytes );
+		LEAVE_XLIB();
+	    }
+	}
 
 #ifdef SUPPORT_MOTIF_WM_HINTS
-        /*
-         * less decoration
-         */
-        if ((wStyle == @symbol(undecorated))
-         || (wStyle == @symbol(dialog2))
-         || (wStyle == @symbol(notitle))
-        ) {
-            if (__INST(motifWMHintsAtom) == nil) {
-                ENTER_XLIB();
-                MotifWMHintsAtom = XInternAtom(dpy, "_MOTIF_WM_HINTS", False);
-                __INST(motifWMHintsAtom) = __MKATOMOBJ(MotifWMHintsAtom);
-                LEAVE_XLIB();
-            } else {
-                MotifWMHintsAtom = __AtomVal(__INST(motifWMHintsAtom));
-            }
-
-            {
-                struct hints {
-                    unsigned long flags;
-                    unsigned long functions;
-                    unsigned long decorations;
-                    long input_mode;
-                    unsigned long status;
-                } mvm_hints;
-
-                if (wStyle == @symbol(undecorated)) {
-                    mvm_hints.decorations = MWM_DECOR_NONE;
-                }
-                if (wStyle == @symbol(dialog2)) {
-                    mvm_hints.decorations = MWM_DECOR_BORDER
-                                            | MWM_DECOR_RESIZEH
-                                            | MWM_DECOR_TITLE
-                                            /* | MWM_DECOR_MENU */
-                                            /* | MWM_DECOR_MINIMIZE */
-                                            /* | MWM_DECOR_MAXIMIZE */
-                                            ;
-                }
-                if (wStyle == @symbol(notitle)) {
-                    mvm_hints.decorations = MWM_DECOR_BORDER
-                                            /* | MWM_DECOR_RESIZEH  */
-                                            /* | MWM_DECOR_TITLE    */
-                                            /* | MWM_DECOR_MENU     */
-                                            /* | MWM_DECOR_MINIMIZE */
-                                            /* | MWM_DECOR_MAXIMIZE */
-                                            ;
-                }
-                mvm_hints.flags =  MWM_HINTS_DECORATIONS;
-                ENTER_XLIB();
-                XChangeProperty (dpy, newWindow, MotifWMHintsAtom,
-                                     MotifWMHintsAtom, 32, PropModeReplace,
-                                     (unsigned char*)&mvm_hints, 5 );
-                LEAVE_XLIB();
-            }
-        }
+	/*
+	 * less decoration
+	 */
+	if ((wStyle == @symbol(undecorated))
+	 || (wStyle == @symbol(dialog2))
+	 || (wStyle == @symbol(notitle))
+	) {
+	    if (__INST(motifWMHintsAtom) == nil) {
+		ENTER_XLIB();
+		MotifWMHintsAtom = XInternAtom(dpy, "_MOTIF_WM_HINTS", False);
+		__INST(motifWMHintsAtom) = __MKATOMOBJ(MotifWMHintsAtom);
+		LEAVE_XLIB();
+	    } else {
+		MotifWMHintsAtom = __AtomVal(__INST(motifWMHintsAtom));
+	    }
+
+	    {
+		struct hints {
+		    unsigned long flags;
+		    unsigned long functions;
+		    unsigned long decorations;
+		    long input_mode;
+		    unsigned long status;
+		} mvm_hints;
+
+		if (wStyle == @symbol(undecorated)) {
+		    mvm_hints.decorations = MWM_DECOR_NONE;
+		}
+		if (wStyle == @symbol(dialog2)) {
+		    mvm_hints.decorations = MWM_DECOR_BORDER
+					    | MWM_DECOR_RESIZEH
+					    | MWM_DECOR_TITLE
+					    /* | MWM_DECOR_MENU */
+					    /* | MWM_DECOR_MINIMIZE */
+					    /* | MWM_DECOR_MAXIMIZE */
+					    ;
+		}
+		if (wStyle == @symbol(notitle)) {
+		    mvm_hints.decorations = MWM_DECOR_BORDER
+					    /* | MWM_DECOR_RESIZEH  */
+					    /* | MWM_DECOR_TITLE    */
+					    /* | MWM_DECOR_MENU     */
+					    /* | MWM_DECOR_MINIMIZE */
+					    /* | MWM_DECOR_MAXIMIZE */
+					    ;
+		}
+		mvm_hints.flags =  MWM_HINTS_DECORATIONS;
+		ENTER_XLIB();
+		XChangeProperty (dpy, newWindow, MotifWMHintsAtom,
+				     MotifWMHintsAtom, 32, PropModeReplace,
+				     (unsigned char*)&mvm_hints, 5 );
+		LEAVE_XLIB();
+	    }
+	}
 #endif /* SUPPORT_MOTIF_WM_HINTS */
     }
 
@@ -2564,9 +2564,9 @@
 
     (wsuperView isNil "this is a topwindow"
      and:[wlabel notEmptyOrNil]) ifTrue:[
-        self
-            setIconName:wlabel in:windowId;
-            setWindowName:wlabel in:windowId.
+	self
+	    setIconName:wlabel in:windowId;
+	    setWindowName:wlabel in:windowId.
     ].
 
     self addKnownView:aView withId:windowId.
@@ -2584,25 +2584,25 @@
      * ignore closed connection
      */
     if (! ISCONNECTED) {
-        RETURN ( self );
+	RETURN ( self );
     }
 
     if (__isExternalAddress(aGCId)) {
-        GC gc = __GCVal(aGCId);
-
-        if (gc) {
-            __ExternalAddressInstPtr(aGCId)->e_address = NULL;
-
-            ENTER_XLIB();
-            XFreeGC(myDpy, gc);
-            LEAVE_XLIB();
+	GC gc = __GCVal(aGCId);
+
+	if (gc) {
+	    __ExternalAddressInstPtr(aGCId)->e_address = NULL;
+
+	    ENTER_XLIB();
+	    XFreeGC(myDpy, gc);
+	    LEAVE_XLIB();
 #ifdef COUNT_RESOURCES
-            __cnt_gc--;
-#endif
-        } else {
-            console_fprintf(stderr, "XWorkstation [warning]: trying to destroy GC twice\n");
-        }
-        RETURN ( self );
+	    __cnt_gc--;
+#endif
+	} else {
+	    console_fprintf(stderr, "XWorkstation [warning]: trying to destroy GC twice\n");
+	}
+	RETURN ( self );
     }
 %}.
     self primitiveFailed
@@ -2616,23 +2616,23 @@
      * ignore closed connection
      */
     if (! ISCONNECTED) {
-        RETURN ( self );
+	RETURN ( self );
     }
 
     if (__isExternalAddress(aDrawableId)) {
-        Pixmap pix = __PixmapVal(aDrawableId);
-
-        if (pix) {
-
-            ENTER_XLIB();
-            XFreePixmap(myDpy, pix);
-            LEAVE_XLIB();
+	Pixmap pix = __PixmapVal(aDrawableId);
+
+	if (pix) {
+
+	    ENTER_XLIB();
+	    XFreePixmap(myDpy, pix);
+	    LEAVE_XLIB();
 #ifdef COUNT_RESOURCES
-            __cnt_bitmap--;
-#endif
-
-        }
-        RETURN ( self );
+	    __cnt_bitmap--;
+#endif
+
+	}
+	RETURN ( self );
     }
 %}.
     self primitiveFailed
@@ -2640,7 +2640,7 @@
 
 destroyView:aViewOrNil withId:aWindowId
     XftFontDescription notNil ifTrue:[
-        XftFontDescription aboutToDestroyViewWithDevice:self id:aWindowId.
+	XftFontDescription aboutToDestroyViewWithDevice:self id:aWindowId.
     ].
     self primDestroyViewWithId:aWindowId.
     self removeKnownView:aViewOrNil withId:aWindowId.
@@ -2660,16 +2660,16 @@
      && __isExternalAddress(aGCId)
      && ISCONNECTED) {
 
-        ENTER_XLIB();
-        dps = XDPSCreateContext(myDpy, __DrawableVal(aDrawableId),
-                                       __GCVal(aGCId),
-                                       0, height, 0, colormap, NULL, 0,
-                                       XDPSDefaultTextBackstop,
-                                       XDPSDefaultErrorProc,
-                                       NULL);
-        LEAVE_XLIB();
-
-        RETURN ( dps ? __MKEXTERNALADDRESS(dps) : nil );
+	ENTER_XLIB();
+	dps = XDPSCreateContext(myDpy, __DrawableVal(aDrawableId),
+				       __GCVal(aGCId),
+				       0, height, 0, colormap, NULL, 0,
+				       XDPSDefaultTextBackstop,
+				       XDPSDefaultErrorProc,
+				       NULL);
+	LEAVE_XLIB();
+
+	RETURN ( dps ? __MKEXTERNALADDRESS(dps) : nil );
     }
 #endif
 %}.
@@ -2686,16 +2686,16 @@
 
     if (__isExternalAddress(aDrawableId) && ISCONNECTED) {
 
-        ENTER_XLIB();
-        gc = XCreateGC(myDpy, __DrawableVal(aDrawableId), 0L, (XGCValues *)0);
-        LEAVE_XLIB();
+	ENTER_XLIB();
+	gc = XCreateGC(myDpy, __DrawableVal(aDrawableId), 0L, (XGCValues *)0);
+	LEAVE_XLIB();
 
 #ifdef COUNT_RESOURCES
-        if (gc)
-            __cnt_gc++;
-#endif
-
-        RETURN ( gc ? __MKEXTERNALADDRESS(gc) : nil );
+	if (gc)
+	    __cnt_gc++;
+#endif
+
+	RETURN ( gc ? __MKEXTERNALADDRESS(gc) : nil );
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -2731,86 +2731,86 @@
     int bytesPerRow;
 
     if (! ISCONNECTED) {
-        RETURN (nil);
+	RETURN (nil);
     }
 
     dpy = myDpy;
     if (firstCall) {
-        for (index=0; index < 256; index++) {
-            int t = 0;
-
-            if (index & 128) t |=   1;
-            if (index &  64) t |=   2;
-            if (index &  32) t |=   4;
-            if (index &  16) t |=   8;
-            if (index &   8) t |=  16;
-            if (index &   4) t |=  32;
-            if (index &   2) t |=  64;
-            if (index &   1) t |= 128;
-
-            reverseBitTable[index] = t;
-        }
-        firstCall = 0;
+	for (index=0; index < 256; index++) {
+	    int t = 0;
+
+	    if (index & 128) t |=   1;
+	    if (index &  64) t |=   2;
+	    if (index &  32) t |=   4;
+	    if (index &  16) t |=   8;
+	    if (index &   8) t |=  16;
+	    if (index &   4) t |=  32;
+	    if (index &   2) t |=  64;
+	    if (index &   1) t |= 128;
+
+	    reverseBitTable[index] = t;
+	}
+	firstCall = 0;
     }
 
     if (__bothSmallInteger(w, h) && _isNonNilObject(anArray)) {
-        newBitmap = (Pixmap)0;
-        b_width = __intVal(w);
-        b_height = __intVal(h);
-        bytesPerRow = (b_width + 7) / 8;
-        nBytes = b_height * bytesPerRow;
-        if (nBytes < sizeof(fastBits)) {
-            cp = b_bits = fastBits;
-            allocatedBits = 0;
-        } else {
-            cp = b_bits = allocatedBits = (unsigned char *) malloc(nBytes);
-            if (! cp) goto fail;
-        }
-
-        if (__isArrayLike(anArray)) {
-            index = 1;
-            op = &(__ArrayInstPtr(anArray)->a_element[index - 1]);
-            for (row = b_height; row; row--) {
-                for (col = bytesPerRow; col; col--) {
-                    num = *op++;
-                    if (__isSmallInteger(num)) {
-                        bits = __intVal(num);
-                    } else {
-                        bits = __longIntVal(num);
-                        if (bits == 0) {
-                            goto fail;
-                        }
-                    }
-                    *cp++ = reverseBitTable[bits & 0xFF];
-                }
-            }
-        } else {
-            if (__isByteArrayLike(anArray)) {
-                pBits = __ByteArrayInstPtr(anArray)->ba_element;
-                for (col = b_height*bytesPerRow; col; col--) {
-                    *cp++ = reverseBitTable[*pBits++];
-                }
-            } else {
-                goto fail;
-            }
-        }
-
-
-        ENTER_XLIB();
-        newBitmap = XCreateBitmapFromData(dpy, RootWindow(dpy, screen),
-                                               (char *)b_bits,
-                                               b_width, b_height);
-        LEAVE_XLIB();
+	newBitmap = (Pixmap)0;
+	b_width = __intVal(w);
+	b_height = __intVal(h);
+	bytesPerRow = (b_width + 7) / 8;
+	nBytes = b_height * bytesPerRow;
+	if (nBytes < sizeof(fastBits)) {
+	    cp = b_bits = fastBits;
+	    allocatedBits = 0;
+	} else {
+	    cp = b_bits = allocatedBits = (unsigned char *) malloc(nBytes);
+	    if (! cp) goto fail;
+	}
+
+	if (__isArrayLike(anArray)) {
+	    index = 1;
+	    op = &(__ArrayInstPtr(anArray)->a_element[index - 1]);
+	    for (row = b_height; row; row--) {
+		for (col = bytesPerRow; col; col--) {
+		    num = *op++;
+		    if (__isSmallInteger(num)) {
+			bits = __intVal(num);
+		    } else {
+			bits = __longIntVal(num);
+			if (bits == 0) {
+			    goto fail;
+			}
+		    }
+		    *cp++ = reverseBitTable[bits & 0xFF];
+		}
+	    }
+	} else {
+	    if (__isByteArrayLike(anArray)) {
+		pBits = __ByteArrayInstPtr(anArray)->ba_element;
+		for (col = b_height*bytesPerRow; col; col--) {
+		    *cp++ = reverseBitTable[*pBits++];
+		}
+	    } else {
+		goto fail;
+	    }
+	}
+
+
+	ENTER_XLIB();
+	newBitmap = XCreateBitmapFromData(dpy, RootWindow(dpy, screen),
+					       (char *)b_bits,
+					       b_width, b_height);
+	LEAVE_XLIB();
 #ifdef COUNT_RESOURCES
-        if (newBitmap)
-            __cnt_bitmap++;
+	if (newBitmap)
+	    __cnt_bitmap++;
 #endif
 
 
 fail: ;
-        if (allocatedBits)
-            free(allocatedBits);
-        RETURN ( newBitmap ? __MKEXTERNALADDRESS(newBitmap) : nil );
+	if (allocatedBits)
+	    free(allocatedBits);
+	RETURN ( newBitmap ? __MKEXTERNALADDRESS(newBitmap) : nil );
     }
 %}.
     ^ nil
@@ -2827,22 +2827,22 @@
     <context: #return>
 %{
     if (! ISCONNECTED) {
-        RETURN ( self );
+	RETURN ( self );
     }
 
     if (__isExternalAddress(aWindowId)) {
-        Window win = __WindowVal(aWindowId);
-
-        if (win) {
-
-            ENTER_XLIB();
-            XDestroyWindow(myDpy, win);
-            LEAVE_XLIB();
+	Window win = __WindowVal(aWindowId);
+
+	if (win) {
+
+	    ENTER_XLIB();
+	    XDestroyWindow(myDpy, win);
+	    LEAVE_XLIB();
 #ifdef COUNT_RESOURCES
-            __cnt_view--;
-#endif
-
-        }
+	    __cnt_view--;
+#endif
+
+	}
     }
 %}
 ! !
@@ -2881,14 +2881,14 @@
 
     s := aString ? ''.
     s isString ifFalse:[
-        s := s asStringWithCRsFrom:1 to:(s size) compressTabs:false withCR:false
+	s := s asStringWithCRsFrom:1 to:(s size) compressTabs:false withCR:false
     ].
 
     viewID := aView drawableId.
     viewID notNil ifTrue:[ "/ if the view is not already closed
-        "/ for now - should add support to pass emphasis information too
-        s := s string.
-        self setPrimaryText:s owner:viewID.
+	"/ for now - should add support to pass emphasis information too
+	s := s string.
+	self setPrimaryText:s owner:viewID.
     ]
 
     "Created: / 27-03-2012 / 14:46:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -2910,20 +2910,20 @@
     Status ok;
 
     if (ISCONNECTED) {
-        Display *dpy = myDpy;
-
-
-        ENTER_XLIB();
-        ok = XAllocColorCells(dpy, DefaultColormap(dpy, screen), (Bool)0,
-                                   &dummy, 0, &color.pixel, 1);
-        LEAVE_XLIB();
-
-        if (ok) {
+	Display *dpy = myDpy;
+
+
+	ENTER_XLIB();
+	ok = XAllocColorCells(dpy, DefaultColormap(dpy, screen), (Bool)0,
+				   &dummy, 0, &color.pixel, 1);
+	LEAVE_XLIB();
+
+	if (ok) {
 #ifdef COUNT_RESOURCES
-            __cnt_color++;
-#endif
-            RETURN ( __MKSMALLINT(color.pixel) );
-        }
+	    __cnt_color++;
+#endif
+	    RETURN ( __MKSMALLINT(color.pixel) );
+	}
     }
 %}.
     ^ nil
@@ -2946,35 +2946,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
@@ -2997,30 +2997,30 @@
     if (__bothSmallInteger(r, g)
      && __isSmallInteger(b)
      && ISCONNECTED) {
-        ecolor.red = __intVal(r);
-        ecolor.green= __intVal(g);
-        ecolor.blue = __intVal(b);
+	ecolor.red = __intVal(r);
+	ecolor.green= __intVal(g);
+	ecolor.blue = __intVal(b);
 #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
-        dpy = myDpy;
-
-        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
+	dpy = myDpy;
+
+	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 colorScaledRed:r scaledGreen:g scaledBlue:b
@@ -3051,8 +3051,8 @@
 
 #ifdef QUICK_TRUE_COLORS
     if (__INST(visualType) == @symbol(TrueColor)) {
-        /* no need to do anything on TrueColor displays ... */
-        RETURN (self);
+	/* no need to do anything on TrueColor displays ... */
+	RETURN (self);
     }
 #endif
 
@@ -3060,21 +3060,21 @@
      * ignore closed connection
      */
     if (! ISCONNECTED) {
-        RETURN (self);
+	RETURN (self);
     }
 
     if (__isSmallInteger(colorIndex)) {
-        dpy = myDpy;
-        color = (long) __intVal(colorIndex);
-
-        ENTER_XLIB();
-        XFreeColors(dpy, DefaultColormap(dpy, screen), &color, 1, 0L);
-        LEAVE_XLIB();
+	dpy = myDpy;
+	color = (long) __intVal(colorIndex);
+
+	ENTER_XLIB();
+	XFreeColors(dpy, DefaultColormap(dpy, screen), &color, 1, 0L);
+	LEAVE_XLIB();
 #ifdef COUNT_RESOURCES
-        __cnt_color--;
-#endif
-
-        RETURN ( self );
+	__cnt_color--;
+#endif
+
+	RETURN ( self );
     }
 %}.
     self primitiveFailed
@@ -3093,29 +3093,29 @@
 
     if (ISCONNECTED
      && __isSmallInteger(index)) {
-        Display *dpy = myDpy;
-
-        color.pixel = __intVal(index);
-
-        ENTER_XLIB();
-        XQueryColor(dpy, DefaultColormap(dpy, screen), &color);
-        LEAVE_XLIB();
-
-
-        /*
-         * have to compensate for an error in X ?, which does not scale
-         * colors correctly if lesser than 16bits are valid in a color,
-         * (for example, color white on a 4bitsPerRGB server will Return
-         * (16rF000 16rF000 16rF000) instead of (16rFFFF 16rFFFF 16rFFFF)
-         */
-        bits = __intVal(__INST(bitsPerRGB));
-        scale = (1<<bits) - 1;
-        shift = 16 - bits;
-
-        sr = ((double)(color.red>>shift) / scale) * 0xFFFF;
-        sg = ((double)(color.green>>shift) / scale) * 0xFFFF;
-        sb = ((double)(color.blue>>shift) / scale) * 0xFFFF;
-        RETURN ( __ARRAY_WITH3(__MKSMALLINT(sr), __MKSMALLINT(sg), __MKSMALLINT(sb)));
+	Display *dpy = myDpy;
+
+	color.pixel = __intVal(index);
+
+	ENTER_XLIB();
+	XQueryColor(dpy, DefaultColormap(dpy, screen), &color);
+	LEAVE_XLIB();
+
+
+	/*
+	 * have to compensate for an error in X ?, which does not scale
+	 * colors correctly if lesser than 16bits are valid in a color,
+	 * (for example, color white on a 4bitsPerRGB server will Return
+	 * (16rF000 16rF000 16rF000) instead of (16rFFFF 16rFFFF 16rFFFF)
+	 */
+	bits = __intVal(__INST(bitsPerRGB));
+	scale = (1<<bits) - 1;
+	shift = 16 - bits;
+
+	sr = ((double)(color.red>>shift) / scale) * 0xFFFF;
+	sg = ((double)(color.green>>shift) / scale) * 0xFFFF;
+	sb = ((double)(color.blue>>shift) / scale) * 0xFFFF;
+	RETURN ( __ARRAY_WITH3(__MKSMALLINT(sr), __MKSMALLINT(sg), __MKSMALLINT(sb)));
     }
 %}.
     ^ super getScaledRGBFrom:index
@@ -3134,39 +3134,39 @@
 
     if (ISCONNECTED
      && __isStringLike(colorName)) {
-        Display *dpy = myDpy;
-
-
-        if (XParseColor(dpy, DefaultColormap(dpy, screen),
-                             (char *) __stringVal(colorName), &color)) {
-            /*
-             * have to compensate for an error in X ?, which does not scale
-             * colors correctly if lesser than 16bits are valid in a color,
-             * (for example, color white on a 4bitsPerRGB server will Return
-             * (16rF000 16rF000 16rF000) instead of (16rFFFF 16rFFFF 16rFFFF)
-             */
-            bits = __intVal(__INST(bitsPerRGB));
-            scale = (1<<bits) - 1;
-            shift = 16 - bits;
-
-            /* do assignment to doubles (no cast) - avoid alignment problems in HPPA */
-            dr = color.red>>shift;
-            dg = color.green>>shift;
-            db = color.blue>>shift;
-
-            sr = (dr / scale) * 0xFFFF;
-            sg = (dg / scale) * 0xFFFF;
-            sb = (db / scale) * 0xFFFF;
-            RETURN ( __ARRAY_WITH3(__MKSMALLINT(sr), __MKSMALLINT(sg), __MKSMALLINT(sb)));
-        }
+	Display *dpy = myDpy;
+
+
+	if (XParseColor(dpy, DefaultColormap(dpy, screen),
+			     (char *) __stringVal(colorName), &color)) {
+	    /*
+	     * have to compensate for an error in X ?, which does not scale
+	     * colors correctly if lesser than 16bits are valid in a color,
+	     * (for example, color white on a 4bitsPerRGB server will Return
+	     * (16rF000 16rF000 16rF000) instead of (16rFFFF 16rFFFF 16rFFFF)
+	     */
+	    bits = __intVal(__INST(bitsPerRGB));
+	    scale = (1<<bits) - 1;
+	    shift = 16 - bits;
+
+	    /* do assignment to doubles (no cast) - avoid alignment problems in HPPA */
+	    dr = color.red>>shift;
+	    dg = color.green>>shift;
+	    db = color.blue>>shift;
+
+	    sr = (dr / scale) * 0xFFFF;
+	    sg = (dg / scale) * 0xFFFF;
+	    sb = (db / scale) * 0xFFFF;
+	    RETURN ( __ARRAY_WITH3(__MKSMALLINT(sr), __MKSMALLINT(sg), __MKSMALLINT(sb)));
+	}
 
     }
 %}.
     ^ super getScaledRGBFromName:colorName
 
     "
-        Screen current getScaledRGBFromName:'red'
-        Screen current getScaledRGBFromName:'orange'
+	Screen current getScaledRGBFromName:'red'
+	Screen current getScaledRGBFromName:'orange'
     "
 !
 
@@ -3181,22 +3181,22 @@
     aStream isNil ifTrue:[^ nil].
     list := OrderedCollection new.
     [aStream atEnd] whileFalse:[
-        line := aStream nextLine.
-        line notNil ifTrue:[
-            "skip the r/g/b numbers"
-            index := 1.
-            [(line at:index) isSeparator] whileTrue:[index := index + 1].
-            [(line at:index) isDigit] whileTrue:[index := index + 1].
-            [(line at:index) isSeparator] whileTrue:[index := index + 1].
-            [(line at:index) isDigit] whileTrue:[index := index + 1].
-            [(line at:index) isSeparator] whileTrue:[index := index + 1].
-            [(line at:index) isDigit] whileTrue:[index := index + 1].
-            [(line at:index) isSeparator] whileTrue:[index := index + 1].
-            colorName := line copyFrom:index.
-            ((colorName occurrencesOf:(Character space)) == 0) ifTrue:[
-                list add:colorName
-            ]
-        ]
+	line := aStream nextLine.
+	line notNil ifTrue:[
+	    "skip the r/g/b numbers"
+	    index := 1.
+	    [(line at:index) isSeparator] whileTrue:[index := index + 1].
+	    [(line at:index) isDigit] whileTrue:[index := index + 1].
+	    [(line at:index) isSeparator] whileTrue:[index := index + 1].
+	    [(line at:index) isDigit] whileTrue:[index := index + 1].
+	    [(line at:index) isSeparator] whileTrue:[index := index + 1].
+	    [(line at:index) isDigit] whileTrue:[index := index + 1].
+	    [(line at:index) isSeparator] whileTrue:[index := index + 1].
+	    colorName := line copyFrom:index.
+	    ((colorName occurrencesOf:(Character space)) == 0) ifTrue:[
+		list add:colorName
+	    ]
+	]
     ].
     aStream close.
     ^ list sort
@@ -3216,10 +3216,10 @@
 %{  /* NOCONTEXT */
 
     if (__isSmallInteger(aPercentage)) {
-        RETURN ( __MKSMALLINT(0xFFFF * __intVal(aPercentage) / 100) );
+	RETURN ( __MKSMALLINT(0xFFFF * __intVal(aPercentage) / 100) );
     }
     if (__isFloat(aPercentage)) {
-        RETURN ( __MKSMALLINT(0xFFFF * (int)(__floatVal(aPercentage)) / 100) );
+	RETURN ( __MKSMALLINT(0xFFFF * (int)(__floatVal(aPercentage)) / 100) );
     }
 %}.
     ^ (16rFFFF * aPercentage / 100) rounded
@@ -3239,33 +3239,33 @@
     int ok = 1;
 
     if (__isSmallInteger(sred))
-        r = __intVal(sred);
+	r = __intVal(sred);
     else ok = 0;
 
     if (__isSmallInteger(sgreen))
-        g = __intVal(sgreen);
+	g = __intVal(sgreen);
     else ok = 0;
 
     if (__isSmallInteger(sblue))
-        b = __intVal(sblue);
+	b = __intVal(sblue);
     else ok = 0;
 
     if (ISCONNECTED
      && __isSmallInteger(index) && ok) {
-        Display *dpy = myDpy;
-
-        color.pixel = __intVal(index);
-        color.red = r;
-        color.green = g;
-        color.blue = b;
-        color.flags = DoRed | DoGreen | DoBlue;
-
-
-        ENTER_XLIB();
-        XStoreColor(dpy, DefaultColormap(dpy, screen), &color);
-        LEAVE_XLIB();
-
-        RETURN ( self );
+	Display *dpy = myDpy;
+
+	color.pixel = __intVal(index);
+	color.red = r;
+	color.green = g;
+	color.blue = b;
+	color.flags = DoRed | DoGreen | DoBlue;
+
+
+	ENTER_XLIB();
+	XStoreColor(dpy, DefaultColormap(dpy, screen), &color);
+	LEAVE_XLIB();
+
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -3282,30 +3282,30 @@
     "/ if you add something here, also add to #shapeNumberFromCursor ...
 
     ^ #(
-        #upLeftArrow            "/ XC_top_left_arrow
-        #upRightHand            "/ XC_hand1
-        #upDownArrow            "/ XC_sb_v_double_arrow
-        #leftRightArrow         "/ XC_sb_h_double_arrow
-        #upLimitArrow           "/ XC_top_side
-        #downLimitArrow         "/ XC_bottom_side
-        #leftLimitArrow         "/ XC_left_side
-        #rightLimitArrow        "/ XC_right_side
-        #text                   "/ XC_xterm
-        #upRightArrow           "/ XC_draft_large
-        #leftHand               "/ XC_hand2
-        #questionMark           "/ XC_question_arrow
-        #cross                  "/ XC_X_cursor
-        #wait                   "/ XC_watch
-        #crossHair              "/ XC_tcross
-        #origin                 "/ XC_ul_angle
-        #topLeft                "/ XC_ul_angle
-        #corner                 "/ XC_lr_angle
-        #bottomRight            "/ XC_lr_angle
-        #topRight               "/ XC_ur_angle
-        #bottomLeft             "/ XC_ll_angle
-        #square                 "/ XC_dotbox
-        #fourWay                "/ XC_fleur
-        #crossCursor            "/ XC_X_cursor
+	#upLeftArrow            "/ XC_top_left_arrow
+	#upRightHand            "/ XC_hand1
+	#upDownArrow            "/ XC_sb_v_double_arrow
+	#leftRightArrow         "/ XC_sb_h_double_arrow
+	#upLimitArrow           "/ XC_top_side
+	#downLimitArrow         "/ XC_bottom_side
+	#leftLimitArrow         "/ XC_left_side
+	#rightLimitArrow        "/ XC_right_side
+	#text                   "/ XC_xterm
+	#upRightArrow           "/ XC_draft_large
+	#leftHand               "/ XC_hand2
+	#questionMark           "/ XC_question_arrow
+	#cross                  "/ XC_X_cursor
+	#wait                   "/ XC_watch
+	#crossHair              "/ XC_tcross
+	#origin                 "/ XC_ul_angle
+	#topLeft                "/ XC_ul_angle
+	#corner                 "/ XC_lr_angle
+	#bottomRight            "/ XC_lr_angle
+	#topRight               "/ XC_ur_angle
+	#bottomLeft             "/ XC_ll_angle
+	#square                 "/ XC_dotbox
+	#fourWay                "/ XC_fleur
+	#crossCursor            "/ XC_X_cursor
       )
 
     "Created: 8.4.1997 / 10:12:30 / cg"
@@ -3334,18 +3334,18 @@
      && __bothSmallInteger(bgR, bgG)
      && __bothSmallInteger(bgB, fgR)) {
 
-        fgcolor.red = __intVal(fgR);
-        fgcolor.green= __intVal(fgG);
-        fgcolor.blue = __intVal(fgB);
-        bgcolor.red = __intVal(bgR);
-        bgcolor.green= __intVal(bgG);
-        bgcolor.blue = __intVal(bgB);
-
-        ENTER_XLIB();
-        XRecolorCursor(myDpy, __CursorVal(aCursorId), &fgcolor, &bgcolor);
-        LEAVE_XLIB();
-
-        RETURN ( self );
+	fgcolor.red = __intVal(fgR);
+	fgcolor.green= __intVal(fgG);
+	fgcolor.blue = __intVal(fgB);
+	bgcolor.red = __intVal(bgR);
+	bgcolor.green= __intVal(bgG);
+	bgcolor.blue = __intVal(bgB);
+
+	ENTER_XLIB();
+	XRecolorCursor(myDpy, __CursorVal(aCursorId), &fgcolor, &bgcolor);
+	LEAVE_XLIB();
+
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -3367,10 +3367,10 @@
     "create a cursor given 2 bitmaps (source, mask) and a hotspot"
 
     ^ self
-        primCreateCursorSourceFormId:sourceForm drawableId
-        maskFormId:maskForm drawableId
-        hotX:hx hotY:hy
-        width:w height:h
+	primCreateCursorSourceFormId:sourceForm drawableId
+	maskFormId:maskForm drawableId
+	hotX:hx hotY:hy
+	width:w height:h
 
     "Modified: / 26-04-2018 / 11:02:52 / stefan"
 !
@@ -3384,22 +3384,22 @@
      * ignore closed connection
      */
     if (! ISCONNECTED) {
-        RETURN ( self );
+	RETURN ( self );
     }
 
     if (__isExternalAddress(aCursorId)) {
-        Cursor curs = __CursorVal(aCursorId);
-
-        if (curs) {
-
-            ENTER_XLIB();
-            XFreeCursor(myDpy, curs);
-            LEAVE_XLIB();
+	Cursor curs = __CursorVal(aCursorId);
+
+	if (curs) {
+
+	    ENTER_XLIB();
+	    XFreeCursor(myDpy, curs);
+	    LEAVE_XLIB();
 #ifdef COUNT_RESOURCES
-            __cnt_cursor--;
-#endif
-        }
-        RETURN ( self );
+	    __cnt_cursor--;
+#endif
+	}
+	RETURN ( self );
     }
 %}.
     self primitiveFailed
@@ -3419,17 +3419,17 @@
     if (ISCONNECTED
      && __isSmallInteger(aShapeNumber)) {
 
-        ENTER_XLIB();
-        newCursor = XCreateFontCursor(myDpy, __intVal(aShapeNumber));
-        LEAVE_XLIB();
+	ENTER_XLIB();
+	newCursor = XCreateFontCursor(myDpy, __intVal(aShapeNumber));
+	LEAVE_XLIB();
 #ifdef COUNT_RESOURCES
-        if (newCursor)
-            __cnt_cursor++;
-#endif
-
-        if (newCursor != (Cursor)0) {
-            RETURN (__MKEXTERNALADDRESS(newCursor));
-        }
+	if (newCursor)
+	    __cnt_cursor++;
+#endif
+
+	if (newCursor != (Cursor)0) {
+	    RETURN (__MKEXTERNALADDRESS(newCursor));
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -3448,28 +3448,28 @@
      && __isExternalAddress(sourceId)
      && __isExternalAddress(maskId)
      && __bothSmallInteger(hx, hy)) {
-        fgColor.red = 0;        /* fg is black */
-        fgColor.green = 0;
-        fgColor.blue = 0;
-        bgColor.red = 0xFFFF;   /* bg is white */
-        bgColor.green = 0xFFFF;
-        bgColor.blue = 0xFFFF;
-
-
-        ENTER_XLIB();
-        newCursor = XCreatePixmapCursor(myDpy,
-                                __PixmapVal(sourceId),
-                                __PixmapVal(maskId),
-                                &fgColor, &bgColor, __intVal(hx), __intVal(hy));
-        LEAVE_XLIB();
+	fgColor.red = 0;        /* fg is black */
+	fgColor.green = 0;
+	fgColor.blue = 0;
+	bgColor.red = 0xFFFF;   /* bg is white */
+	bgColor.green = 0xFFFF;
+	bgColor.blue = 0xFFFF;
+
+
+	ENTER_XLIB();
+	newCursor = XCreatePixmapCursor(myDpy,
+				__PixmapVal(sourceId),
+				__PixmapVal(maskId),
+				&fgColor, &bgColor, __intVal(hx), __intVal(hy));
+	LEAVE_XLIB();
 #ifdef COUNT_RESOURCES
-        if (newCursor)
-            __cnt_cursor++;
-#endif
-
-        if (newCursor != (Cursor)0) {
-            RETURN (__MKEXTERNALADDRESS(newCursor));
-        }
+	if (newCursor)
+	    __cnt_cursor++;
+#endif
+
+	if (newCursor != (Cursor)0) {
+	    RETURN (__MKEXTERNALADDRESS(newCursor));
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -3522,128 +3522,128 @@
 
     (msgType := self atomIDOf:#DndProtocol) notNil ifTrue:[
 
-        "/ DND can drop files, file, dir, links, dirLink and text
-        "/ check for this.
-
-        dropObjects isCollection ifFalse:[
-            dropColl := Array with:dropObjects
-        ] ifTrue:[
-            dropColl := dropObjects
-        ].
-        anyFile := anyDir := anyText := anyOther := false.
-        dropColl do:[:aDropObject |
-            aDropObject isFileObject ifTrue:[
-                aDropObject theObject isDirectory ifTrue:[
-                    anyDir := true
-                ] ifFalse:[
-                    anyFile := true
-                ]
-            ] ifFalse:[
-                aDropObject isTextObject ifTrue:[
-                    anyText := true
-                ] ifFalse:[
-                    anyOther := true
-                ]
-            ]
-        ].
-
-        anyOther ifTrue:[
-            "/ DND does not support this ...
-            Logger info:'DND can only drop files or text'.
-            ^ false
-        ].
-        anyText ifTrue:[
-            (anyFile or:[anyDir]) ifTrue:[
-                "/ DND does not support mixed types
-                Logger info:'DND cannot drop both files and text'.
-                ^ false
-            ]
-        ].
-
-        dropCollSize := dropColl size.
-        anyFile ifTrue:[
-            dropType := #DndFiles.
-            dropCollSize == 1 ifTrue:[
-                dropType := #DndFile
-            ]
-        ] ifFalse:[
-            anyDir ifTrue:[
-                dropType := #DndFiles.
-                dropCollSize == 1 ifTrue:[
-                    dropType := #DndDir
-                ]
-            ] ifFalse:[
-                anyText ifTrue:[
-                    dropCollSize == 1 ifTrue:[
-                        dropType := #DndText
-                    ] ifFalse:[
-                        "/ can only drop a single text object
-                        Logger info:'DND can only drop a single text'.
-                        ^ false
-                    ]
-                ] ifFalse:[
-                    "/ mhmh ...
-                    Logger info:'DND cannot drop this'.
-                    ^ false
-                ]
-            ]
-        ].
-
-        dropTypeCode := self dndDropTypes indexOf:dropType.
-        dropTypeCode == 0 ifTrue:[
-            Logger info:'DND cannot drop this'.
-            ^ false
-        ].
-        dropTypeCode := dropTypeCode - 1.
-
-
-        "/ place the selection inTo the DndSelection property
-        "/ of the rootView ...
-        "/ ... need a single string, with 0-terminated parts.
-
-        strings := OrderedCollection new.
-        sz := 0.
-        dropColl do:[:anObject |
-            |s o|
-
-            o := anObject theObject.
-            anObject isFileObject ifTrue:[
-                o := o pathName
-            ].
-            s := o asString.
-            strings add:s.
-            sz := sz + (s size) + 1.
-        ].
-        val := String new:sz.
-        idx := 1.
-        strings do:[:aString |
-            |sz|
-
-            sz := aString size.
-            val replaceFrom:idx to:(idx + sz - 1) with:aString startingAt:1.
-            idx := idx + sz.
-            val at:idx put:(Character value:0).
-            idx := idx + 1
-        ].
-
-        self
-            setProperty:#DndSelection
-            type:#STRING
-            value:val
-            for:rootId.
-
-        ^ self
-            sendClientEvent:msgType
-            format:32
-            to:destinationId
-            propagate:true
-            eventMask:nil
-            window:destinationId
-            data1:dropTypeCode
-            data2:0
-            data3:destinationId
-            data4:nil
-            data5:nil.
+	"/ DND can drop files, file, dir, links, dirLink and text
+	"/ check for this.
+
+	dropObjects isCollection ifFalse:[
+	    dropColl := Array with:dropObjects
+	] ifTrue:[
+	    dropColl := dropObjects
+	].
+	anyFile := anyDir := anyText := anyOther := false.
+	dropColl do:[:aDropObject |
+	    aDropObject isFileObject ifTrue:[
+		aDropObject theObject isDirectory ifTrue:[
+		    anyDir := true
+		] ifFalse:[
+		    anyFile := true
+		]
+	    ] ifFalse:[
+		aDropObject isTextObject ifTrue:[
+		    anyText := true
+		] ifFalse:[
+		    anyOther := true
+		]
+	    ]
+	].
+
+	anyOther ifTrue:[
+	    "/ DND does not support this ...
+	    Logger info:'DND can only drop files or text'.
+	    ^ false
+	].
+	anyText ifTrue:[
+	    (anyFile or:[anyDir]) ifTrue:[
+		"/ DND does not support mixed types
+		Logger info:'DND cannot drop both files and text'.
+		^ false
+	    ]
+	].
+
+	dropCollSize := dropColl size.
+	anyFile ifTrue:[
+	    dropType := #DndFiles.
+	    dropCollSize == 1 ifTrue:[
+		dropType := #DndFile
+	    ]
+	] ifFalse:[
+	    anyDir ifTrue:[
+		dropType := #DndFiles.
+		dropCollSize == 1 ifTrue:[
+		    dropType := #DndDir
+		]
+	    ] ifFalse:[
+		anyText ifTrue:[
+		    dropCollSize == 1 ifTrue:[
+			dropType := #DndText
+		    ] ifFalse:[
+			"/ can only drop a single text object
+			Logger info:'DND can only drop a single text'.
+			^ false
+		    ]
+		] ifFalse:[
+		    "/ mhmh ...
+		    Logger info:'DND cannot drop this'.
+		    ^ false
+		]
+	    ]
+	].
+
+	dropTypeCode := self dndDropTypes indexOf:dropType.
+	dropTypeCode == 0 ifTrue:[
+	    Logger info:'DND cannot drop this'.
+	    ^ false
+	].
+	dropTypeCode := dropTypeCode - 1.
+
+
+	"/ place the selection inTo the DndSelection property
+	"/ of the rootView ...
+	"/ ... need a single string, with 0-terminated parts.
+
+	strings := OrderedCollection new.
+	sz := 0.
+	dropColl do:[:anObject |
+	    |s o|
+
+	    o := anObject theObject.
+	    anObject isFileObject ifTrue:[
+		o := o pathName
+	    ].
+	    s := o asString.
+	    strings add:s.
+	    sz := sz + (s size) + 1.
+	].
+	val := String new:sz.
+	idx := 1.
+	strings do:[:aString |
+	    |sz|
+
+	    sz := aString size.
+	    val replaceFrom:idx to:(idx + sz - 1) with:aString startingAt:1.
+	    idx := idx + sz.
+	    val at:idx put:(Character value:0).
+	    idx := idx + 1
+	].
+
+	self
+	    setProperty:#DndSelection
+	    type:#STRING
+	    value:val
+	    for:rootId.
+
+	^ self
+	    sendClientEvent:msgType
+	    format:32
+	    to:destinationId
+	    propagate:true
+	    eventMask:nil
+	    window:destinationId
+	    data1:dropTypeCode
+	    data2:0
+	    data3:destinationId
+	    data4:nil
+	    data5:nil.
     ].
 
     ^ false
@@ -3656,14 +3656,14 @@
     "return the dropTypes as supported by DND"
 
     ^ #(
-            DndUnknown      "/ 0
-            DndRawData      "/ 1
-            DndFile         "/ 2
-            DndFiles        "/ 3
-            DndText         "/ 4
-            DndDir          "/ 5
-            DndLink         "/ 6
-            DndExe          "/ 7
+	    DndUnknown      "/ 0
+	    DndRawData      "/ 1
+	    DndFile         "/ 2
+	    DndFiles        "/ 3
+	    DndText         "/ 4
+	    DndDir          "/ 5
+	    DndLink         "/ 6
+	    DndExe          "/ 7
        )
 
     "Created: 6.4.1997 / 12:57:56 / cg"
@@ -3681,9 +3681,9 @@
     dropType := (self dndDropTypes) at:dropType+1 ifAbsent:#DndNotDnd.
 
     property := self
-                    getProperty:#DndSelection
-                    from:rootId
-                    delete:false.
+		    getProperty:#DndSelection
+		    from:rootId
+		    delete:false.
 
     propertyType := property key.
     dropValue := property value.
@@ -3697,57 +3697,57 @@
     "/ in the default dropMessage handling of SimpleView.
 
     dropType == #DndFiles ifTrue:[
-        "/ actually, a list of fileNames
-        dropValue firstOrNil isString ifFalse:[
-            Logger info:'expected a string propertyValue in drop'.
-            ^ self
-        ].
-        dropValue := dropValue collect:[:nm | nm asFilename].
-        dropType := #files.
+	"/ actually, a list of fileNames
+	dropValue firstOrNil isString ifFalse:[
+	    Logger info:'expected a string propertyValue in drop'.
+	    ^ self
+	].
+	dropValue := dropValue collect:[:nm | nm asFilename].
+	dropType := #files.
     ] ifFalse:[ (dropType == #DndFile) ifTrue:[
-        dropValue isString ifFalse:[
-            Logger info:'expected a string propertyValue in drop'.
-            ^ self
-        ].
-        dropValue := dropValue asFilename.
-        dropType := #file.
+	dropValue isString ifFalse:[
+	    Logger info:'expected a string propertyValue in drop'.
+	    ^ self
+	].
+	dropValue := dropValue asFilename.
+	dropType := #file.
     ] ifFalse:[ (dropType == #DndDir) ifTrue:[
-        dropValue isString ifFalse:[
-            Logger info:'expected a string propertyValue in drop'.
-            ^ self
-        ].
-        dropValue := dropValue asFilename.
-        dropType := #directory.
+	dropValue isString ifFalse:[
+	    Logger info:'expected a string propertyValue in drop'.
+	    ^ self
+	].
+	dropValue := dropValue asFilename.
+	dropType := #directory.
     ] ifFalse:[ (dropType == #DndText) ifTrue:[
-        (dropValue isString or:[dropValue isStringCollection]) ifFalse:[
-            Logger info:'expected a string propertyValue in drop'.
-            ^ self
-        ].
-        dropValue := dropValue asString.
-        dropType := #text.
+	(dropValue isString or:[dropValue isStringCollection]) ifFalse:[
+	    Logger info:'expected a string propertyValue in drop'.
+	    ^ self
+	].
+	dropValue := dropValue asString.
+	dropType := #text.
     ] ifFalse:[ (dropType == #DndExe) ifTrue:[
-        dropValue isString ifFalse:[
-            Logger info:'expected a string propertyValue in drop'.
-            ^ self
-        ].
-        dropType := #executable.
+	dropValue isString ifFalse:[
+	    Logger info:'expected a string propertyValue in drop'.
+	    ^ self
+	].
+	dropType := #executable.
     ] ifFalse:[ (dropType == #DndLink) ifTrue:[
-        dropValue isString ifFalse:[
-            Logger info:'expected a string propertyValue in drop'.
-            ^ self
-        ].
-        dropType := #link.
+	dropValue isString ifFalse:[
+	    Logger info:'expected a string propertyValue in drop'.
+	    ^ self
+	].
+	dropType := #link.
     ] ifFalse:[ (dropType == #DndRawData) ifTrue:[
-        dropType := #rawData.
+	dropType := #rawData.
     ] ifFalse:[
-        Logger info:'unsupported dropType: %1 data: %2 ' with:dropType with:dropValue.
-        dropType := #unknown.
+	Logger info:'unsupported dropType: %1 data: %2 ' with:dropType with:dropValue.
+	dropType := #unknown.
     ]]]]]]].
 
     sensor := targetView sensor.
     "not posted, if there is no sensor ..."
     sensor notNil ifTrue:[
-        sensor dropMessage:dropType data:dropValue view:targetView position:nil handle:nil
+	sensor dropMessage:dropType data:dropValue view:targetView position:nil handle:nil
     ].
 
     "Created: / 04-04-1997 / 17:59:37 / cg"
@@ -3762,11 +3762,11 @@
     "/ see, if the display supports the DND protocol ...
     "/
     (self atomIDOf:#DndProtocol) notNil ifTrue:[
-        ^ self
-            dndDrop:aCollectionOfDropObjects
-            inWindowID:destinationId
-            position:destinationPoint
-            rootPosition:rootPoint
+	^ self
+	    dndDrop:aCollectionOfDropObjects
+	    inWindowID:destinationId
+	    position:destinationPoint
+	    rootPosition:rootPoint
     ].
 
     "/ add more drag&drop protocols here.
@@ -3822,19 +3822,19 @@
 
     xdndAwareAtom := self atomIDOf:#XdndAware create:false.
     xdndAwareAtom isNil ifTrue:[
-        "/ mh - window manager is not DND capable
-        Logger info:'display does not support Xdnd'.
-        ^ self.
+	"/ mh - window manager is not DND capable
+	Logger info:'display does not support Xdnd'.
+	^ self.
     ].
 
     "/ protocol version 3 is from 1998...
     "/ protocol version 4 from 1999 added root-window drop support...
     "/ protocol version 5 from 2002 added some info to XdndFinished...
     self
-        setProperty:xdndAwareAtom
-        type:#ATOM
-        value:3
-        for:aWindowOrWindowID
+	setProperty:xdndAwareAtom
+	type:#ATOM
+	value:3
+	for:aWindowOrWindowID
 
     "
      Display setXdndAwarePropertyFor:Transcript
@@ -3867,7 +3867,7 @@
     "handle a xdnd drag&drop protocol message.
      Ignored for now"
 
-    |sensor property dropType dropValue propertyType sourceXid protocolVersion supportedTypes hasExtensionTypes|
+    |sourceXid protocolVersion supportedTypes hasExtensionTypes|
 
     "data.l[0] contains the XID of the source window.
      data.l[1]:
@@ -3892,7 +3892,7 @@
            withArguments:{ targetView. sourceXid. protocolVersion. supportedTypes. hasExtensionTypes}.
 
     "Created: / 05-08-2019 / 19:44:28 / Stefan Vogel"
-    "Modified (comment): / 05-08-2019 / 21:18:45 / Stefan Vogel"
+    "Modified (format): / 06-08-2019 / 11:31:53 / Stefan Vogel"
 !
 
 xdndLeave:data view:targetView
@@ -3946,11 +3946,11 @@
     <context: #return>
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
 %{
 
@@ -3962,35 +3962,35 @@
      && __isExternalAddress(aDrawableId)
      && __bothSmallInteger(x0, y0)
      && __bothSmallInteger(x1, y1)) {
-        Display *dpy = myDpy;
-        int ix0, iy0, ix1, iy1;
-        gc = __GCVal(aGCId);
-        win = __WindowVal(aDrawableId);
-
-        ix0 = __intVal(x0);
-        iy0 = __intVal(y0);
-        ix1 = __intVal(x1);
-        iy1 = __intVal(y1);
-
-        /* attention: coordinates in X are shorts and wrap; clamp here. */
-        if (ix0 > 0x7FFF) ix0 = 0x7FFF;
-        else if (ix0 < -0x8000) ix0 = -0x8000;
-        if (iy0 > 0x7FFF) iy0 = 0x7FFF;
-        else if (iy0 < -0x8000) iy0 = -0x8000;
-        if (ix1 > 0x7FFF) ix1 = 0x7FFF;
-        else if (ix1 < -0x8000) ix1 = -0x8000;
-        if (iy1 > 0x7FFF) iy1 = 0x7FFF;
-        else if (iy1 < -0x8000) iy1 = -0x8000;
-
-        ENTER_XLIB();
-        if ((ix0 == ix1) && (iy0 == iy1)) {
-            /* little bit shorter X-lib message (better with slow connections...) */
-            XDrawPoint(dpy, win, gc, ix0, iy0);
-        } else {
-            XDrawLine(dpy, win, gc, ix0, iy0, ix1, iy1);
-        }
-        LEAVE_XLIB();
-        RETURN ( self );
+	Display *dpy = myDpy;
+	int ix0, iy0, ix1, iy1;
+	gc = __GCVal(aGCId);
+	win = __WindowVal(aDrawableId);
+
+	ix0 = __intVal(x0);
+	iy0 = __intVal(y0);
+	ix1 = __intVal(x1);
+	iy1 = __intVal(y1);
+
+	/* attention: coordinates in X are shorts and wrap; clamp here. */
+	if (ix0 > 0x7FFF) ix0 = 0x7FFF;
+	else if (ix0 < -0x8000) ix0 = -0x8000;
+	if (iy0 > 0x7FFF) iy0 = 0x7FFF;
+	else if (iy0 < -0x8000) iy0 = -0x8000;
+	if (ix1 > 0x7FFF) ix1 = 0x7FFF;
+	else if (ix1 < -0x8000) ix1 = -0x8000;
+	if (iy1 > 0x7FFF) iy1 = 0x7FFF;
+	else if (iy1 < -0x8000) iy1 = -0x8000;
+
+	ENTER_XLIB();
+	if ((ix0 == ix1) && (iy0 == iy1)) {
+	    /* little bit shorter X-lib message (better with slow connections...) */
+	    XDrawPoint(dpy, win, gc, ix0, iy0);
+	} else {
+	    XDrawLine(dpy, win, gc, ix0, iy0, ix1, iy1);
+	}
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     "badGC, badDrawable or coordinates not integer"
@@ -4004,11 +4004,11 @@
     <context: #return>
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
 %{
 
@@ -4019,19 +4019,19 @@
      && __isExternalAddress(aDrawableId)
      && __bothSmallInteger(x, y)
      && __bothSmallInteger(width, height)) {
-        w = __intVal(width);
-        h = __intVal(height);
-        /*
-         * need this check here: some servers simply dump core with bad args
-         */
-        if ((w >= 0) && (h >= 0)) {
-            ENTER_XLIB();
-            XFillRectangle(myDpy,
-                           __DrawableVal(aDrawableId), __GCVal(aGCId),
-                           __intVal(x), __intVal(y), w, h);
-            LEAVE_XLIB();
-        }
-        RETURN ( self );
+	w = __intVal(width);
+	h = __intVal(height);
+	/*
+	 * need this check here: some servers simply dump core with bad args
+	 */
+	if ((w >= 0) && (h >= 0)) {
+	    ENTER_XLIB();
+	    XFillRectangle(myDpy,
+			   __DrawableVal(aDrawableId), __GCVal(aGCId),
+			   __intVal(x), __intVal(y), w, h);
+	    LEAVE_XLIB();
+	}
+	RETURN ( self );
     }
 %}.
     "badGC, badDrawable or coordinates not integer"
@@ -4044,11 +4044,11 @@
     <context: #return>
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
 %{
 
@@ -4058,19 +4058,19 @@
      && __isExternalAddress(aDrawableId)
      && __bothSmallInteger(x, y)
      && __bothSmallInteger(width, height)) {
-        w = __intVal(width);
-        h = __intVal(height);
-        /*
-         * need this check here: some servers simply dump core with bad args
-         */
-        if ((w >= 0) && (h >= 0)) {
-            ENTER_XLIB();
-            XClearArea(myDpy,
-                           __DrawableVal(aDrawableId),
-                           __intVal(x), __intVal(y), w, h, 0);
-            LEAVE_XLIB();
-        }
-        RETURN ( self );
+	w = __intVal(width);
+	h = __intVal(height);
+	/*
+	 * need this check here: some servers simply dump core with bad args
+	 */
+	if ((w >= 0) && (h >= 0)) {
+	    ENTER_XLIB();
+	    XClearArea(myDpy,
+			   __DrawableVal(aDrawableId),
+			   __intVal(x), __intVal(y), w, h, 0);
+	    LEAVE_XLIB();
+	}
+	RETURN ( self );
     }
 %}.
     "badGC, badDrawable or coordinates not integer"
@@ -4086,11 +4086,11 @@
     <context: #return>
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
 %{
 
@@ -4104,22 +4104,22 @@
      && __bothSmallInteger(w, h)
      && __bothSmallInteger(srcX, srcY)
      && __bothSmallInteger(dstX, dstY)) {
-        int _sX, _sY, _w, _h, _dX, _dY;
-
-        _sX = __intVal(srcX);
-        _sY = __intVal(srcY);
-        _w = __intVal(w);
-        _h = __intVal(h);
-        _dX = __intVal(dstX);
-        _dY = __intVal(dstY);
-
-        gc = __GCVal(dstGCId);
-        source = __DrawableVal(sourceId);
-        dest =   __DrawableVal(destId);
-        ENTER_XLIB();
-        XCopyArea(myDpy, source, dest, gc, _sX, _sY, _w, _h, _dX, _dY);
-        LEAVE_XLIB();
-        RETURN ( self );
+	int _sX, _sY, _w, _h, _dX, _dY;
+
+	_sX = __intVal(srcX);
+	_sY = __intVal(srcY);
+	_w = __intVal(w);
+	_h = __intVal(h);
+	_dX = __intVal(dstX);
+	_dY = __intVal(dstY);
+
+	gc = __GCVal(dstGCId);
+	source = __DrawableVal(sourceId);
+	dest =   __DrawableVal(destId);
+	ENTER_XLIB();
+	XCopyArea(myDpy, source, dest, gc, _sX, _sY, _w, _h, _dX, _dY);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     "badGC, bad sourceDrawableId or destDrawableID
@@ -4138,11 +4138,11 @@
     <context: #return>
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
 %{
 
@@ -4156,20 +4156,20 @@
      && __bothSmallInteger(w, h)
      && __bothSmallInteger(srcX, srcY)
      && __bothSmallInteger(dstX, dstY)) {
-        Display *dpy = myDpy;
-
-        gc = __GCVal(dstGCId);
-        source = __DrawableVal(sourceId);
-        dest =   __DrawableVal(destId);
-        ENTER_XLIB();
-        XSetGraphicsExposures(dpy, gc, 0);
-        XCopyArea(dpy, source, dest, gc,
-                                __intVal(srcX), __intVal(srcY),
-                                __intVal(w), __intVal(h),
-                                __intVal(dstX), __intVal(dstY));
-        XSetGraphicsExposures(dpy, gc, 1);
-        LEAVE_XLIB();
-        RETURN ( self );
+	Display *dpy = myDpy;
+
+	gc = __GCVal(dstGCId);
+	source = __DrawableVal(sourceId);
+	dest =   __DrawableVal(destId);
+	ENTER_XLIB();
+	XSetGraphicsExposures(dpy, gc, 0);
+	XCopyArea(dpy, source, dest, gc,
+				__intVal(srcX), __intVal(srcY),
+				__intVal(w), __intVal(h),
+				__intVal(dstX), __intVal(dstY));
+	XSetGraphicsExposures(dpy, gc, 1);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     "badGC, bad sourceDrawableId or destDrawableID
@@ -4188,11 +4188,11 @@
     <context: #return>
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
 %{
 
@@ -4206,16 +4206,16 @@
      && __bothSmallInteger(w, h)
      && __bothSmallInteger(srcX, srcY)
      && __bothSmallInteger(dstX, dstY)) {
-        gc = __GCVal(dstGCId);
-        source = __DrawableVal(sourceId);
-        dest =   __DrawableVal(destId);
-        ENTER_XLIB();
-        XCopyPlane(myDpy, source, dest, gc,
-                                 __intVal(srcX), __intVal(srcY),
-                                 __intVal(w), __intVal(h),
-                                 __intVal(dstX), __intVal(dstY), 1);
-        LEAVE_XLIB();
-        RETURN ( self );
+	gc = __GCVal(dstGCId);
+	source = __DrawableVal(sourceId);
+	dest =   __DrawableVal(destId);
+	ENTER_XLIB();
+	XCopyPlane(myDpy, source, dest, gc,
+				 __intVal(srcX), __intVal(srcY),
+				 __intVal(w), __intVal(h),
+				 __intVal(dstX), __intVal(dstY), 1);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     "badGC, bad sourceDrawableId or destDrawableID
@@ -4235,11 +4235,11 @@
     <context: #return>
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
 %{
 
@@ -4253,20 +4253,20 @@
      && __bothSmallInteger(w, h)
      && __bothSmallInteger(srcX, srcY)
      && __bothSmallInteger(dstX, dstY)) {
-        Display *dpy = myDpy;
-
-        gc = __GCVal(dstGCId);
-        source = __DrawableVal(sourceId);
-        dest =   __DrawableVal(destId);
-        ENTER_XLIB();
-        XSetGraphicsExposures(dpy, gc, 0);
-        XCopyPlane(dpy, source, dest, gc,
-                                 __intVal(srcX), __intVal(srcY),
-                                 __intVal(w), __intVal(h),
-                                 __intVal(dstX), __intVal(dstY), 1);
-        XSetGraphicsExposures(dpy, gc, 1);
-        LEAVE_XLIB();
-        RETURN ( self );
+	Display *dpy = myDpy;
+
+	gc = __GCVal(dstGCId);
+	source = __DrawableVal(sourceId);
+	dest =   __DrawableVal(destId);
+	ENTER_XLIB();
+	XSetGraphicsExposures(dpy, gc, 0);
+	XCopyPlane(dpy, source, dest, gc,
+				 __intVal(srcX), __intVal(srcY),
+				 __intVal(w), __intVal(h),
+				 __intVal(dstX), __intVal(dstY), 1);
+	XSetGraphicsExposures(dpy, gc, 1);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     "badGC, bad sourceDrawableId or destDrawableID
@@ -4282,11 +4282,11 @@
     <context: #return>
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
 %{
 
@@ -4296,23 +4296,23 @@
     double f;
 
     if (__isSmallInteger(startAngle))
-        angle1 = __intVal(startAngle) * 64;
+	angle1 = __intVal(startAngle) * 64;
     else if (__isFloat(startAngle)) {
-        f = __floatVal(startAngle);
-        angle1 = f * 64;
+	f = __floatVal(startAngle);
+	angle1 = f * 64;
     } else if (__isShortFloat(startAngle)) {
-        f = __shortFloatVal(startAngle);
-        angle1 = f * 64;
+	f = __shortFloatVal(startAngle);
+	angle1 = f * 64;
     } else goto bad;
 
     if (__isSmallInteger(angle))
-        angle2 = __intVal(angle) * 64;
+	angle2 = __intVal(angle) * 64;
     else if (__isFloat(angle)) {
-        f = __floatVal(angle);
-        angle2 = f * 64;
+	f = __floatVal(angle);
+	angle2 = f * 64;
     } else if (__isShortFloat(angle)) {
-        f = __shortFloatVal(angle);
-        angle2 = f * 64;
+	f = __shortFloatVal(angle);
+	angle2 = f * 64;
     } else goto bad;
 
     if (ISCONNECTED
@@ -4320,20 +4320,20 @@
      && __isExternalAddress(aDrawableId)
      && __bothSmallInteger(x, y)
      && __bothSmallInteger(width, height)) {
-        win = __WindowVal(aDrawableId);
-        gc = __GCVal(aGCId);
-        w = __intVal(width);
-        h = __intVal(height);
-        /*
-         * need this check here: some servers simply dump core with bad args
-         */
-        if ((w >= 0) && (h >= 0) && (angle1 >= 0) && (angle2 >= 0)) {
-            ENTER_XLIB();
-            XDrawArc(myDpy, win, gc, __intVal(x), __intVal(y),
-                                   w, h, angle1, angle2);
-            LEAVE_XLIB();
-        }
-        RETURN ( self );
+	win = __WindowVal(aDrawableId);
+	gc = __GCVal(aGCId);
+	w = __intVal(width);
+	h = __intVal(height);
+	/*
+	 * need this check here: some servers simply dump core with bad args
+	 */
+	if ((w >= 0) && (h >= 0) && (angle1 >= 0) && (angle2 >= 0)) {
+	    ENTER_XLIB();
+	    XDrawArc(myDpy, win, gc, __intVal(x), __intVal(y),
+				   w, h, angle1, angle2);
+	    LEAVE_XLIB();
+	}
+	RETURN ( self );
     }
     bad: ;
 %}.
@@ -4348,44 +4348,44 @@
 
 %{  /* NOCONTEXT */
     if (__INST(operationsUntilFlush) == nil) {
-        GC gc;
-        Window win;
-
-        if (ISCONNECTED
-         && __isExternalAddress(aGCId)
-         && __isExternalAddress(aDrawableId)
-         && __bothSmallInteger(x0, y0)
-         && __bothSmallInteger(x1, y1)) {
-            Display *dpy = myDpy;
-            int ix0, iy0, ix1, iy1;
-            gc = __GCVal(aGCId);
-            win = __WindowVal(aDrawableId);
-
-            ix0 = __intVal(x0);
-            iy0 = __intVal(y0);
-            ix1 = __intVal(x1);
-            iy1 = __intVal(y1);
-
-            /* attention: coordinates in X are shorts and wrap; clamp here. */
-            if (ix0 > 0x7FFF) ix0 = 0x7FFF;
-            else if (ix0 < -0x8000) ix0 = -0x8000;
-            if (iy0 > 0x7FFF) iy0 = 0x7FFF;
-            else if (iy0 < -0x8000) iy0 = -0x8000;
-            if (ix1 > 0x7FFF) ix1 = 0x7FFF;
-            else if (ix1 < -0x8000) ix1 = -0x8000;
-            if (iy1 > 0x7FFF) iy1 = 0x7FFF;
-            else if (iy1 < -0x8000) iy1 = -0x8000;
-
-            ENTER_XLIB();
-            if ((ix0 == ix1) && (iy0 == iy1)) {
-                /* little bit shorter X-lib message (better with slow connections...) */
-                XDrawPoint(dpy, win, gc, ix0, iy0);
-            } else {
-                XDrawLine(dpy, win, gc, ix0, iy0, ix1, iy1);
-            }
-            LEAVE_XLIB();
-            RETURN ( self );
-        }
+	GC gc;
+	Window win;
+
+	if (ISCONNECTED
+	 && __isExternalAddress(aGCId)
+	 && __isExternalAddress(aDrawableId)
+	 && __bothSmallInteger(x0, y0)
+	 && __bothSmallInteger(x1, y1)) {
+	    Display *dpy = myDpy;
+	    int ix0, iy0, ix1, iy1;
+	    gc = __GCVal(aGCId);
+	    win = __WindowVal(aDrawableId);
+
+	    ix0 = __intVal(x0);
+	    iy0 = __intVal(y0);
+	    ix1 = __intVal(x1);
+	    iy1 = __intVal(y1);
+
+	    /* attention: coordinates in X are shorts and wrap; clamp here. */
+	    if (ix0 > 0x7FFF) ix0 = 0x7FFF;
+	    else if (ix0 < -0x8000) ix0 = -0x8000;
+	    if (iy0 > 0x7FFF) iy0 = 0x7FFF;
+	    else if (iy0 < -0x8000) iy0 = -0x8000;
+	    if (ix1 > 0x7FFF) ix1 = 0x7FFF;
+	    else if (ix1 < -0x8000) ix1 = -0x8000;
+	    if (iy1 > 0x7FFF) iy1 = 0x7FFF;
+	    else if (iy1 < -0x8000) iy1 = -0x8000;
+
+	    ENTER_XLIB();
+	    if ((ix0 == ix1) && (iy0 == iy1)) {
+		/* little bit shorter X-lib message (better with slow connections...) */
+		XDrawPoint(dpy, win, gc, ix0, iy0);
+	    } else {
+		XDrawLine(dpy, win, gc, ix0, iy0, ix1, iy1);
+	    }
+	    LEAVE_XLIB();
+	    RETURN ( self );
+	}
     }
 %}.
     self _displayLineFromX:x0 y:y0 toX:x1 y:y1 in:aDrawableId with:aGCId
@@ -4401,15 +4401,15 @@
     |noY|
 
     (noY := yValues size) < 2 ifTrue:[
-        ^ self
+	^ self
     ].
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
 %{
     OBJ      yA, t;
@@ -4425,109 +4425,109 @@
     if (ISCONNECTED
      && __isExternalAddress(aGCId)
      && __isExternalAddress(aDrawableId) ) {
-        gc = __GCVal(aGCId);
-        win = __WindowVal(aDrawableId);
-
-        if( __isSmallInteger(scaleY) )
-            sY = (float) __intVal( scaleY );
-        else if (__isFloat(scaleY))
-            sY = __floatVal( scaleY );
-        else if (__isShortFloat(scaleY))
-            sY = __shortFloatVal( scaleY );
-        else {
-            t = __SSEND0(scaleY, @symbol(asFloat), 0);
-            if (! __isFloat(t)) goto fail;
-            sY = __floatVal( t );
-        }
-
-        if( __isSmallInteger(transY) )
-            tY = (float) __intVal( transY );
-        else if (__isFloat(transY))
-            tY = __floatVal( transY );
-        else if (__isShortFloat(transY))
-            tY = __shortFloatVal( transY );
-        else {
-            t = __SSEND0(transY, @symbol(asFloat), 0);
-            if (! __isFloat(t)) goto fail;
-            tY = __floatVal( t );
-        }
-
-        if( __isSmallInteger(startX) )
-            x = (float) __intVal( startX );
-        else if (__isFloat(startX))
-            x = __floatVal( startX );
-        else if (__isShortFloat(startX))
-            x = __shortFloatVal( startX );
-        else {
-            t = __SSEND0(startX, @symbol(asFloat), 0);
-            if (! __isFloat(t)) goto fail;
-            x = __floatVal( t );
-        }
-
-        if( __isSmallInteger(stepX) )
-            step = (float) __intVal( stepX );
-        else if (__isFloat(stepX))
-            step = __floatVal( stepX );
-        else if (__isShortFloat(stepX))
-            step = __shortFloatVal( stepX );
-        else {
-            t = __SSEND0(stepX, @symbol(asFloat), 0);
-            if (! __isFloat(t)) goto fail;
-            step = __floatVal( t );
-        }
-
-        num = __intVal( noY );
-        if( num > 200 ) {
-            if( ! (points = (XPoint *) malloc ( sizeof(XPoint) * num )) )
-                goto fail;
-            mustFree = 1;
-        } else {
-            points = qPoints;
-        }
-        for( i = 0; i < num; ++i ) {
-            int px, py;
-
-            yA  = __AT_(yValues, __MKSMALLINT(i+1) );
-
-            if( __isFloat(yA) )
-                y = __floatVal( yA );
-            else if( __isSmallInteger(yA) )
-                y = (float) __intVal( yA );
-            else if( __isShortFloat( yA) )
-                y = __shortFloatVal( yA );
-            else {
-                t = __SSEND0(yA, @symbol(asFloat), 0);
-                if (! __isFloat(t)) goto fail;
-                y = __floatVal( t );
-            }
-
-            px = (int) (x + 0.5);
-            py = (int) ((y * sY) + tY + 0.5);
-
-            /* attention: coordinates in X are shorts and wrap; clamp here. */
-            if (px > 0x7FFF) px = 0x7FFF;
-            else if (px < -0x8000) px = -0x8000;
-            if (py > 0x7FFF) py = 0x7FFF;
-            else if (py < -0x8000) py = -0x8000;
-
-            points[i].x = px;
-            points[i].y = py;
-            x = x + step;
-        }
-
-        ENTER_XLIB();
-        XDrawLines(myDpy, win, gc, points, num, CoordModeOrigin);
-        LEAVE_XLIB();
-
-        if( mustFree ) {
-            free( points );
-        }
-        RETURN ( self );
+	gc = __GCVal(aGCId);
+	win = __WindowVal(aDrawableId);
+
+	if( __isSmallInteger(scaleY) )
+	    sY = (float) __intVal( scaleY );
+	else if (__isFloat(scaleY))
+	    sY = __floatVal( scaleY );
+	else if (__isShortFloat(scaleY))
+	    sY = __shortFloatVal( scaleY );
+	else {
+	    t = __SSEND0(scaleY, @symbol(asFloat), 0);
+	    if (! __isFloat(t)) goto fail;
+	    sY = __floatVal( t );
+	}
+
+	if( __isSmallInteger(transY) )
+	    tY = (float) __intVal( transY );
+	else if (__isFloat(transY))
+	    tY = __floatVal( transY );
+	else if (__isShortFloat(transY))
+	    tY = __shortFloatVal( transY );
+	else {
+	    t = __SSEND0(transY, @symbol(asFloat), 0);
+	    if (! __isFloat(t)) goto fail;
+	    tY = __floatVal( t );
+	}
+
+	if( __isSmallInteger(startX) )
+	    x = (float) __intVal( startX );
+	else if (__isFloat(startX))
+	    x = __floatVal( startX );
+	else if (__isShortFloat(startX))
+	    x = __shortFloatVal( startX );
+	else {
+	    t = __SSEND0(startX, @symbol(asFloat), 0);
+	    if (! __isFloat(t)) goto fail;
+	    x = __floatVal( t );
+	}
+
+	if( __isSmallInteger(stepX) )
+	    step = (float) __intVal( stepX );
+	else if (__isFloat(stepX))
+	    step = __floatVal( stepX );
+	else if (__isShortFloat(stepX))
+	    step = __shortFloatVal( stepX );
+	else {
+	    t = __SSEND0(stepX, @symbol(asFloat), 0);
+	    if (! __isFloat(t)) goto fail;
+	    step = __floatVal( t );
+	}
+
+	num = __intVal( noY );
+	if( num > 200 ) {
+	    if( ! (points = (XPoint *) malloc ( sizeof(XPoint) * num )) )
+		goto fail;
+	    mustFree = 1;
+	} else {
+	    points = qPoints;
+	}
+	for( i = 0; i < num; ++i ) {
+	    int px, py;
+
+	    yA  = __AT_(yValues, __MKSMALLINT(i+1) );
+
+	    if( __isFloat(yA) )
+		y = __floatVal( yA );
+	    else if( __isSmallInteger(yA) )
+		y = (float) __intVal( yA );
+	    else if( __isShortFloat( yA) )
+		y = __shortFloatVal( yA );
+	    else {
+		t = __SSEND0(yA, @symbol(asFloat), 0);
+		if (! __isFloat(t)) goto fail;
+		y = __floatVal( t );
+	    }
+
+	    px = (int) (x + 0.5);
+	    py = (int) ((y * sY) + tY + 0.5);
+
+	    /* attention: coordinates in X are shorts and wrap; clamp here. */
+	    if (px > 0x7FFF) px = 0x7FFF;
+	    else if (px < -0x8000) px = -0x8000;
+	    if (py > 0x7FFF) py = 0x7FFF;
+	    else if (py < -0x8000) py = -0x8000;
+
+	    points[i].x = px;
+	    points[i].y = py;
+	    x = x + step;
+	}
+
+	ENTER_XLIB();
+	XDrawLines(myDpy, win, gc, points, num, CoordModeOrigin);
+	LEAVE_XLIB();
+
+	if( mustFree ) {
+	    free( points );
+	}
+	RETURN ( self );
     }
 
 fail:
     if( mustFree )
-        free( points );
+	free( points );
 %}.
     ^ super displayLinesFromX:startX step:stepX yValues:yValues scaleY:scaleY transY:transY in:aDrawableId with:aGCId
 
@@ -4540,11 +4540,11 @@
     <context: #return>
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
 %{
 
@@ -4555,20 +4555,20 @@
      && __isExternalAddress(aGCId)
      && __isExternalAddress(aDrawableId)
      && __bothSmallInteger(x, y)) {
-        int px, py;
-
-        gc = __GCVal(aGCId);
-        win = __WindowVal(aDrawableId);
-        px = __intVal(x);
-        py = __intVal(y);
-        if (px > 0x7FFF) px = 0x7FFF;
-        else if (px < -0x8000) px = -0x8000;
-        if (py > 0x7FFF) py = 0x7FFF;
-        else if (py < -0x8000) py = -0x8000;
-        ENTER_XLIB();
-        XDrawPoint(myDpy, win, gc, px, py);
-        LEAVE_XLIB();
-        RETURN ( self );
+	int px, py;
+
+	gc = __GCVal(aGCId);
+	win = __WindowVal(aDrawableId);
+	px = __intVal(x);
+	py = __intVal(y);
+	if (px > 0x7FFF) px = 0x7FFF;
+	else if (px < -0x8000) px = -0x8000;
+	if (py > 0x7FFF) py = 0x7FFF;
+	else if (py < -0x8000) py = -0x8000;
+	ENTER_XLIB();
+	XDrawPoint(myDpy, win, gc, px, py);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     "badGC, badDrawable or x/y not integer"
@@ -4588,11 +4588,11 @@
     (n := xColl size) == yColl size ifFalse:[self error].
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
 %{
 
@@ -4602,29 +4602,29 @@
     if (ISCONNECTED
      && __isExternalAddress(aGCId)
      && __isExternalAddress(aDrawableId)) {
-        int _n = __intVal(n);
-        int i;
-        gc = __GCVal(aGCId);
-        win = __WindowVal(aDrawableId);
-
-        ENTER_XLIB();
-        for (i=0; i<_n; i++) {
-            int px, py;
-            OBJ x = __ArrayInstPtr(xColl)->a_element[i];
-            OBJ y = __ArrayInstPtr(yColl)->a_element[i];
-
-            if (!__bothSmallInteger(x,y)) goto fail;
-
-            px = __intVal(x);
-            py = __intVal(y);
-            if (px > 0x7FFF) px = 0x7FFF;
-            else if (px < -0x8000) px = -0x8000;
-            if (py > 0x7FFF) py = 0x7FFF;
-            else if (py < -0x8000) py = -0x8000;
-            XDrawPoint(myDpy, win, gc, px, py);
-        }
-        LEAVE_XLIB();
-        RETURN ( self );
+	int _n = __intVal(n);
+	int i;
+	gc = __GCVal(aGCId);
+	win = __WindowVal(aDrawableId);
+
+	ENTER_XLIB();
+	for (i=0; i<_n; i++) {
+	    int px, py;
+	    OBJ x = __ArrayInstPtr(xColl)->a_element[i];
+	    OBJ y = __ArrayInstPtr(yColl)->a_element[i];
+
+	    if (!__bothSmallInteger(x,y)) goto fail;
+
+	    px = __intVal(x);
+	    py = __intVal(y);
+	    if (px > 0x7FFF) px = 0x7FFF;
+	    else if (px < -0x8000) px = -0x8000;
+	    if (py > 0x7FFF) py = 0x7FFF;
+	    else if (py < -0x8000) py = -0x8000;
+	    XDrawPoint(myDpy, win, gc, px, py);
+	}
+	LEAVE_XLIB();
+	RETURN ( self );
     }
     fail: ;
 %}.
@@ -4644,11 +4644,11 @@
     |numberOfPoints newPoints|
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
     numberOfPoints := aPolygon size.
 %{
@@ -4664,53 +4664,53 @@
      && __isExternalAddress(aGCId)
      && __isExternalAddress(aDrawableId)
      && __isSmallInteger(numberOfPoints)) {
-        gc = __GCVal(aGCId);
-        win = __WindowVal(aDrawableId);
-        num = __intVal(numberOfPoints);
-        /*
-         * avoid a (slow) malloc, if the number of points is small
-         */
-        if (num > 100) {
-            points = (XPoint *)malloc(sizeof(XPoint) * num);
-            if (! points) goto fail;
-            mustFree = 1;
-        } else
-            points = qPoints;
-
-        for (i=0; i<num; i++) {
-            int px, py;
-
-            point = __AT_(aPolygon, __MKSMALLINT(i+1));
-            if (! __isPoint(point)) goto fail;
-            x = _point_X(point);
-            y = _point_Y(point);
-            if (! __bothSmallInteger(x, y))
-                goto fail;
-
-            px = __intVal(x);
-            py = __intVal(y);
-
-            /* attention: coordinates in X are shorts and wrap; clamp here. */
-            if (px > 0x7FFF) px = 0x7FFF;
-            else if (px < -0x8000) px = -0x8000;
-            if (py > 0x7FFF) py = 0x7FFF;
-            else if (py < -0x8000) py = -0x8000;
-
-            points[i].x = px;
-            points[i].y = py;
-        }
-
-        ENTER_XLIB();
-        XDrawLines(myDpy, win, gc, points, num, CoordModeOrigin);
-        LEAVE_XLIB();
-
-        if (mustFree)
-            free(points);
-        RETURN ( self );
+	gc = __GCVal(aGCId);
+	win = __WindowVal(aDrawableId);
+	num = __intVal(numberOfPoints);
+	/*
+	 * avoid a (slow) malloc, if the number of points is small
+	 */
+	if (num > 100) {
+	    points = (XPoint *)malloc(sizeof(XPoint) * num);
+	    if (! points) goto fail;
+	    mustFree = 1;
+	} else
+	    points = qPoints;
+
+	for (i=0; i<num; i++) {
+	    int px, py;
+
+	    point = __AT_(aPolygon, __MKSMALLINT(i+1));
+	    if (! __isPoint(point)) goto fail;
+	    x = _point_X(point);
+	    y = _point_Y(point);
+	    if (! __bothSmallInteger(x, y))
+		goto fail;
+
+	    px = __intVal(x);
+	    py = __intVal(y);
+
+	    /* attention: coordinates in X are shorts and wrap; clamp here. */
+	    if (px > 0x7FFF) px = 0x7FFF;
+	    else if (px < -0x8000) px = -0x8000;
+	    if (py > 0x7FFF) py = 0x7FFF;
+	    else if (py < -0x8000) py = -0x8000;
+
+	    points[i].x = px;
+	    points[i].y = py;
+	}
+
+	ENTER_XLIB();
+	XDrawLines(myDpy, win, gc, points, num, CoordModeOrigin);
+	LEAVE_XLIB();
+
+	if (mustFree)
+	    free(points);
+	RETURN ( self );
     }
 fail: ;
     if (mustFree)
-        free(points);
+	free(points);
 %}.
     "badGC, badDrawable or coordinates not integer"
     self primitiveFailedOrClosedConnection
@@ -4722,11 +4722,11 @@
     <context: #return>
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
 %{
 
@@ -4739,31 +4739,31 @@
      && __isExternalAddress(aDrawableId)
      && __bothSmallInteger(x, y)
      && __bothSmallInteger(width, height)) {
-        int px, py;
-
-        gc = __GCVal(aGCId);
-        win = __WindowVal(aDrawableId);
-        w = __intVal(width);
-        h = __intVal(height);
-
-        /*
-         * need this check here: some servers simply dump core with bad args
-         */
-        if ((w >= 0) && (h >= 0)) {
-            px = __intVal(x);
-            py = __intVal(y);
-
-            /* attention: coordinates in X are shorts and wrap; clamp here. */
-            if (px > 0x7FFF) px = 0x7FFF;
-            else if (px < -0x8000) px = -0x8000;
-            if (py > 0x7FFF) py = 0x7FFF;
-            else if (py < -0x8000) py = -0x8000;
-
-            ENTER_XLIB();
-            XDrawRectangle(myDpy, win, gc, px, py, w, h);
-            LEAVE_XLIB();
-        }
-        RETURN ( self );
+	int px, py;
+
+	gc = __GCVal(aGCId);
+	win = __WindowVal(aDrawableId);
+	w = __intVal(width);
+	h = __intVal(height);
+
+	/*
+	 * need this check here: some servers simply dump core with bad args
+	 */
+	if ((w >= 0) && (h >= 0)) {
+	    px = __intVal(x);
+	    py = __intVal(y);
+
+	    /* attention: coordinates in X are shorts and wrap; clamp here. */
+	    if (px > 0x7FFF) px = 0x7FFF;
+	    else if (px < -0x8000) px = -0x8000;
+	    if (py > 0x7FFF) py = 0x7FFF;
+	    else if (py < -0x8000) py = -0x8000;
+
+	    ENTER_XLIB();
+	    XDrawRectangle(myDpy, win, gc, px, py, w, h);
+	    LEAVE_XLIB();
+	}
+	RETURN ( self );
     }
 %}.
     "badGC, badDrawable or coordinates not integer"
@@ -4778,11 +4778,11 @@
     <context: #return>
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
 %{
 
@@ -4800,173 +4800,173 @@
      && __isNonNilObject(aString)
      && __bothSmallInteger(index1, index2)
      && __bothSmallInteger(x, y)) {
-        int lMax = __intVal(@global(MaxStringLength));
-        Display *dpy = myDpy;
-        gc = __GCVal(aGCId);
-        win = __WindowVal(aDrawableId);
-
-        i1 = __intVal(index1) - 1;
-        if (i1 >= 0) {
-            OBJ cls;
-
-            i2 = __intVal(index2) - 1;
-            if (i2 < i1) {
-                RETURN (self);
-            }
-            cp = (char *) __stringVal(aString);
-            l = i2 - i1 + 1;
-
-            if (__isStringLike(aString)) {
-                n = __stringSize(aString);
-                if (i2 < n) {
-                    cp += i1;
-                    if (l > lMax) l = lMax;
-                    ENTER_XLIB();
-                    if (opaque == true)
-                        XDrawImageString(dpy, win, gc, __intVal(x), __intVal(y), cp, l);
-                    else
-                        XDrawString(dpy, win, gc, __intVal(x), __intVal(y), cp, l);
-                    LEAVE_XLIB();
-                    RETURN ( self );
-                }
-            }
-
-            cls = __qClass(aString);
-            nInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
-            cp += nInstBytes;
-
-            if (__isBytes(aString)) {
-                n = __byteArraySize(aString) - nInstBytes - 1;
-
-                if (i2 < n) {
-                    cp += i1;
-                    if (l > lMax) l = lMax;
-                    ENTER_XLIB();
-                    if (opaque == true)
-                        XDrawImageString(dpy, win, gc, __intVal(x), __intVal(y), cp, l);
-                    else
-                        XDrawString(dpy, win, gc, __intVal(x), __intVal(y), cp, l);
-                    LEAVE_XLIB();
-                    RETURN ( self );
-                }
-            }
-
-            /* TWOBYTESTRINGS */
-            if (__isWords(aString)) {
-                n = (__byteArraySize(aString) - nInstBytes) / 2;
-                if (i2 < n) {
-                    union {
-                        char b[2];
-                        unsigned short s;
-                    } u;
-                    int i;
-                    XChar2b *cp2 = (XChar2b *)0;
-                    int mustFree = 0;
-
-                    cp += (i1 * 2);
-                    if (l > lMax) l = lMax;
+	int lMax = __intVal(@global(MaxStringLength));
+	Display *dpy = myDpy;
+	gc = __GCVal(aGCId);
+	win = __WindowVal(aDrawableId);
+
+	i1 = __intVal(index1) - 1;
+	if (i1 >= 0) {
+	    OBJ cls;
+
+	    i2 = __intVal(index2) - 1;
+	    if (i2 < i1) {
+		RETURN (self);
+	    }
+	    cp = (char *) __stringVal(aString);
+	    l = i2 - i1 + 1;
+
+	    if (__isStringLike(aString)) {
+		n = __stringSize(aString);
+		if (i2 < n) {
+		    cp += i1;
+		    if (l > lMax) l = lMax;
+		    ENTER_XLIB();
+		    if (opaque == true)
+			XDrawImageString(dpy, win, gc, __intVal(x), __intVal(y), cp, l);
+		    else
+			XDrawString(dpy, win, gc, __intVal(x), __intVal(y), cp, l);
+		    LEAVE_XLIB();
+		    RETURN ( self );
+		}
+	    }
+
+	    cls = __qClass(aString);
+	    nInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
+	    cp += nInstBytes;
+
+	    if (__isBytes(aString)) {
+		n = __byteArraySize(aString) - nInstBytes - 1;
+
+		if (i2 < n) {
+		    cp += i1;
+		    if (l > lMax) l = lMax;
+		    ENTER_XLIB();
+		    if (opaque == true)
+			XDrawImageString(dpy, win, gc, __intVal(x), __intVal(y), cp, l);
+		    else
+			XDrawString(dpy, win, gc, __intVal(x), __intVal(y), cp, l);
+		    LEAVE_XLIB();
+		    RETURN ( self );
+		}
+	    }
+
+	    /* TWOBYTESTRINGS */
+	    if (__isWords(aString)) {
+		n = (__byteArraySize(aString) - nInstBytes) / 2;
+		if (i2 < n) {
+		    union {
+			char b[2];
+			unsigned short s;
+		    } u;
+		    int i;
+		    XChar2b *cp2 = (XChar2b *)0;
+		    int mustFree = 0;
+
+		    cp += (i1 * 2);
+		    if (l > lMax) l = lMax;
 
 #if defined(MSBFIRST) || defined(__MSBFIRST)
-                    /*
-                     * chars already in correct order
-                     */
+		    /*
+		     * chars already in correct order
+		     */
 #else
 # if ! (defined(LSBFIRST) || defined(__LSBFIRST))
-                    /*
-                     * ST/X TwoByteStrings store the asciiValue in native byteOrder;
-                     * X expects them MSB first
-                     * convert as required
-                     */
-                    u.s = 0x1234;
-                    if (u.b[0] != 0x12)
+		    /*
+		     * ST/X TwoByteStrings store the asciiValue in native byteOrder;
+		     * X expects them MSB first
+		     * convert as required
+		     */
+		    u.s = 0x1234;
+		    if (u.b[0] != 0x12)
 # endif
-                    {
-                        if (l <= NLOCALBUFFER) {
-                            cp2 = xlatebuffer;
-                        } else {
-                            cp2 = (XChar2b *)(malloc(l * 2));
-                            mustFree = 1;
-                        }
-                        for (i=0; i<l; i++) {
-                            cp2[i].byte1 = (((XChar2b *)cp)[i]).byte2;
-                            cp2[i].byte2 = (((XChar2b *)cp)[i]).byte1;
-                        }
-                        cp = (char *) cp2;
-                    }
-#endif
-                    ENTER_XLIB();
-                    if (opaque == true)
-                        XDrawImageString16(dpy, win, gc, __intVal(x), __intVal(y), (XChar2b *)cp, l);
-                    else
-                        XDrawString16(dpy, win, gc, __intVal(x), __intVal(y), (XChar2b *)cp, l);
-                    LEAVE_XLIB();
-
-                    if (mustFree) {
-                        free(cp2);
-                    }
-
-                    RETURN ( self );
-                }
-            }
-
-            /* FOURBYTESTRINGS */
-            if (__isLongs(aString)) {
-                n = (__byteArraySize(aString) - nInstBytes) / 4;
-                if (i2 < n) {
-                    union {
-                        char b[2];
-                        unsigned short s;
-                    } u;
-                    int i;
-                    XChar2b *cp2 = (XChar2b *)0;
-                    int32 *ip;
-                    int mustFree = 0;
-
-                    cp += (i1 * 4);
-                    if (l > lMax) l = lMax;
-
-                    /*
-                     * all codePoints <= 16rFFFF are draw; above 16bit range are drawn as 16rFFFF.
-                     */
-                    if (l <= NLOCALBUFFER) {
-                        cp2 = xlatebuffer;
-                    } else {
-                        cp2 = (XChar2b *)(malloc(l * 2));
-                        mustFree = 1;
-                    }
-                    for (i=0; i<l; i++) {
-                        int32 codePoint = ((int32 *)cp)[i];
-
-                        if (codePoint > 0xFFFF) {
-                            codePoint = 0xFFFF;
-                        }
-                        cp2[i].byte1 = (codePoint >> 8) & 0xFF;
-                        cp2[i].byte2 = codePoint & 0xFF;
-                    }
-                    cp = (char *) cp2;
-
-                    ENTER_XLIB();
-                    if (opaque == true)
-                        XDrawImageString16(dpy, win, gc, __intVal(x), __intVal(y), (XChar2b *)cp, l);
-                    else
-                        XDrawString16(dpy, win, gc, __intVal(x), __intVal(y), (XChar2b *)cp, l);
-                    LEAVE_XLIB();
-
-                    if (mustFree) {
-                        free(cp2);
-                    }
-
-                    RETURN ( self );
-                }
-            }
-        }
+		    {
+			if (l <= NLOCALBUFFER) {
+			    cp2 = xlatebuffer;
+			} else {
+			    cp2 = (XChar2b *)(malloc(l * 2));
+			    mustFree = 1;
+			}
+			for (i=0; i<l; i++) {
+			    cp2[i].byte1 = (((XChar2b *)cp)[i]).byte2;
+			    cp2[i].byte2 = (((XChar2b *)cp)[i]).byte1;
+			}
+			cp = (char *) cp2;
+		    }
+#endif
+		    ENTER_XLIB();
+		    if (opaque == true)
+			XDrawImageString16(dpy, win, gc, __intVal(x), __intVal(y), (XChar2b *)cp, l);
+		    else
+			XDrawString16(dpy, win, gc, __intVal(x), __intVal(y), (XChar2b *)cp, l);
+		    LEAVE_XLIB();
+
+		    if (mustFree) {
+			free(cp2);
+		    }
+
+		    RETURN ( self );
+		}
+	    }
+
+	    /* FOURBYTESTRINGS */
+	    if (__isLongs(aString)) {
+		n = (__byteArraySize(aString) - nInstBytes) / 4;
+		if (i2 < n) {
+		    union {
+			char b[2];
+			unsigned short s;
+		    } u;
+		    int i;
+		    XChar2b *cp2 = (XChar2b *)0;
+		    int32 *ip;
+		    int mustFree = 0;
+
+		    cp += (i1 * 4);
+		    if (l > lMax) l = lMax;
+
+		    /*
+		     * all codePoints <= 16rFFFF are draw; above 16bit range are drawn as 16rFFFF.
+		     */
+		    if (l <= NLOCALBUFFER) {
+			cp2 = xlatebuffer;
+		    } else {
+			cp2 = (XChar2b *)(malloc(l * 2));
+			mustFree = 1;
+		    }
+		    for (i=0; i<l; i++) {
+			int32 codePoint = ((int32 *)cp)[i];
+
+			if (codePoint > 0xFFFF) {
+			    codePoint = 0xFFFF;
+			}
+			cp2[i].byte1 = (codePoint >> 8) & 0xFF;
+			cp2[i].byte2 = codePoint & 0xFF;
+		    }
+		    cp = (char *) cp2;
+
+		    ENTER_XLIB();
+		    if (opaque == true)
+			XDrawImageString16(dpy, win, gc, __intVal(x), __intVal(y), (XChar2b *)cp, l);
+		    else
+			XDrawString16(dpy, win, gc, __intVal(x), __intVal(y), (XChar2b *)cp, l);
+		    LEAVE_XLIB();
+
+		    if (mustFree) {
+			free(cp2);
+		    }
+
+		    RETURN ( self );
+		}
+	    }
+	}
     }
 #undef NLOCALBUFFER
 %}.
     (aString isString and:[aString bitsPerCharacter > 16]) ifTrue:[
-        self displayString:(TwoByteString new:aString size withAll:16rFFFF asCharacter)
-             from:index1 to:index2 x:x y:y in:aDrawableId with:aGCId opaque:opaque.
-        ^ self.
+	self displayString:(TwoByteString new:aString size withAll:16rFFFF asCharacter)
+	     from:index1 to:index2 x:x y:y in:aDrawableId with:aGCId opaque:opaque.
+	^ self.
     ].
 
     "x/y not integer, badGC or drawable, or not a string"
@@ -4981,11 +4981,11 @@
     <context: #return>
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
 %{
 
@@ -5003,97 +5003,97 @@
      && __isExternalAddress(aDrawableId)
      && __isNonNilObject(aString)
      && __bothSmallInteger(x, y)) {
-        int lMax = __intVal(@global(MaxStringLength));
-        Display *dpy = myDpy;
-        gc = __GCVal(aGCId);
-        win = __WindowVal(aDrawableId);
-
-        cp = (char *) __stringVal(aString);
-
-        if (__isStringLike(aString)) {
-            n = __stringSize(aString);
-            if (n > lMax) n = lMax;
-            ENTER_XLIB();
-            if (opaque == true)
-                XDrawImageString(dpy, win, gc, __intVal(x), __intVal(y), cp, n);
-            else
-                XDrawString(dpy, win, gc, __intVal(x), __intVal(y), cp, n);
-            LEAVE_XLIB();
-            RETURN ( self );
-        }
-
-        cls = __qClass(aString);
-        nInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
-        cp += nInstBytes;
-
-        if (__isBytes(aString)) {
-            n = __byteArraySize(aString) - nInstBytes - 1;
-
-            if (n > lMax) n = lMax;
-            ENTER_XLIB();
-            if (opaque == true)
-                XDrawImageString(dpy, win, gc, __intVal(x), __intVal(y), cp, n);
-            else
-                XDrawString(dpy, win, gc, __intVal(x), __intVal(y), cp, n);
-            LEAVE_XLIB();
-            RETURN ( self );
-        }
-
-        /* TWOBYTESTRINGS */
-        if (__isWords(aString)) {
-            union {
-                char b[2];
-                unsigned short s;
-            } u;
-            int i;
-            XChar2b *cp2;
-            int mustFree = 0;
-
-            n = (__byteArraySize(aString) - nInstBytes) / 2;
-            if (n > lMax) n = lMax;
+	int lMax = __intVal(@global(MaxStringLength));
+	Display *dpy = myDpy;
+	gc = __GCVal(aGCId);
+	win = __WindowVal(aDrawableId);
+
+	cp = (char *) __stringVal(aString);
+
+	if (__isStringLike(aString)) {
+	    n = __stringSize(aString);
+	    if (n > lMax) n = lMax;
+	    ENTER_XLIB();
+	    if (opaque == true)
+		XDrawImageString(dpy, win, gc, __intVal(x), __intVal(y), cp, n);
+	    else
+		XDrawString(dpy, win, gc, __intVal(x), __intVal(y), cp, n);
+	    LEAVE_XLIB();
+	    RETURN ( self );
+	}
+
+	cls = __qClass(aString);
+	nInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
+	cp += nInstBytes;
+
+	if (__isBytes(aString)) {
+	    n = __byteArraySize(aString) - nInstBytes - 1;
+
+	    if (n > lMax) n = lMax;
+	    ENTER_XLIB();
+	    if (opaque == true)
+		XDrawImageString(dpy, win, gc, __intVal(x), __intVal(y), cp, n);
+	    else
+		XDrawString(dpy, win, gc, __intVal(x), __intVal(y), cp, n);
+	    LEAVE_XLIB();
+	    RETURN ( self );
+	}
+
+	/* TWOBYTESTRINGS */
+	if (__isWords(aString)) {
+	    union {
+		char b[2];
+		unsigned short s;
+	    } u;
+	    int i;
+	    XChar2b *cp2;
+	    int mustFree = 0;
+
+	    n = (__byteArraySize(aString) - nInstBytes) / 2;
+	    if (n > lMax) n = lMax;
 
 #if defined(MSBFIRST) || defined(__MSBFIRST)
-            /*
-             * chars already in correct order
-             */
+	    /*
+	     * chars already in correct order
+	     */
 #else
 # if ! (defined(LSBFIRST) || defined(__LSBFIRST))
-            /*
-             * ST/X TwoByteStrings store the asciiValue in native byteOrder;
-             * X expects them MSB first
-             * convert as required
-             */
-            u.s = 0x1234;
-            if (u.b[0] != 0x12)
+	    /*
+	     * ST/X TwoByteStrings store the asciiValue in native byteOrder;
+	     * X expects them MSB first
+	     * convert as required
+	     */
+	    u.s = 0x1234;
+	    if (u.b[0] != 0x12)
 # endif
-            {
-                if (n <= NLOCALBUFFER) {
-                    cp2 = xlatebuffer;
-                } else {
-                    cp2 = (XChar2b *)(malloc(n * 2));
-                    mustFree = 1;
-                }
-
-                for (i=0; i<n; i++) {
-                    cp2[i].byte1 = (((XChar2b *)cp)[i]).byte2;
-                    cp2[i].byte2 = (((XChar2b *)cp)[i]).byte1;
-                }
-                cp = (char *) cp2;
-            }
-#endif
-            ENTER_XLIB();
-            if (opaque == true)
-                XDrawImageString16(dpy, win, gc, __intVal(x), __intVal(y), (XChar2b *)cp, n);
-            else
-                XDrawString16(dpy, win, gc, __intVal(x), __intVal(y), (XChar2b *)cp, n);
-            LEAVE_XLIB();
-
-            if (mustFree) {
-                free(cp2);
-            }
-
-            RETURN ( self );
-        }
+	    {
+		if (n <= NLOCALBUFFER) {
+		    cp2 = xlatebuffer;
+		} else {
+		    cp2 = (XChar2b *)(malloc(n * 2));
+		    mustFree = 1;
+		}
+
+		for (i=0; i<n; i++) {
+		    cp2[i].byte1 = (((XChar2b *)cp)[i]).byte2;
+		    cp2[i].byte2 = (((XChar2b *)cp)[i]).byte1;
+		}
+		cp = (char *) cp2;
+	    }
+#endif
+	    ENTER_XLIB();
+	    if (opaque == true)
+		XDrawImageString16(dpy, win, gc, __intVal(x), __intVal(y), (XChar2b *)cp, n);
+	    else
+		XDrawString16(dpy, win, gc, __intVal(x), __intVal(y), (XChar2b *)cp, n);
+	    LEAVE_XLIB();
+
+	    if (mustFree) {
+		free(cp2);
+	    }
+
+	    RETURN ( self );
+	}
     }
 #undef NLOCALBUFFER
 %}.
@@ -5101,12 +5101,12 @@
 !
 
 drawBits:givenBits bitsPerPixel:bitsPerPixel depth:imageDepth padding:givenPadding
-        width:imageWidth height:imageHeight
-        x:srcx y:srcy
-        into:aDrawableId
-        x:dstx y:dsty
-        width:w height:h
-        with:aGCId
+	width:imageWidth height:imageHeight
+	x:srcx y:srcy
+	into:aDrawableId
+	x:dstx y:dsty
+	width:w height:h
+	with:aGCId
 
     "draw a bitImage which has depth id, width iw and height ih into
      the drawable. draw a region of w/h pixels from srcx/srcy to dstx/dsty.
@@ -5128,44 +5128,44 @@
     "/ care for that.
 
     ((imageDepth == 4) and:[depth == 4]) ifTrue:[
-        fmt := self supportedImageFormatForDepth:4.
-        fmt isNil ifTrue:[
-            self primitiveFailed. "/ cannot represent this image
-            ^ nil
-        ].
-        wantedPadding := fmt at:#padding.
-        wantedPadding > givenPadding ifTrue:[
-            bits := self
-                            repadBits:givenBits
-                            width:imageWidth
-                            height:imageHeight
-                            depth:imageDepth
-                            from:givenPadding
-                            to:wantedPadding.
-            padding := wantedPadding.
-        ]
+	fmt := self supportedImageFormatForDepth:4.
+	fmt isNil ifTrue:[
+	    self primitiveFailed. "/ cannot represent this image
+	    ^ nil
+	].
+	wantedPadding := fmt at:#padding.
+	wantedPadding > givenPadding ifTrue:[
+	    bits := self
+			    repadBits:givenBits
+			    width:imageWidth
+			    height:imageHeight
+			    depth:imageDepth
+			    from:givenPadding
+			    to:wantedPadding.
+	    padding := wantedPadding.
+	]
     ].
 
     self
-        drawBits:bits
-        msb:true bitsPerPixel:bitsPerPixel depth:imageDepth padding:padding
-        width:imageWidth height:imageHeight
-        x:srcx y:srcy
-        into:aDrawableId
-        x:dstx y:dsty
-        width:w height:h
-        with:aGCId
+	drawBits:bits
+	msb:true bitsPerPixel:bitsPerPixel depth:imageDepth padding:padding
+	width:imageWidth height:imageHeight
+	x:srcx y:srcy
+	into:aDrawableId
+	x:dstx y:dsty
+	width:w height:h
+	with:aGCId
 
     "Modified: / 11-04-2017 / 18:50:32 / cg"
 !
 
 drawBits:bits msb:msb bitsPerPixel:bitsPerPixel depth:imageDepth padding:padding
-        width:imageWidth height:imageHeight
-        x:srcx y:srcy
-        into:aDrawableId
-        x:dstx y:dsty
-        width:w height:h
-        with:aGCId
+	width:imageWidth height:imageHeight
+	x:srcx y:srcy
+	into:aDrawableId
+	x:dstx y:dsty
+	width:w height:h
+	with:aGCId
 
     "draw a bitImage which has depth id, width iw and height ih into
      the drawable. draw a region of w/h pixels from srcx/srcy to dstx/dsty.
@@ -5177,52 +5177,52 @@
      colors are allocated - otherwise the colors may be wrong."
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
     "
      sorry; I had to separate it into 2 methods, since XPutImage needs
      an unlimited stack, and thus cannot send primitiveFailed
     "
     (self
-        primDrawBits:bits
-        bitsPerPixel:bitsPerPixel
-        depth:imageDepth
-        msb:msb
-        padding:padding
-        width:imageWidth height:imageHeight
-        x:srcx y:srcy
-        into:aDrawableId
-        x:dstx y:dsty
-        width:w height:h
-        with:aGCId)
+	primDrawBits:bits
+	bitsPerPixel:bitsPerPixel
+	depth:imageDepth
+	msb:msb
+	padding:padding
+	width:imageWidth height:imageHeight
+	x:srcx y:srcy
+	into:aDrawableId
+	x:dstx y:dsty
+	width:w height:h
+	with:aGCId)
     ifFalse:[
-        "
-         also happens, if a segmentation violation occurs in the
-         XPutImage ...
-        "
-        self primitiveFailedOrClosedConnection
+	"
+	 also happens, if a segmentation violation occurs in the
+	 XPutImage ...
+	"
+	self primitiveFailedOrClosedConnection
     ].
 
     "Created: / 11-04-2017 / 18:49:44 / cg"
 !
 
 fillArcX:x y:y width:width height:height from:startAngle angle:angle
-               in:aDrawableId with:aGCId
+	       in:aDrawableId with:aGCId
     "fill an arc. If any coordinate is not integer, an error is triggered.
      The angles may be floats or integer - they are given in degrees."
 
     <context: #return>
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
 %{
 
@@ -5232,23 +5232,23 @@
     double f;
 
     if (__isSmallInteger(startAngle))
-        angle1 = __intVal(startAngle) * 64;
+	angle1 = __intVal(startAngle) * 64;
     else if (__isFloat(startAngle)) {
-        f = __floatVal(startAngle);
-        angle1 = f * 64;
+	f = __floatVal(startAngle);
+	angle1 = f * 64;
     } else if (__isShortFloat(startAngle)) {
-        f = __shortFloatVal(startAngle);
-        angle1 = f * 64;
+	f = __shortFloatVal(startAngle);
+	angle1 = f * 64;
     } else goto bad;
 
     if (__isSmallInteger(angle))
-        angle2 = __intVal(angle) * 64;
+	angle2 = __intVal(angle) * 64;
     else if (__isFloat(angle)) {
-        f = __floatVal(angle);
-        angle2 = f * 64;
+	f = __floatVal(angle);
+	angle2 = f * 64;
     } else if (__isShortFloat(angle)) {
-        f = __shortFloatVal(angle);
-        angle2 = f * 64;
+	f = __shortFloatVal(angle);
+	angle2 = f * 64;
     } else goto bad;
 
     if (ISCONNECTED
@@ -5256,20 +5256,20 @@
      && __isExternalAddress(aDrawableId)
      && __bothSmallInteger(x, y)
      && __bothSmallInteger(width, height)) {
-        gc = __GCVal(aGCId);
-        win = __WindowVal(aDrawableId);
-        w = __intVal(width);
-        h = __intVal(height);
-        /*
-         * need this check here: some servers simply dump core with bad args
-         */
-        if ((w >= 0) && (h >= 0) && (angle1 >= 0) && (angle2 >= 0)) {
-            ENTER_XLIB();
-            XFillArc(myDpy, win, gc, __intVal(x), __intVal(y),
-                                   w, h, angle1, angle2);
-            LEAVE_XLIB();
-        }
-        RETURN ( self );
+	gc = __GCVal(aGCId);
+	win = __WindowVal(aDrawableId);
+	w = __intVal(width);
+	h = __intVal(height);
+	/*
+	 * need this check here: some servers simply dump core with bad args
+	 */
+	if ((w >= 0) && (h >= 0) && (angle1 >= 0) && (angle2 >= 0)) {
+	    ENTER_XLIB();
+	    XFillArc(myDpy, win, gc, __intVal(x), __intVal(y),
+				   w, h, angle1, angle2);
+	    LEAVE_XLIB();
+	}
+	RETURN ( self );
     }
     bad: ;
 %}.
@@ -5288,11 +5288,11 @@
     |numberOfPoints|
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
     numberOfPoints := aPolygon size.
 %{
@@ -5308,41 +5308,41 @@
      && __isExternalAddress(aGCId)
      && __isExternalAddress(aDrawableId)
      && __isSmallInteger(numberOfPoints)) {
-        gc = __GCVal(aGCId);
-        win = __WindowVal(aDrawableId);
-        num = __intVal(numberOfPoints);
-        if (num < 3) {
-            RETURN ( self );
-        }
-        /*
-         * avoid (slow) malloc, if not many points
-         */
-        if (num > 100) {
-            points = (XPoint *) malloc(sizeof(XPoint) * num);
-            if (! points) goto fail;
-            mustFree = 1;
-        } else
-            points = qPoints;
-        for (i=0; i<num; i++) {
-            point = __AT_(aPolygon, __MKSMALLINT(i+1));
-            if (! __isPoint(point)) goto fail;
-            x = _point_X(point);
-            y = _point_Y(point);
-            if (! __bothSmallInteger(x, y))
-                goto fail;
-            points[i].x = __intVal(x);
-            points[i].y = __intVal(y);
-        }
-        ENTER_XLIB();
-        XFillPolygon(myDpy, win, gc, points, num, Complex, CoordModeOrigin);
-        LEAVE_XLIB();
-        if (mustFree)
-            free(points);
-        RETURN ( self );
+	gc = __GCVal(aGCId);
+	win = __WindowVal(aDrawableId);
+	num = __intVal(numberOfPoints);
+	if (num < 3) {
+	    RETURN ( self );
+	}
+	/*
+	 * avoid (slow) malloc, if not many points
+	 */
+	if (num > 100) {
+	    points = (XPoint *) malloc(sizeof(XPoint) * num);
+	    if (! points) goto fail;
+	    mustFree = 1;
+	} else
+	    points = qPoints;
+	for (i=0; i<num; i++) {
+	    point = __AT_(aPolygon, __MKSMALLINT(i+1));
+	    if (! __isPoint(point)) goto fail;
+	    x = _point_X(point);
+	    y = _point_Y(point);
+	    if (! __bothSmallInteger(x, y))
+		goto fail;
+	    points[i].x = __intVal(x);
+	    points[i].y = __intVal(y);
+	}
+	ENTER_XLIB();
+	XFillPolygon(myDpy, win, gc, points, num, Complex, CoordModeOrigin);
+	LEAVE_XLIB();
+	if (mustFree)
+	    free(points);
+	RETURN ( self );
 
 fail: ;
-        if (mustFree)
-            free(points);
+	if (mustFree)
+	    free(points);
     }
 %}.
     "badGC, badDrawable or coordinates not integer"
@@ -5355,27 +5355,27 @@
 
 %{  /* NOCONTEXT */
     if (__INST(operationsUntilFlush) == nil) {
-        int w, h;
-
-        if (ISCONNECTED
-         && __isExternalAddress(aGCId)
-         && __isExternalAddress(aDrawableId)
-         && __bothSmallInteger(x, y)
-         && __bothSmallInteger(width, height)) {
-            w = __intVal(width);
-            h = __intVal(height);
-            /*
-             * need this check here: some servers simply dump core with bad args
-             */
-            if ((w >= 0) && (h >= 0)) {
-                ENTER_XLIB();
-                XFillRectangle(myDpy,
-                               __DrawableVal(aDrawableId), __GCVal(aGCId),
-                               __intVal(x), __intVal(y), w, h);
-                LEAVE_XLIB();
-            }
-            RETURN ( self );
-        }
+	int w, h;
+
+	if (ISCONNECTED
+	 && __isExternalAddress(aGCId)
+	 && __isExternalAddress(aDrawableId)
+	 && __bothSmallInteger(x, y)
+	 && __bothSmallInteger(width, height)) {
+	    w = __intVal(width);
+	    h = __intVal(height);
+	    /*
+	     * need this check here: some servers simply dump core with bad args
+	     */
+	    if ((w >= 0) && (h >= 0)) {
+		ENTER_XLIB();
+		XFillRectangle(myDpy,
+			       __DrawableVal(aDrawableId), __GCVal(aGCId),
+			       __intVal(x), __intVal(y), w, h);
+		LEAVE_XLIB();
+	    }
+	    RETURN ( self );
+	}
     }
 %}.
     self _fillRectangleX:x y:y width:width height:height in:aDrawableId with:aGCId
@@ -5430,57 +5430,57 @@
      && __bothSmallInteger(rm, gm)
      && __isSmallInteger(bm)
      && __isByteArrayLike(imageBits)) {
-        Display *dpy = myDpy;
-        int pad = __intVal(bitPadding);
-
-        gc = __GCVal(aGCId);
-        win = __WindowVal(aDrawableId);
-        if (! gc || !win)
-            goto fail;
+	Display *dpy = myDpy;
+	int pad = __intVal(bitPadding);
+
+	gc = __GCVal(aGCId);
+	win = __WindowVal(aDrawableId);
+	if (! gc || !win)
+	    goto fail;
 #ifdef ARGDEBUG
-        console_printf("args ok\n");
-#endif
-        image.data = (char *)__ByteArrayInstPtr(imageBits)->ba_element;
-        image.width = imgWdth = __intVal(imageWidth);
-        image.height = __intVal(imageHeight);
-        image.xoffset = 0;
-        image.format = ZPixmap;
-        image.byte_order = (msb == true) ? MSBFirst : LSBFirst;
-        image.bitmap_unit = 8;
-        image.bitmap_bit_order = MSBFirst;
-        image.bitmap_pad = pad;
-        image.depth = __intVal(imageDepth);
-        image.bits_per_pixel = __intVal(bitsPerPixel);
-        image.red_mask = __intVal(rm);
-        image.green_mask = __intVal(gm);
-        image.blue_mask = __intVal(bm);
-
-        image.bytes_per_line = ((((imgWdth * image.bits_per_pixel) + (pad-1)) / pad) * pad) / 8;
-
-        switch (image.bits_per_pixel) {
-            case 1:
-            case 2:
-            case 4:
-            case 8:
-            case 16:
-            case 24:
-            case 32:
-                break;
-
-            default:
+	console_printf("args ok\n");
+#endif
+	image.data = (char *)__ByteArrayInstPtr(imageBits)->ba_element;
+	image.width = imgWdth = __intVal(imageWidth);
+	image.height = __intVal(imageHeight);
+	image.xoffset = 0;
+	image.format = ZPixmap;
+	image.byte_order = (msb == true) ? MSBFirst : LSBFirst;
+	image.bitmap_unit = 8;
+	image.bitmap_bit_order = MSBFirst;
+	image.bitmap_pad = pad;
+	image.depth = __intVal(imageDepth);
+	image.bits_per_pixel = __intVal(bitsPerPixel);
+	image.red_mask = __intVal(rm);
+	image.green_mask = __intVal(gm);
+	image.blue_mask = __intVal(bm);
+
+	image.bytes_per_line = ((((imgWdth * image.bits_per_pixel) + (pad-1)) / pad) * pad) / 8;
+
+	switch (image.bits_per_pixel) {
+	    case 1:
+	    case 2:
+	    case 4:
+	    case 8:
+	    case 16:
+	    case 24:
+	    case 32:
+		break;
+
+	    default:
 #ifdef ARGDEBUG
-                console_printf("bits_per_pixel=%d\n",image.bits_per_pixel);
-#endif
-                goto fail;
-        }
-
-        /* ENTER_XLIB(); */
-        XPutImage(dpy, win, gc, &image, __intVal(srcx), __intVal(srcy),
-                                        __intVal(dstx), __intVal(dsty),
-                                        __intVal(w), __intVal(h));
-        /* LEAVE_XLIB(); */
-
-        RETURN ( true );
+		console_printf("bits_per_pixel=%d\n",image.bits_per_pixel);
+#endif
+		goto fail;
+	}
+
+	/* ENTER_XLIB(); */
+	XPutImage(dpy, win, gc, &image, __intVal(srcx), __intVal(srcy),
+					__intVal(dstx), __intVal(dsty),
+					__intVal(w), __intVal(h));
+	/* LEAVE_XLIB(); */
+
+	RETURN ( true );
     }
 #ifdef ARGDEBUG
     if (! __isExternalAddress(aGCId)) console_printf("GC\n");
@@ -5541,61 +5541,61 @@
      && __bothSmallInteger(imageDepth, bitsPerPixel)
      && __isSmallInteger(bitPadding)
      && __isByteArrayLike(imageBits)) {
-        Display *dpy = myDpy;
-        int pad = __intVal(bitPadding);
-
-        gc = __GCVal(aGCId);
-        win = __WindowVal(aDrawableId);
-        if (! gc || !win)
-            goto fail;
+	Display *dpy = myDpy;
+	int pad = __intVal(bitPadding);
+
+	gc = __GCVal(aGCId);
+	win = __WindowVal(aDrawableId);
+	if (! gc || !win)
+	    goto fail;
 #ifdef ARGDEBUG
-        console_printf("args ok\n");
-#endif
-        image.data = (char *)__ByteArrayInstPtr(imageBits)->ba_element;
-        image.width = imgWdth = __intVal(imageWidth);
-        image.height = __intVal(imageHeight);
-        image.xoffset = 0;
-        image.format = ZPixmap;
-        image.byte_order = (msb == true) ? MSBFirst : LSBFirst;
-        image.bitmap_unit = 8;
-        image.bitmap_bit_order = MSBFirst;
-        image.bitmap_pad = pad;
-        image.depth = __intVal(imageDepth);
-        image.bits_per_pixel = __intVal(bitsPerPixel);
-
-        /*
-        image.bytes_per_line = ((((imgWdth * image.depth) + (pad-1)) / pad) * pad) / 8;
-        */
-        image.bytes_per_line = ((((imgWdth * image.bits_per_pixel) + (pad-1)) / pad) * pad) / 8;
-
-        switch (image.bits_per_pixel) {
-            case 1:
-            case 2:
-            case 4:
-            case 8:
-            case 16:
-            case 24:
-            case 32:
-                break;
-
-            default:
+	console_printf("args ok\n");
+#endif
+	image.data = (char *)__ByteArrayInstPtr(imageBits)->ba_element;
+	image.width = imgWdth = __intVal(imageWidth);
+	image.height = __intVal(imageHeight);
+	image.xoffset = 0;
+	image.format = ZPixmap;
+	image.byte_order = (msb == true) ? MSBFirst : LSBFirst;
+	image.bitmap_unit = 8;
+	image.bitmap_bit_order = MSBFirst;
+	image.bitmap_pad = pad;
+	image.depth = __intVal(imageDepth);
+	image.bits_per_pixel = __intVal(bitsPerPixel);
+
+	/*
+	image.bytes_per_line = ((((imgWdth * image.depth) + (pad-1)) / pad) * pad) / 8;
+	*/
+	image.bytes_per_line = ((((imgWdth * image.bits_per_pixel) + (pad-1)) / pad) * pad) / 8;
+
+	switch (image.bits_per_pixel) {
+	    case 1:
+	    case 2:
+	    case 4:
+	    case 8:
+	    case 16:
+	    case 24:
+	    case 32:
+		break;
+
+	    default:
 #ifdef ARGDEBUG
-                console_printf("bits_per_pixel=%d\n",image.bits_per_pixel);
-#endif
-                goto fail;
-        }
-
-        image.red_mask = 0xFFFF;
-        image.green_mask = 0xFFFF;
-        image.blue_mask = 0xFFFF;
-
-        /* ENTER_XLIB(); */
-        XPutImage(dpy, win, gc, &image, __intVal(srcx), __intVal(srcy),
-                                        __intVal(dstx), __intVal(dsty),
-                                        __intVal(w), __intVal(h));
-        /* LEAVE_XLIB(); */
-
-        RETURN ( true );
+		console_printf("bits_per_pixel=%d\n",image.bits_per_pixel);
+#endif
+		goto fail;
+	}
+
+	image.red_mask = 0xFFFF;
+	image.green_mask = 0xFFFF;
+	image.blue_mask = 0xFFFF;
+
+	/* ENTER_XLIB(); */
+	XPutImage(dpy, win, gc, &image, __intVal(srcx), __intVal(srcy),
+					__intVal(dstx), __intVal(dsty),
+					__intVal(w), __intVal(h));
+	/* LEAVE_XLIB(); */
+
+	RETURN ( true );
     }
 #ifdef ARGDEBUG
     if (! __isExternalAddress(aGCId)) console_printf("GC\n");
@@ -5654,7 +5654,7 @@
     ].
 
     logicalButton isInteger ifTrue:[
-        buttonsPressed := buttonsPressed bitOr:(1 bitShift:logicalButton-1).
+	buttonsPressed := buttonsPressed bitOr:(1 bitShift:logicalButton-1).
     ].
 
     clickPosition := x @ y.
@@ -5663,23 +5663,23 @@
      and:[lastButtonPressTime notNil
      and:[time < (lastButtonPressTime + multiClickTimeDelta)
      and:[(clickPosition dist:lastButtonPressPosition) < 6]]]) ifTrue:[
-        lastButtonPressTime := time.
-        lastButtonPressPosition := clickPosition.
-        self buttonMultiPress:logicalButton x:x y:y view:view.
-        ^ self.
+	lastButtonPressTime := time.
+	lastButtonPressPosition := clickPosition.
+	self buttonMultiPress:logicalButton x:x y:y view:view.
+	^ self.
     ].
     lastButtonPressTime := time.
     lastButtonPressPosition := clickPosition.
 
     view isNil ifTrue:[
-        "/ event arrived, after I destroyed it myself
-        ^ self
+	"/ event arrived, after I destroyed it myself
+	^ self
     ].
     (logicalButton == 1 and:[activateOnClick == true]) ifTrue:[
-        "/ don't raise above an active popup view.
-        (activeKeyboardGrab isNil and:[activePointerGrab isNil]) ifTrue:[
-            view topView raise.
-        ]
+	"/ don't raise above an active popup view.
+	(activeKeyboardGrab isNil and:[activePointerGrab isNil]) ifTrue:[
+	    view topView raise.
+	]
     ].
     self buttonPress:logicalButton x:x y:y view:view
 
@@ -5709,7 +5709,7 @@
     ].
 
     logicalButton isInteger ifTrue:[
-        buttonsPressed := buttonsPressed bitClear:(1 bitShift:logicalButton-1).
+	buttonsPressed := buttonsPressed bitClear:(1 bitShift:logicalButton-1).
     ].
     self buttonRelease:logicalButton x:x y:y view:view
 !
@@ -5781,20 +5781,20 @@
 "/     ].
     self configureX:x y:y width:w height:h view:view.
     aboveViewId notNil ifTrue:[
-        |aboveView|
-        aboveView := self viewFromId:aboveViewId.
-        aboveView notNil ifTrue:[
-            "view is now on the top of the window stack"
-            self coveredBy:view view:aboveView.
-        ].
+	|aboveView|
+	aboveView := self viewFromId:aboveViewId.
+	aboveView notNil ifTrue:[
+	    "view is now on the top of the window stack"
+	    self coveredBy:view view:aboveView.
+	].
      ].
 !
 
 createWindow:view x:x y:y width:w height:h
 
     view isNil ifTrue:[
-        "/ event arrived, after I destroyed it myself
-        ^ self
+	"/ event arrived, after I destroyed it myself
+	^ self
     ].
     view sensor createWindow:view x:x y:y width:w height:h
 
@@ -5812,8 +5812,8 @@
     "a view got the keyboard focus"
 
     mode ~~ 1 "NotifyGrab" ifTrue:[
-        "mode NotifyGrab is set for pseudo-focus-changes, when a view grabs the keyboard"
-        self focusInView:view
+	"mode NotifyGrab is set for pseudo-focus-changes, when a view grabs the keyboard"
+	self focusInView:view
     ].
 !
 
@@ -5821,8 +5821,8 @@
     "a view lost the keyboard focus"
 
     mode ~~ 1 "NotifyGrab" ifTrue:[
-        "mode NotifyGrab is set for pseudo-focus-changes, when a view grabs the keyboard"
-        self focusOutView:view
+	"mode NotifyGrab is set for pseudo-focus-changes, when a view grabs the keyboard"
+	self focusOutView:view
     ].
 !
 
@@ -5845,9 +5845,9 @@
     shiftDown := state bitTest:(self shiftModifierMask).
     ctrlDown := state bitTest:(self ctrlModifierMask).
     key isNil ifTrue:[
-        "/ happens sometimes on some systems
-        "/ (alt-graph on sun has no keysym)
-        ^ self
+	"/ happens sometimes on some systems
+	"/ (alt-graph on sun has no keysym)
+	^ self
     ].
     eventRootX := rX.
     eventRootY := rY.
@@ -5872,9 +5872,9 @@
     ctrlDown := state bitTest:(self ctrlModifierMask).
 
     key isNil ifTrue:[
-        "/ happens sometimes on some systems
-        "/ (alt-graph on sun has no keysym)
-        ^ self
+	"/ happens sometimes on some systems
+	"/ (alt-graph on sun has no keysym)
+	^ self
     ].
     eventRootX := rX.
     eventRootY := rY.
@@ -5890,9 +5890,9 @@
      Tell xlib about the fact."
 
     (what == #mappingKeyboard or:[what == #mappingModifier]) ifTrue:[
-        self refreshKeyboardMapping:eB.
-        "Maybe some of our modifiers have been changed"
-        self initializeModifierMappings.
+	self refreshKeyboardMapping:eB.
+	"Maybe some of our modifiers have been changed"
+	self initializeModifierMappings.
     ].
 
 !
@@ -5933,8 +5933,8 @@
 
     lastEventTime := time.
     aView isNil ifTrue:[
-        "event arrived, after aView has been destroyed"
-        ^ self
+	"event arrived, after aView has been destroyed"
+	^ self
     ].
 
 "/    'propertyChange ' infoPrint. (self atomName:propertyId) print. ': ' print. aSymbol printCR.
@@ -5946,12 +5946,12 @@
     aView sensor propertyChange:aView property:propertyId state:aSymbol time:time.
 
     aSymbol ~~ #newValue ifTrue:[
-        "I am not interested in delete notifications"
-        ^ self.
+	"I am not interested in delete notifications"
+	^ self.
     ].
     selectionFetcher := self findSelectionFetcher:aView drawableId.
     selectionFetcher notNil ifTrue:[
-        selectionFetcher message:thisContext message.
+	selectionFetcher message:thisContext message.
     ].
 
     "Modified: / 01-06-2011 / 13:40:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -5967,18 +5967,18 @@
     lastEventTime := time.
 
     selectionHandlers notNil ifTrue:[
-        selectionHandlers do:[:eachHandler |
-            eachHandler selectionClear:selectionID
-        ]
+	selectionHandlers do:[:eachHandler |
+	    eachHandler selectionClear:selectionID
+	]
     ].
 
     aView isNil ifTrue:[
-        "event arrived, after aView has been destroyed"
-        ^ self
+	"event arrived, after aView has been destroyed"
+	^ self
     ].
     selectionFetcher := self findSelectionFetcher:aView drawableId.
     selectionFetcher notNil ifTrue:[
-        selectionFetcher message:thisContext message.
+	selectionFetcher message:thisContext message.
     ].
 
     "Modified: / 26-04-2018 / 11:00:30 / stefan"
@@ -6002,12 +6002,12 @@
     lastEventTime := time.
 
     aView isNil ifTrue:[
-        "event arrived, after aView has been destroyed"
-        ^ self
+	"event arrived, after aView has been destroyed"
+	^ self
     ].
     selectionFetcher := self findSelectionFetcher:aView drawableId.
     selectionFetcher notNil ifTrue:[
-        selectionFetcher message:thisContext message.
+	selectionFetcher message:thisContext message.
     ].
 
     "Modified (format): / 14-03-2017 / 16:31:20 / cg"
@@ -6027,25 +6027,25 @@
 
     "JV@2012-03-27: Support both PRIMARY and CLIPBOARD selections"
     selectionID == primaryAtom ifTrue:[
-        bufferGetSelector := #getPrimaryBuffer.
-        selectionTime := primarySelectionTime.
+	bufferGetSelector := #getPrimaryBuffer.
+	selectionTime := primarySelectionTime.
     ] ifFalse:[
-        bufferGetSelector := #getCopyBuffer.
-        selectionTime := clipboardSelectionTime.
+	bufferGetSelector := #getCopyBuffer.
+	selectionTime := clipboardSelectionTime.
     ].
 
     (targetID == (self atomIDOf:#TIMESTAMP)) ifTrue:[
-        "the other view wants to know when we acquired ownership of the selection"
-        responseTargetID := self atomIDOf:#INTEGER.
-        selection := selectionTime.
+	"the other view wants to know when we acquired ownership of the selection"
+	responseTargetID := self atomIDOf:#INTEGER.
+	selection := selectionTime.
     ] ifFalse:[(targetID == (self atomIDOf:#TARGETS)) ifTrue:[
-        "the other view wants to know which targets we support"
-        responseTargetID := self atomIDOf:#ATOM.
-        selection := self supportedTargetAtoms.
+	"the other view wants to know which targets we support"
+	responseTargetID := self atomIDOf:#ATOM.
+	selection := self supportedTargetAtoms.
     ] ifFalse:[
-        selection := self selectionBuffer:bufferGetSelector as:targetID.
-        responseTargetID := selection key.
-        selection := selection value.
+	selection := self selectionBuffer:bufferGetSelector as:targetID.
+	responseTargetID := selection key.
+	selection := selection value.
     ]].
 
 "/'Send selection: ' print. selection printCR.
@@ -6053,28 +6053,28 @@
     property := propertyID.
 
     selection isNil ifTrue:[
-        "sending property None tells the client,
-         that I could not convert"
+	"sending property None tells the client,
+	 that I could not convert"
 "/        ('XWorkstation: unsupported selection target ', (self atomName:targetID)) errorPrintCR.
-        property := nil.
-        responseTargetID := targetID.
+	property := nil.
+	responseTargetID := targetID.
     ] ifFalse:[
-        property == 0 ifTrue:[
-            "Support old (obsolete) clients requesting a None property.
-             Set the propertyID to the targetID"
-            property := responseTargetID.
-        ].
-        self setProperty:property
-             type:responseTargetID
-             value:selection
-             for:requestorID.
+	property == 0 ifTrue:[
+	    "Support old (obsolete) clients requesting a None property.
+	     Set the propertyID to the targetID"
+	    property := responseTargetID.
+	].
+	self setProperty:property
+	     type:responseTargetID
+	     value:selection
+	     for:requestorID.
     ].
 
     self sendNotifySelection:selectionID
-         property:property
-         target:responseTargetID
-         time:time
-         to:requestorID.
+	 property:property
+	 target:responseTargetID
+	 time:time
+	 to:requestorID.
 
     "Modified: / 27-03-2012 / 15:22:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
@@ -6082,7 +6082,7 @@
 visibilityNotify:aView state:how
 
     aView notNil ifTrue:[
-        aView visibilityChange:how
+	aView visibilityChange:how
     ]
 ! !
 
@@ -6104,8 +6104,8 @@
      This is a very X-specific mechanism."
 
     aView isNil ifTrue:[
-        "/ event arrived, after I destroyed it myself
-        ^ self
+	"/ event arrived, after I destroyed it myself
+	^ self
     ].
     "/ not yet implemented
     "/ aView colorMapChange
@@ -6153,11 +6153,11 @@
 
 %{  /* NOCONTEXT */
     RETURN (__MKSMALLINT( ExposureMask | StructureNotifyMask |
-                         KeyPressMask | KeyReleaseMask |
-                         PointerMotionMask |
-                         EnterWindowMask | LeaveWindowMask |
-                         ButtonPressMask | ButtonMotionMask | ButtonReleaseMask |
-                         PropertyChangeMask ));
+			 KeyPressMask | KeyReleaseMask |
+			 PointerMotionMask |
+			 EnterWindowMask | LeaveWindowMask |
+			 ButtonPressMask | ButtonMotionMask | ButtonReleaseMask |
+			 PropertyChangeMask ));
 %}
 !
 
@@ -6170,21 +6170,21 @@
 
     viewId := evArray at:1.
     viewId notNil ifTrue:[
-        viewId = lastId ifTrue:[
-            view := lastView
-        ] ifFalse:[
-            view := self viewFromId:viewId
-        ].
+	viewId = lastId ifTrue:[
+	    view := lastView
+	] ifFalse:[
+	    view := self viewFromId:viewId
+	].
     ].
 
     evType := evArray at:3.
 
     (self respondsTo:evType) ifTrue:[
-        arguments := evArray copyFrom:3 to:(3 + evType argumentCount - 1).
-        arguments at:1 put:view.
-
-        self perform:evType withArguments:arguments.
-        ^ true.
+	arguments := evArray copyFrom:3 to:(3 + evType argumentCount - 1).
+	arguments at:1 put:view.
+
+	self perform:evType withArguments:arguments.
+	^ true.
     ].
 
     '********** unhandled event:' errorPrintCR.
@@ -6203,18 +6203,18 @@
      If the argument aMask is nonNil, only events for this eventMask are
      handled.
      WARNING: this may block to wait for an event - you better check for a
-              pending event before calling this."
+	      pending event before calling this."
 
     |eventArray|
 
     eventArray := Array new:13.
 
     (self getEventFor:aViewIdOrNil withMask:eventMask into:eventArray) ifTrue:[
-        AbortOperationRequest handle:[:ex |
-            ex return
-        ] do:[
-            self dispatchEvent:eventArray.
-        ]
+	AbortOperationRequest handle:[:ex |
+	    ex return
+	] do:[
+	    self dispatchEvent:eventArray.
+	]
     ].
 
     "Modified: 19.8.1997 / 17:10:42 / cg"
@@ -6225,7 +6225,7 @@
      If the argument aViewIdOrNil is nil, events for any view are processed,
      otherwise only events for the view with given id are processed.
      WARNING: this may block to wait for an event - you better check for a
-              pending event before calling this."
+	      pending event before calling this."
 
     self dispatchEventFor:aViewIdOrNil withMask:(self eventMaskFor:#expose)
 
@@ -6236,10 +6236,10 @@
     preWaitAction := [self flush].
     Processor addPreWaitAction:preWaitAction.
     [
-        super dispatchLoop
+	super dispatchLoop
     ] ensure:[
-        Processor removePreWaitAction:preWaitAction.
-        preWaitAction := nil.
+	Processor removePreWaitAction:preWaitAction.
+	preWaitAction := nil.
     ].
 !
 
@@ -6257,26 +6257,26 @@
     |eventArray|
 
     dispatchingExpose notNil ifTrue:[
-        [self exposeEventPendingFor:dispatchingExpose withSync:false] whileTrue:[
-            self dispatchExposeEventFor:dispatchingExpose
-        ].
-        ^ self
+	[self exposeEventPendingFor:dispatchingExpose withSync:false] whileTrue:[
+	    self dispatchExposeEventFor:dispatchingExpose
+	].
+	^ self
     ].
 
     [self eventPendingWithSync:false] whileTrue:[
-        eventArray isNil ifTrue:[
-            eventArray := Array new:13.
-        ].
-        (self getEventFor:nil withMask:nil into:eventArray) ifTrue:[
-            AbortOperationRequest handle:[:ex |
-                ex return
-            ] do:[
-                self dispatchEvent:eventArray.
-                "/ multi-screen config: give others a chance
-                "/ (needed because we run at high (non-timesliced) prio)
-                Processor yield.
-            ]
-        ].
+	eventArray isNil ifTrue:[
+	    eventArray := Array new:13.
+	].
+	(self getEventFor:nil withMask:nil into:eventArray) ifTrue:[
+	    AbortOperationRequest handle:[:ex |
+		ex return
+	    ] do:[
+		self dispatchEvent:eventArray.
+		"/ multi-screen config: give others a chance
+		"/ (needed because we run at high (non-timesliced) prio)
+		Processor yield.
+	    ]
+	].
     ]
 
     "Modified: 19.8.1997 / 17:11:18 / cg"
@@ -6296,19 +6296,19 @@
 
     if (ISCONNECTED
      && __isSmallInteger(aMask)) {
-        Display *dpy = myDpy;
-
-        ENTER_XLIB();
-        if (__isExternalAddress(aWindowIdOrNil)) {
-            win = __WindowVal(aWindowIdOrNil);
-            while (XCheckWindowEvent(dpy, win, __intVal(aMask), &ev))
-                ;;
-        } else {
-            while (XCheckMaskEvent(dpy, __intVal(aMask), &ev))
-                ;;
-        }
-        LEAVE_XLIB();
-        RETURN ( self );
+	Display *dpy = myDpy;
+
+	ENTER_XLIB();
+	if (__isExternalAddress(aWindowIdOrNil)) {
+	    win = __WindowVal(aWindowIdOrNil);
+	    while (XCheckWindowEvent(dpy, win, __intVal(aMask), &ev))
+		;;
+	} else {
+	    while (XCheckMaskEvent(dpy, __intVal(aMask), &ev))
+		;;
+	}
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -6352,7 +6352,7 @@
     "/ (especially Win32 & Xlib)
 
     dispatchingExpose notNil ifTrue:[
-        ^ self exposeEventPendingFor:dispatchingExpose withSync:ConservativeSync
+	^ self exposeEventPendingFor:dispatchingExpose withSync:ConservativeSync
     ].
     ^ self eventPendingWithSync:ConservativeSync
 
@@ -6377,23 +6377,23 @@
     OBJ rslt = false;
 
     if (ISCONNECTED && __isSmallInteger(anEventMask)) {
-        Display *dpy = myDpy;
-
-        ENTER_XLIB();
-        if (doSync == true) {
-            XSync(dpy, 0);      /* make certain everything is flushed */
-        }
-        if (__isExternalAddress(aWindowIdOrNil)) {
-            win = __WindowVal(aWindowIdOrNil);
-            thereIsOne = XCheckWindowEvent(dpy, win, __intVal(anEventMask), &ev);
-        } else {
-            thereIsOne = XCheckMaskEvent(dpy, __intVal(anEventMask), &ev);
-        }
-        if (thereIsOne) {
-            XPutBackEvent(dpy, &ev);
-            rslt = true;
-        }
-        LEAVE_XLIB();
+	Display *dpy = myDpy;
+
+	ENTER_XLIB();
+	if (doSync == true) {
+	    XSync(dpy, 0);      /* make certain everything is flushed */
+	}
+	if (__isExternalAddress(aWindowIdOrNil)) {
+	    win = __WindowVal(aWindowIdOrNil);
+	    thereIsOne = XCheckWindowEvent(dpy, win, __intVal(anEventMask), &ev);
+	} else {
+	    thereIsOne = XCheckMaskEvent(dpy, __intVal(anEventMask), &ev);
+	}
+	if (thereIsOne) {
+	    XPutBackEvent(dpy, &ev);
+	    rslt = true;
+	}
+	LEAVE_XLIB();
     }
     RETURN ( rslt );
 %}
@@ -6409,20 +6409,20 @@
     OBJ rslt = false;
 
     if (ISCONNECTED) {
-        Display *dpy = myDpy;
-
-        if (XEventsQueued(dpy, QueuedAlready)) {
-            RETURN (true);
-        }
-
-        ENTER_XLIB();
-        if (doSync == true) {
-            XSync(dpy, 0);      /* make certain everything is flushed */
-        }
-        if (XEventsQueued(dpy, QueuedAfterFlush)) {
-            rslt = true;
-        }
-        LEAVE_XLIB();
+	Display *dpy = myDpy;
+
+	if (XEventsQueued(dpy, QueuedAlready)) {
+	    RETURN (true);
+	}
+
+	ENTER_XLIB();
+	if (doSync == true) {
+	    XSync(dpy, 0);      /* make certain everything is flushed */
+	}
+	if (XEventsQueued(dpy, QueuedAfterFlush)) {
+	    rslt = true;
+	}
+	LEAVE_XLIB();
     }
     RETURN ( rslt );
 %}
@@ -6432,7 +6432,7 @@
     "return true, if any event is queued"
 
     dispatchingExpose notNil ifTrue:[
-        ^ self exposeEventPendingFor:dispatchingExpose withSync:false
+	^ self exposeEventPendingFor:dispatchingExpose withSync:false
     ].
     ^ self eventQueuedAlready
 
@@ -6447,9 +6447,9 @@
 
 %{  /* UNLIMITEDSTACK */
     if (ISCONNECTED) {
-        if (XEventsQueued(myDpy, QueuedAlready)) {
-            RETURN(true);
-        }
+	if (XEventsQueued(myDpy, QueuedAlready)) {
+	    RETURN(true);
+	}
     }
     RETURN ( false );
 %}
@@ -6470,23 +6470,23 @@
     OBJ rslt = false;
 
     if (ISCONNECTED) {
-        Display *dpy = myDpy;
-
-        ENTER_XLIB();
-        if (doSync == true) {
-            XSync(dpy, 0);      /* make certain everything is flushed */
-        }
-        if (__isExternalAddress(aWindowIdOrNil)) {
-            win = __WindowVal(aWindowIdOrNil);
-            thereIsOne = XCheckWindowEvent(dpy, win, ExposureMask, &ev);
-        } else {
-            thereIsOne = XCheckMaskEvent(dpy, ExposureMask, &ev);
-        }
-        if (thereIsOne) {
-            XPutBackEvent(dpy, &ev);
-            rslt = true;
-        }
-        LEAVE_XLIB();
+	Display *dpy = myDpy;
+
+	ENTER_XLIB();
+	if (doSync == true) {
+	    XSync(dpy, 0);      /* make certain everything is flushed */
+	}
+	if (__isExternalAddress(aWindowIdOrNil)) {
+	    win = __WindowVal(aWindowIdOrNil);
+	    thereIsOne = XCheckWindowEvent(dpy, win, ExposureMask, &ev);
+	} else {
+	    thereIsOne = XCheckMaskEvent(dpy, ExposureMask, &ev);
+	}
+	if (thereIsOne) {
+	    XPutBackEvent(dpy, &ev);
+	    rslt = true;
+	}
+	LEAVE_XLIB();
     }
     RETURN ( rslt );
 %}
@@ -6502,11 +6502,11 @@
 
      The event fields are placed into anEventArray (must be at least size 13):
      the fields are:
-        1:      windowID
-        2:      eventType-ID
-        3:      eventTypeSymbol
-
-        4..     args
+	1:      windowID
+	2:      eventType-ID
+	3:      eventTypeSymbol
+
+	4..     args
 
      Sorry I had to split dispatch into this fetch method and a separate
      handler method to allow UNLIMITEDSTACK here.
@@ -6529,7 +6529,7 @@
     OBJ arg, sym, t, windowID;
 
     if (! ISCONNECTED) {
-        RETURN (false);
+	RETURN (false);
     }
 
     dpy = myDpy;
@@ -6537,39 +6537,39 @@
     ev.type = 0;
 
     if (__isSmallInteger(eventMask)) {
-        evMask = __intVal(eventMask);
+	evMask = __intVal(eventMask);
     } else {
-        evMask = ~0;
+	evMask = ~0;
     }
 
     if (__isExternalAddress(aViewIdOrNil)) {
-        wWanted = __WindowVal(aViewIdOrNil);
-        returnValue = XCheckWindowEvent(dpy, wWanted, evMask, &ev);
+	wWanted = __WindowVal(aViewIdOrNil);
+	returnValue = XCheckWindowEvent(dpy, wWanted, evMask, &ev);
     } else {
-        if (evMask == ~0) {
-            XNextEvent(dpy, &ev);
-            returnValue = 1;
-        } else {
-            returnValue = XCheckMaskEvent(dpy, evMask, &ev);
-        }
+	if (evMask == ~0) {
+	    XNextEvent(dpy, &ev);
+	    returnValue = 1;
+	} else {
+	    returnValue = XCheckMaskEvent(dpy, evMask, &ev);
+	}
     }
     if (!returnValue) {
-        /* there is no event */
-        RETURN (false);
+	/* there is no event */
+	RETURN (false);
     }
 
     if (anEventArray == nil) {
-        /* sender is not interested in the event */
-        RETURN(true);
+	/* sender is not interested in the event */
+	RETURN(true);
     }
 
     if (!__isArray(anEventArray)) {
-        console_fprintf(stderr, "XWorkstation: bad argument [%d]\n", __LINE__);
-        RETURN (false);
+	console_fprintf(stderr, "XWorkstation: bad argument [%d]\n", __LINE__);
+	RETURN (false);
     }
     if (__arraySize(anEventArray) < 11) {
-        console_fprintf(stderr, "XWorkstation: bad argument [%d]\n", __LINE__);
-        RETURN (false);
+	console_fprintf(stderr, "XWorkstation: bad argument [%d]\n", __LINE__);
+	RETURN (false);
     }
 
 #   define ANYBUTTON   (Button1MotionMask | Button2MotionMask | Button3MotionMask | Button4MotionMask | Button5MotionMask)
@@ -6596,374 +6596,374 @@
 #   define cme ((XColormapEvent *)&ev)
 
     if (((t = __INST(lastId)) != nil)
-         && __isExternalAddress(t)
-         && (__WindowVal(t) == ae->window)) {
-        windowID = t;
+	 && __isExternalAddress(t)
+	 && (__WindowVal(t) == ae->window)) {
+	windowID = t;
     } else {
-        windowID = __MKEXTERNALADDRESS(ae->window);
+	windowID = __MKEXTERNALADDRESS(ae->window);
     }
 
     __ArrayInstPtr(anEventArray)->a_element[0] = windowID; __STORE(anEventArray, windowID);
     __ArrayInstPtr(anEventArray)->a_element[1] = __MKSMALLINT(ev.type);
 
     switch (ev.type) {
-        case KeyRelease:
-            sym = @symbol(keyRelease:key:code:state:x:y:rootX:rootY:time:);
-            goto keyPressAndRelease;
-
-        case KeyPress:
-            sym = @symbol(keyPress:key:code:state:x:y:rootX:rootY:time:);
-            /* FALL INTO */
-
-        keyPressAndRelease:
-            arg = nil;
-            nchars = XLookupString(ke, (char *)buffer, sizeof(buffer), &keySym, NULL);
-            if (nchars == 1 && (((buffer[0] >= ' ') && (buffer[0] <= '~'))
-                || (buffer[0] >= 0x80))) {
-                arg = __MKCHARACTER(buffer[0]);
+	case KeyRelease:
+	    sym = @symbol(keyRelease:key:code:state:x:y:rootX:rootY:time:);
+	    goto keyPressAndRelease;
+
+	case KeyPress:
+	    sym = @symbol(keyPress:key:code:state:x:y:rootX:rootY:time:);
+	    /* FALL INTO */
+
+	keyPressAndRelease:
+	    arg = nil;
+	    nchars = XLookupString(ke, (char *)buffer, sizeof(buffer), &keySym, NULL);
+	    if (nchars == 1 && (((buffer[0] >= ' ') && (buffer[0] <= '~'))
+		|| (buffer[0] >= 0x80))) {
+		arg = __MKCHARACTER(buffer[0]);
 //            } else if (nchars > 2) {
 //                arg = __MKSTRING_L(buffer, nchars);
-            } else {
-                keySymString = XKeysymToString(keySym);
-                if (keySymString) {
-                    arg = __MKSYMBOL(keySymString, 0);
-                }
-            }
+	    } else {
+		keySymString = XKeysymToString(keySym);
+		if (keySymString) {
+		    arg = __MKSYMBOL(keySymString, 0);
+		}
+	    }
 
 #ifdef IGNORE_UNKNOWN_KEYCODES
-            if (arg == nil) {
-                /* happens sometimes (alt-graph on sun has no keysym) */
-                RETURN (false);
-            }
-#endif
-            __ArrayInstPtr(anEventArray)->a_element[2] = sym;
-
-            __ArrayInstPtr(anEventArray)->a_element[3] = arg; __STORE(anEventArray, arg);
-            t = __MKUINT(ke->keycode); __ArrayInstPtr(anEventArray)->a_element[4] = t; __STORE(anEventArray, t);
-            __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(ke->state);
-            __ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(ke->x);
-            __ArrayInstPtr(anEventArray)->a_element[7] = __mkSmallInteger(ke->y);
-            __ArrayInstPtr(anEventArray)->a_element[8] = __mkSmallInteger(ke->x_root);
-            __ArrayInstPtr(anEventArray)->a_element[9] = __mkSmallInteger(ke->y_root);
-            t = __MKUINT(ke->time); __ArrayInstPtr(anEventArray)->a_element[10] = t; __STORE(anEventArray, t);
-            break;
-
-        case ButtonPress:
-            sym = @symbol(buttonPress:button:state:x:y:rootX:rootY:time:);
-            goto buttonPressAndRelease;
-
-        case ButtonRelease:
-            sym = @symbol(buttonRelease:button:state:x:y:rootX:rootY:time:);
-            /* fall into */
-
-        buttonPressAndRelease:
-            __ArrayInstPtr(anEventArray)->a_element[2] = sym;
-            __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(be->button);
-            __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(ke->state);
-            __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(be->x);
-            __ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(be->y);
-            __ArrayInstPtr(anEventArray)->a_element[7] = __mkSmallInteger(be->x_root);
-            __ArrayInstPtr(anEventArray)->a_element[8] = __mkSmallInteger(be->y_root);
-            t = __MKUINT(be->time); __ArrayInstPtr(anEventArray)->a_element[9] = t; __STORE(anEventArray, t);
-            break;
-
-        case MotionNotify:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(buttonMotion:state:x:y:rootX:rootY:time:);
-
-            __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(me->state);
-            __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(me->x);
-            __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(me->y);
-            __ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(me->x_root);
-            __ArrayInstPtr(anEventArray)->a_element[7] = __mkSmallInteger(me->y_root);
-            t = __MKUINT(me->time); __ArrayInstPtr(anEventArray)->a_element[8] = t; __STORE(anEventArray, t);
-            break;
-
-        case FocusIn:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(focusIn:mode:detail:);
-            goto focusInOut;
-
-        case FocusOut:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(focusOut:mode:detail:);
-            /* fall into */
-
-        focusInOut:
-            __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(fe->mode);
-            __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(fe->detail);
-            break;
-
-        case EnterNotify:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(pointerEnter:x:y:rootX:rootY:state:mode:detail:time:);
-            goto enterLeave;
-
-        case LeaveNotify:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(pointerLeave:x:y:rootX:rootY:state:mode:detail:time:);
-            /* fall into */
-
-        enterLeave:
-            __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(ele->x);
-            __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(ele->y);
-            __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(ele->x_root);
-            __ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(ele->y_root);
-            __ArrayInstPtr(anEventArray)->a_element[7] = __mkSmallInteger(ele->state);
-            __ArrayInstPtr(anEventArray)->a_element[8] = __mkSmallInteger(ele->mode);
-            __ArrayInstPtr(anEventArray)->a_element[9] = __mkSmallInteger(ele->detail);
-            t = __MKUINT(ele->time); __ArrayInstPtr(anEventArray)->a_element[10] = t; __STORE(anEventArray, t);
-            break;
-
-        case Expose:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(expose:x:y:width:height:count:);
-            goto expose;
-
-        case GraphicsExpose:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(graphicsExpose:x:y:width:height:count:);
-            /* fall into */
-
-        expose:
-            __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(ee->x);
-            __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(ee->y);
-            __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(ee->width);
-            __ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(ee->height);
-            __ArrayInstPtr(anEventArray)->a_element[7] = __mkSmallInteger(ee->count);
-            break;
-
-        case NoExpose:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(noExposeView:);
-            break;
-
-        case VisibilityNotify:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(visibilityNotify:state:);
-            switch (ve->state) {
-                case VisibilityUnobscured:
-                    __ArrayInstPtr(anEventArray)->a_element[3] = @symbol(unobscured);
-                    break;
-                case VisibilityPartiallyObscured:
-                    __ArrayInstPtr(anEventArray)->a_element[3] = @symbol(partiallyObscured);
-                    break;
-                case VisibilityFullyObscured:
-                    __ArrayInstPtr(anEventArray)->a_element[3] = @symbol(fullyObscured);
-                    break;
-                default:
-                    __ArrayInstPtr(anEventArray)->a_element[3] = __MKSMALLINT(ve->state);
-                    break;
-            }
-            break;
-
-        case CreateNotify:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(createWindow:x:y:width:height:);
-            __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(cre->x);
-            __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(cre->y);
-            __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(cre->width);
-            __ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(cre->height);
-            break;
-
-        case DestroyNotify:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(destroyedView:);
-            break;
-
-        case UnmapNotify:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(unmappedView:);
-            break;
-
-        case MapNotify:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(mappedView:);
-            break;
-
-        case ConfigureNotify:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(configure:relativeTo:x:y:width:height:borderWidth:above:overrideRedirect:);
-            __ArrayInstPtr(anEventArray)->a_element[3] = nil;
-            __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(ce->x);
-            __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(ce->y);
-            __ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(ce->width);
-            __ArrayInstPtr(anEventArray)->a_element[7] = __mkSmallInteger(ce->height);
-            __ArrayInstPtr(anEventArray)->a_element[8] = __mkSmallInteger(ce->border_width);
-           __ArrayInstPtr(anEventArray)->a_element[9] = nil;
-            __ArrayInstPtr(anEventArray)->a_element[10] = ce->override_redirect ? true : false;
-            if (ce->event != None) {
-                t = __MKEXTERNALADDRESS(ce->event); __ArrayInstPtr(anEventArray)->a_element[3] = t; __STORE(anEventArray, t);
-            }
-            if (ce->above != None) {
-                t = __MKEXTERNALADDRESS(ce->above); __ArrayInstPtr(anEventArray)->a_element[9] = t; __STORE(anEventArray, t);
-            }
-            break;
-
-        case GravityNotify:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(gravityNotify:x:y:);
-            __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(gre->x);
-            __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(gre->y);
-            break;
-
-        case ResizeRequest:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(resizeRequest:width:height:);
-            __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(rr->width);
-            __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(rr->height);
-            break;
-
-        case ConfigureRequest:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(configureRequest:x:y:width:height:above:detail:);
-            __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(cr->x);
-            __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(cr->y);
-            __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(cr->width);
-            __ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(cr->height);
-            __ArrayInstPtr(anEventArray)->a_element[7] = nil;
-            if (cr->above != None) {
-                t = __MKEXTERNALADDRESS(cr->above); __ArrayInstPtr(anEventArray)->a_element[7] = t; __STORE(anEventArray, t);
-            }
-            switch (cr->detail) {
-                case Above:
-                    __ArrayInstPtr(anEventArray)->a_element[8] = @symbol(above);
-                    break;
-                case Below:
-                    __ArrayInstPtr(anEventArray)->a_element[8] = @symbol(below);
-                    break;
-                case TopIf:
-                    __ArrayInstPtr(anEventArray)->a_element[8] = @symbol(topIf);
-                    break;
-                case BottomIf:
-                    __ArrayInstPtr(anEventArray)->a_element[8] = @symbol(bottomIf);
-                    break;
-                case Opposite:
-                    __ArrayInstPtr(anEventArray)->a_element[8] = @symbol(opposite);
-                    break;
-                default:
-                    __ArrayInstPtr(anEventArray)->a_element[8] = __MKSMALLINT(cr->detail);
-                    break;
-            }
-            break;
-
-        case CirculateNotify:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(circulateNotify:place:);
-            goto circulate;
-
-        case CirculateRequest:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(circulateRequest:place:);
-            /* fall into */
-        circulate:
-            switch (cie->place) {
-                case PlaceOnTop:
-                    __ArrayInstPtr(anEventArray)->a_element[3] = @symbol(placeOnTop);
-                    break;
-                case PlaceOnBottom:
-                    __ArrayInstPtr(anEventArray)->a_element[3] = @symbol(placeOnBottom);
-                    break;
-                default:
-                    __ArrayInstPtr(anEventArray)->a_element[3] = __MKSMALLINT(cie->place);
-                    break;
-            }
-            break;
-
-        case PropertyNotify:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(propertyChange:property:state:time:);
-            __ArrayInstPtr(anEventArray)->a_element[3] = __MKATOMOBJ(pe->atom);
-            switch (pe->state) {
-                case PropertyNewValue:
-                    __ArrayInstPtr(anEventArray)->a_element[4] = @symbol(newValue);
-                    break;
-                case PropertyDelete:
-                    __ArrayInstPtr(anEventArray)->a_element[4] = @symbol(deleted);
-                    break;
-                default:
-                    __ArrayInstPtr(anEventArray)->a_element[4] = __MKSMALLINT(pe->state);
-                    break;
-            }
-            t = __MKUINT(pe->time); __ArrayInstPtr(anEventArray)->a_element[5] = t; __STORE(anEventArray, t);
-            break;
-
-        case SelectionClear:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(selectionClear:selection:time:);
-            __ArrayInstPtr(anEventArray)->a_element[3] = __MKATOMOBJ(sce->selection);
-            t = __MKUINT(sce->time); __ArrayInstPtr(anEventArray)->a_element[4] = t; __STORE(anEventArray, t);
-            break;
-
-        case SelectionRequest:
-            /*
-             * someone wants the selection
-             */
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(selectionRequest:requestor:selection:target:property:time:);
-            t = __MKEXTERNALADDRESS(ev.xselectionrequest.requestor); __ArrayInstPtr(anEventArray)->a_element[3] = t; __STORE(anEventArray, t);
-            __ArrayInstPtr(anEventArray)->a_element[4] = __MKATOMOBJ(ev.xselectionrequest.selection);
-            __ArrayInstPtr(anEventArray)->a_element[5] = __MKATOMOBJ(ev.xselectionrequest.target);
-            __ArrayInstPtr(anEventArray)->a_element[6] = __MKATOMOBJ(ev.xselectionrequest.property);
-            t = __MKUINT(ev.xselectionrequest.time); __ArrayInstPtr(anEventArray)->a_element[7] = t; __STORE(anEventArray, t);
-            break;
-
-        case SelectionNotify:
-            /*
-             * returned selection value (answer from SelectionRequest)
-             */
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(selectionNotify:selection:target:property:requestor:time:);
-            __ArrayInstPtr(anEventArray)->a_element[3] = __MKATOMOBJ(ev.xselection.selection);
-            __ArrayInstPtr(anEventArray)->a_element[4] = __MKATOMOBJ(ev.xselection.target);
-            __ArrayInstPtr(anEventArray)->a_element[5] = __MKATOMOBJ(ev.xselection.property);
-            t = __MKEXTERNALADDRESS(ev.xselection.requestor); __ArrayInstPtr(anEventArray)->a_element[6] = t; __STORE(anEventArray, t);
-            t = __MKUINT(ev.xselection.time); __ArrayInstPtr(anEventArray)->a_element[7] = t; __STORE(anEventArray, t);
-            break;
-
-        case ColormapNotify:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(colormapNotify:state:);
-            __ArrayInstPtr(anEventArray)->a_element[3] = cme->state == ColormapInstalled ? true : false;
-            break;
-
-        case ClientMessage:
-            if (ev.xclient.message_type == (int) __AtomVal(__INST(protocolsAtom))) {
-                if ((ev.xclient.data.l[0] == (int) __AtomVal(__INST(quitAppAtom)))
-                 || (ev.xclient.data.l[0] == (int) __AtomVal(__INST(deleteWindowAtom)))) {
-                    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(terminateView:);
-                    break;
-                }
-                if (ev.xclient.data.l[0] == (int) __AtomVal(__INST(saveYourselfAtom))) {
-                    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(saveAndTerminateView:);
-                    break;
-                }
-            }
-            /*
-             * any other client message
-             */
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(clientMessage:type:format:data:);
-            __ArrayInstPtr(anEventArray)->a_element[3] = __MKATOMOBJ(ev.xclient.message_type);
-            __ArrayInstPtr(anEventArray)->a_element[4] = __MKSMALLINT(ev.xclient.format);
-            t = __MKBYTEARRAY(&ev.xclient.data, sizeof(ev.xclient.data)); __ArrayInstPtr(anEventArray)->a_element[5] = t; __STORE(anEventArray, t);
-            break;
-
-        case MappingNotify:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(mappingNotify:request:event:);
-            switch(mape->request) {
-                case MappingModifier:
-                    arg = @symbol(mappingModifier);
-                    break;
-                case MappingKeyboard:
-                    arg = @symbol(mappingKeyboard);
-                    break;
-                case MappingPointer:
-                    arg = @symbol(mappingPointer);
-                    break;
-                default:
-                    arg = __MKSMALLINT(mape->request);
-                    break;
-            }
-            __ArrayInstPtr(anEventArray)->a_element[3] = arg;
-            t = __MKBYTEARRAY(&ev, sizeof(*mape)); __ArrayInstPtr(anEventArray)->a_element[4] = t;
-            __STORE(anEventArray, t);
-            break;
-
-        case KeymapNotify:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(keymapNotify:);
-            break;
-
-        case MapRequest:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(mapRequest:);
-            break;
-
-        case ReparentNotify:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(reparentedView:parentId:x:y:);
-            t = __MKEXTERNALADDRESS(rpe->parent);
-            __ArrayInstPtr(anEventArray)->a_element[3] = t; __STORE(anEventArray, t);
-            __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(rpe->x);
-            __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(rpe->y);
-            break;
-
-        default:
-            __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(unknownX11Event);
-            break;
+	    if (arg == nil) {
+		/* happens sometimes (alt-graph on sun has no keysym) */
+		RETURN (false);
+	    }
+#endif
+	    __ArrayInstPtr(anEventArray)->a_element[2] = sym;
+
+	    __ArrayInstPtr(anEventArray)->a_element[3] = arg; __STORE(anEventArray, arg);
+	    t = __MKUINT(ke->keycode); __ArrayInstPtr(anEventArray)->a_element[4] = t; __STORE(anEventArray, t);
+	    __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(ke->state);
+	    __ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(ke->x);
+	    __ArrayInstPtr(anEventArray)->a_element[7] = __mkSmallInteger(ke->y);
+	    __ArrayInstPtr(anEventArray)->a_element[8] = __mkSmallInteger(ke->x_root);
+	    __ArrayInstPtr(anEventArray)->a_element[9] = __mkSmallInteger(ke->y_root);
+	    t = __MKUINT(ke->time); __ArrayInstPtr(anEventArray)->a_element[10] = t; __STORE(anEventArray, t);
+	    break;
+
+	case ButtonPress:
+	    sym = @symbol(buttonPress:button:state:x:y:rootX:rootY:time:);
+	    goto buttonPressAndRelease;
+
+	case ButtonRelease:
+	    sym = @symbol(buttonRelease:button:state:x:y:rootX:rootY:time:);
+	    /* fall into */
+
+	buttonPressAndRelease:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = sym;
+	    __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(be->button);
+	    __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(ke->state);
+	    __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(be->x);
+	    __ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(be->y);
+	    __ArrayInstPtr(anEventArray)->a_element[7] = __mkSmallInteger(be->x_root);
+	    __ArrayInstPtr(anEventArray)->a_element[8] = __mkSmallInteger(be->y_root);
+	    t = __MKUINT(be->time); __ArrayInstPtr(anEventArray)->a_element[9] = t; __STORE(anEventArray, t);
+	    break;
+
+	case MotionNotify:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(buttonMotion:state:x:y:rootX:rootY:time:);
+
+	    __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(me->state);
+	    __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(me->x);
+	    __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(me->y);
+	    __ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(me->x_root);
+	    __ArrayInstPtr(anEventArray)->a_element[7] = __mkSmallInteger(me->y_root);
+	    t = __MKUINT(me->time); __ArrayInstPtr(anEventArray)->a_element[8] = t; __STORE(anEventArray, t);
+	    break;
+
+	case FocusIn:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(focusIn:mode:detail:);
+	    goto focusInOut;
+
+	case FocusOut:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(focusOut:mode:detail:);
+	    /* fall into */
+
+	focusInOut:
+	    __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(fe->mode);
+	    __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(fe->detail);
+	    break;
+
+	case EnterNotify:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(pointerEnter:x:y:rootX:rootY:state:mode:detail:time:);
+	    goto enterLeave;
+
+	case LeaveNotify:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(pointerLeave:x:y:rootX:rootY:state:mode:detail:time:);
+	    /* fall into */
+
+	enterLeave:
+	    __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(ele->x);
+	    __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(ele->y);
+	    __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(ele->x_root);
+	    __ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(ele->y_root);
+	    __ArrayInstPtr(anEventArray)->a_element[7] = __mkSmallInteger(ele->state);
+	    __ArrayInstPtr(anEventArray)->a_element[8] = __mkSmallInteger(ele->mode);
+	    __ArrayInstPtr(anEventArray)->a_element[9] = __mkSmallInteger(ele->detail);
+	    t = __MKUINT(ele->time); __ArrayInstPtr(anEventArray)->a_element[10] = t; __STORE(anEventArray, t);
+	    break;
+
+	case Expose:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(expose:x:y:width:height:count:);
+	    goto expose;
+
+	case GraphicsExpose:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(graphicsExpose:x:y:width:height:count:);
+	    /* fall into */
+
+	expose:
+	    __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(ee->x);
+	    __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(ee->y);
+	    __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(ee->width);
+	    __ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(ee->height);
+	    __ArrayInstPtr(anEventArray)->a_element[7] = __mkSmallInteger(ee->count);
+	    break;
+
+	case NoExpose:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(noExposeView:);
+	    break;
+
+	case VisibilityNotify:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(visibilityNotify:state:);
+	    switch (ve->state) {
+		case VisibilityUnobscured:
+		    __ArrayInstPtr(anEventArray)->a_element[3] = @symbol(unobscured);
+		    break;
+		case VisibilityPartiallyObscured:
+		    __ArrayInstPtr(anEventArray)->a_element[3] = @symbol(partiallyObscured);
+		    break;
+		case VisibilityFullyObscured:
+		    __ArrayInstPtr(anEventArray)->a_element[3] = @symbol(fullyObscured);
+		    break;
+		default:
+		    __ArrayInstPtr(anEventArray)->a_element[3] = __MKSMALLINT(ve->state);
+		    break;
+	    }
+	    break;
+
+	case CreateNotify:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(createWindow:x:y:width:height:);
+	    __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(cre->x);
+	    __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(cre->y);
+	    __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(cre->width);
+	    __ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(cre->height);
+	    break;
+
+	case DestroyNotify:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(destroyedView:);
+	    break;
+
+	case UnmapNotify:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(unmappedView:);
+	    break;
+
+	case MapNotify:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(mappedView:);
+	    break;
+
+	case ConfigureNotify:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(configure:relativeTo:x:y:width:height:borderWidth:above:overrideRedirect:);
+	    __ArrayInstPtr(anEventArray)->a_element[3] = nil;
+	    __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(ce->x);
+	    __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(ce->y);
+	    __ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(ce->width);
+	    __ArrayInstPtr(anEventArray)->a_element[7] = __mkSmallInteger(ce->height);
+	    __ArrayInstPtr(anEventArray)->a_element[8] = __mkSmallInteger(ce->border_width);
+	   __ArrayInstPtr(anEventArray)->a_element[9] = nil;
+	    __ArrayInstPtr(anEventArray)->a_element[10] = ce->override_redirect ? true : false;
+	    if (ce->event != None) {
+		t = __MKEXTERNALADDRESS(ce->event); __ArrayInstPtr(anEventArray)->a_element[3] = t; __STORE(anEventArray, t);
+	    }
+	    if (ce->above != None) {
+		t = __MKEXTERNALADDRESS(ce->above); __ArrayInstPtr(anEventArray)->a_element[9] = t; __STORE(anEventArray, t);
+	    }
+	    break;
+
+	case GravityNotify:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(gravityNotify:x:y:);
+	    __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(gre->x);
+	    __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(gre->y);
+	    break;
+
+	case ResizeRequest:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(resizeRequest:width:height:);
+	    __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(rr->width);
+	    __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(rr->height);
+	    break;
+
+	case ConfigureRequest:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(configureRequest:x:y:width:height:above:detail:);
+	    __ArrayInstPtr(anEventArray)->a_element[3] = __mkSmallInteger(cr->x);
+	    __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(cr->y);
+	    __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(cr->width);
+	    __ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(cr->height);
+	    __ArrayInstPtr(anEventArray)->a_element[7] = nil;
+	    if (cr->above != None) {
+		t = __MKEXTERNALADDRESS(cr->above); __ArrayInstPtr(anEventArray)->a_element[7] = t; __STORE(anEventArray, t);
+	    }
+	    switch (cr->detail) {
+		case Above:
+		    __ArrayInstPtr(anEventArray)->a_element[8] = @symbol(above);
+		    break;
+		case Below:
+		    __ArrayInstPtr(anEventArray)->a_element[8] = @symbol(below);
+		    break;
+		case TopIf:
+		    __ArrayInstPtr(anEventArray)->a_element[8] = @symbol(topIf);
+		    break;
+		case BottomIf:
+		    __ArrayInstPtr(anEventArray)->a_element[8] = @symbol(bottomIf);
+		    break;
+		case Opposite:
+		    __ArrayInstPtr(anEventArray)->a_element[8] = @symbol(opposite);
+		    break;
+		default:
+		    __ArrayInstPtr(anEventArray)->a_element[8] = __MKSMALLINT(cr->detail);
+		    break;
+	    }
+	    break;
+
+	case CirculateNotify:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(circulateNotify:place:);
+	    goto circulate;
+
+	case CirculateRequest:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(circulateRequest:place:);
+	    /* fall into */
+	circulate:
+	    switch (cie->place) {
+		case PlaceOnTop:
+		    __ArrayInstPtr(anEventArray)->a_element[3] = @symbol(placeOnTop);
+		    break;
+		case PlaceOnBottom:
+		    __ArrayInstPtr(anEventArray)->a_element[3] = @symbol(placeOnBottom);
+		    break;
+		default:
+		    __ArrayInstPtr(anEventArray)->a_element[3] = __MKSMALLINT(cie->place);
+		    break;
+	    }
+	    break;
+
+	case PropertyNotify:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(propertyChange:property:state:time:);
+	    __ArrayInstPtr(anEventArray)->a_element[3] = __MKATOMOBJ(pe->atom);
+	    switch (pe->state) {
+		case PropertyNewValue:
+		    __ArrayInstPtr(anEventArray)->a_element[4] = @symbol(newValue);
+		    break;
+		case PropertyDelete:
+		    __ArrayInstPtr(anEventArray)->a_element[4] = @symbol(deleted);
+		    break;
+		default:
+		    __ArrayInstPtr(anEventArray)->a_element[4] = __MKSMALLINT(pe->state);
+		    break;
+	    }
+	    t = __MKUINT(pe->time); __ArrayInstPtr(anEventArray)->a_element[5] = t; __STORE(anEventArray, t);
+	    break;
+
+	case SelectionClear:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(selectionClear:selection:time:);
+	    __ArrayInstPtr(anEventArray)->a_element[3] = __MKATOMOBJ(sce->selection);
+	    t = __MKUINT(sce->time); __ArrayInstPtr(anEventArray)->a_element[4] = t; __STORE(anEventArray, t);
+	    break;
+
+	case SelectionRequest:
+	    /*
+	     * someone wants the selection
+	     */
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(selectionRequest:requestor:selection:target:property:time:);
+	    t = __MKEXTERNALADDRESS(ev.xselectionrequest.requestor); __ArrayInstPtr(anEventArray)->a_element[3] = t; __STORE(anEventArray, t);
+	    __ArrayInstPtr(anEventArray)->a_element[4] = __MKATOMOBJ(ev.xselectionrequest.selection);
+	    __ArrayInstPtr(anEventArray)->a_element[5] = __MKATOMOBJ(ev.xselectionrequest.target);
+	    __ArrayInstPtr(anEventArray)->a_element[6] = __MKATOMOBJ(ev.xselectionrequest.property);
+	    t = __MKUINT(ev.xselectionrequest.time); __ArrayInstPtr(anEventArray)->a_element[7] = t; __STORE(anEventArray, t);
+	    break;
+
+	case SelectionNotify:
+	    /*
+	     * returned selection value (answer from SelectionRequest)
+	     */
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(selectionNotify:selection:target:property:requestor:time:);
+	    __ArrayInstPtr(anEventArray)->a_element[3] = __MKATOMOBJ(ev.xselection.selection);
+	    __ArrayInstPtr(anEventArray)->a_element[4] = __MKATOMOBJ(ev.xselection.target);
+	    __ArrayInstPtr(anEventArray)->a_element[5] = __MKATOMOBJ(ev.xselection.property);
+	    t = __MKEXTERNALADDRESS(ev.xselection.requestor); __ArrayInstPtr(anEventArray)->a_element[6] = t; __STORE(anEventArray, t);
+	    t = __MKUINT(ev.xselection.time); __ArrayInstPtr(anEventArray)->a_element[7] = t; __STORE(anEventArray, t);
+	    break;
+
+	case ColormapNotify:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(colormapNotify:state:);
+	    __ArrayInstPtr(anEventArray)->a_element[3] = cme->state == ColormapInstalled ? true : false;
+	    break;
+
+	case ClientMessage:
+	    if (ev.xclient.message_type == (int) __AtomVal(__INST(protocolsAtom))) {
+		if ((ev.xclient.data.l[0] == (int) __AtomVal(__INST(quitAppAtom)))
+		 || (ev.xclient.data.l[0] == (int) __AtomVal(__INST(deleteWindowAtom)))) {
+		    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(terminateView:);
+		    break;
+		}
+		if (ev.xclient.data.l[0] == (int) __AtomVal(__INST(saveYourselfAtom))) {
+		    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(saveAndTerminateView:);
+		    break;
+		}
+	    }
+	    /*
+	     * any other client message
+	     */
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(clientMessage:type:format:data:);
+	    __ArrayInstPtr(anEventArray)->a_element[3] = __MKATOMOBJ(ev.xclient.message_type);
+	    __ArrayInstPtr(anEventArray)->a_element[4] = __MKSMALLINT(ev.xclient.format);
+	    t = __MKBYTEARRAY(&ev.xclient.data, sizeof(ev.xclient.data)); __ArrayInstPtr(anEventArray)->a_element[5] = t; __STORE(anEventArray, t);
+	    break;
+
+	case MappingNotify:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(mappingNotify:request:event:);
+	    switch(mape->request) {
+		case MappingModifier:
+		    arg = @symbol(mappingModifier);
+		    break;
+		case MappingKeyboard:
+		    arg = @symbol(mappingKeyboard);
+		    break;
+		case MappingPointer:
+		    arg = @symbol(mappingPointer);
+		    break;
+		default:
+		    arg = __MKSMALLINT(mape->request);
+		    break;
+	    }
+	    __ArrayInstPtr(anEventArray)->a_element[3] = arg;
+	    t = __MKBYTEARRAY(&ev, sizeof(*mape)); __ArrayInstPtr(anEventArray)->a_element[4] = t;
+	    __STORE(anEventArray, t);
+	    break;
+
+	case KeymapNotify:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(keymapNotify:);
+	    break;
+
+	case MapRequest:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(mapRequest:);
+	    break;
+
+	case ReparentNotify:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(reparentedView:parentId:x:y:);
+	    t = __MKEXTERNALADDRESS(rpe->parent);
+	    __ArrayInstPtr(anEventArray)->a_element[3] = t; __STORE(anEventArray, t);
+	    __ArrayInstPtr(anEventArray)->a_element[4] = __mkSmallInteger(rpe->x);
+	    __ArrayInstPtr(anEventArray)->a_element[5] = __mkSmallInteger(rpe->y);
+	    break;
+
+	default:
+	    __ArrayInstPtr(anEventArray)->a_element[2] = @symbol(unknownX11Event);
+	    break;
     }
 #undef ae
 #undef ee
@@ -7033,20 +7033,20 @@
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)
      && __isSmallInteger(aMask)) {
-        mask = __intVal(aMask);
+	mask = __intVal(aMask);
 
 #ifdef OLD
-        /* these may not be disabled */
-        mask |= ExposureMask | StructureNotifyMask |
-                KeyPressMask | KeyReleaseMask |
-                EnterWindowMask | LeaveWindowMask |
-                ButtonPressMask | ButtonMotionMask | ButtonReleaseMask;
-#endif
-
-        ENTER_XLIB();
-        XSelectInput(myDpy, __WindowVal(aWindowId), mask);
-        LEAVE_XLIB();
-        RETURN ( self );
+	/* these may not be disabled */
+	mask |= ExposureMask | StructureNotifyMask |
+		KeyPressMask | KeyReleaseMask |
+		EnterWindowMask | LeaveWindowMask |
+		ButtonPressMask | ButtonMotionMask | ButtonReleaseMask;
+#endif
+
+	ENTER_XLIB();
+	XSelectInput(myDpy, __WindowVal(aWindowId), mask);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -7111,89 +7111,89 @@
      && (eventMask == nil || __isInteger(eventMask))
      && (__isExternalAddress(windowID) || __isInteger(windowID))
      && (__isExternalAddress(targetWindowID) || __isInteger(targetWindowID))) {
-        Display *dpy = myDpy;
-        XEvent ev;
-        Status result;
-        Window targetWindow;
-
-        if (__isInteger(d1)) {
-            ev.xclient.data.l[0] = __longIntVal(d1);
-        } else {
-            if (__isExternalAddress(d1)) {
-                ev.xclient.data.l[0] = (INT)__externalAddressVal(d1);
-            } else {
-                ev.xclient.data.l[0] = 0;
-            }
-        }
-        if (__isInteger(d2)) {
-            ev.xclient.data.l[1] = __longIntVal(d2);
-        } else {
-            if (__isExternalAddress(d2)) {
-                ev.xclient.data.l[1] = (INT)__externalAddressVal(d2);
-            } else {
-                ev.xclient.data.l[1] = 0;
-            }
-        }
-        if (__isInteger(d3)) {
-            ev.xclient.data.l[2] = __longIntVal(d3);
-        } else {
-            if (__isExternalAddress(d3)) {
-                ev.xclient.data.l[2] = (INT)__externalAddressVal(d3);
-            } else {
-                ev.xclient.data.l[2] = 0;
-            }
-        }
-        if (__isInteger(d4)) {
-            ev.xclient.data.l[3] = __longIntVal(d4);
-        } else {
-            if (__isExternalAddress(d4)) {
-                ev.xclient.data.l[3] = (INT)__externalAddressVal(d4);
-            } else {
-                ev.xclient.data.l[3] = 0;
-            }
-        }
-        if (__isInteger(d5)) {
-            ev.xclient.data.l[4] = __longIntVal(d5);
-        } else {
-            if (__isExternalAddress(d5)) {
-                ev.xclient.data.l[4] = (INT)__externalAddressVal(d5);
-            } else {
-                ev.xclient.data.l[4] = 0;
-            }
-        }
-
-        if (__isExternalAddress(windowID)) {
-            ev.xclient.window = __WindowVal(windowID);
-        } else {
-            ev.xclient.window = (Window)__longIntVal(windowID);
-        }
-
-        if (__isExternalAddress(targetWindowID)) {
-            targetWindow = __WindowVal(targetWindowID);
-        } else {
-            targetWindow = (Window)__longIntVal(targetWindowID);
-        }
-
-        ev.xclient.type              = ClientMessage;
-        ev.xclient.display           = dpy;
-        ev.xclient.message_type      = __longIntVal(msgType);
-        ev.xclient.format            = __longIntVal(msgFormat);
-
-        if (eventMask == nil) {
-            __eventMask = NoEventMask;
-        } else {
-            __eventMask = __longIntVal(eventMask);
-        }
-
-        ENTER_XLIB();
-        result = XSendEvent(dpy, targetWindow, (propagate == true ? True : False), __eventMask , &ev);
-        LEAVE_XLIB();
-
-        if ((result == BadValue) || (result == BadWindow)) {
-            DPRINTF(("bad status in sendClientEvent\n"));
-            RETURN ( false )
-        }
-        RETURN (true)
+	Display *dpy = myDpy;
+	XEvent ev;
+	Status result;
+	Window targetWindow;
+
+	if (__isInteger(d1)) {
+	    ev.xclient.data.l[0] = __longIntVal(d1);
+	} else {
+	    if (__isExternalAddress(d1)) {
+		ev.xclient.data.l[0] = (INT)__externalAddressVal(d1);
+	    } else {
+		ev.xclient.data.l[0] = 0;
+	    }
+	}
+	if (__isInteger(d2)) {
+	    ev.xclient.data.l[1] = __longIntVal(d2);
+	} else {
+	    if (__isExternalAddress(d2)) {
+		ev.xclient.data.l[1] = (INT)__externalAddressVal(d2);
+	    } else {
+		ev.xclient.data.l[1] = 0;
+	    }
+	}
+	if (__isInteger(d3)) {
+	    ev.xclient.data.l[2] = __longIntVal(d3);
+	} else {
+	    if (__isExternalAddress(d3)) {
+		ev.xclient.data.l[2] = (INT)__externalAddressVal(d3);
+	    } else {
+		ev.xclient.data.l[2] = 0;
+	    }
+	}
+	if (__isInteger(d4)) {
+	    ev.xclient.data.l[3] = __longIntVal(d4);
+	} else {
+	    if (__isExternalAddress(d4)) {
+		ev.xclient.data.l[3] = (INT)__externalAddressVal(d4);
+	    } else {
+		ev.xclient.data.l[3] = 0;
+	    }
+	}
+	if (__isInteger(d5)) {
+	    ev.xclient.data.l[4] = __longIntVal(d5);
+	} else {
+	    if (__isExternalAddress(d5)) {
+		ev.xclient.data.l[4] = (INT)__externalAddressVal(d5);
+	    } else {
+		ev.xclient.data.l[4] = 0;
+	    }
+	}
+
+	if (__isExternalAddress(windowID)) {
+	    ev.xclient.window = __WindowVal(windowID);
+	} else {
+	    ev.xclient.window = (Window)__longIntVal(windowID);
+	}
+
+	if (__isExternalAddress(targetWindowID)) {
+	    targetWindow = __WindowVal(targetWindowID);
+	} else {
+	    targetWindow = (Window)__longIntVal(targetWindowID);
+	}
+
+	ev.xclient.type              = ClientMessage;
+	ev.xclient.display           = dpy;
+	ev.xclient.message_type      = __longIntVal(msgType);
+	ev.xclient.format            = __longIntVal(msgFormat);
+
+	if (eventMask == nil) {
+	    __eventMask = NoEventMask;
+	} else {
+	    __eventMask = __longIntVal(eventMask);
+	}
+
+	ENTER_XLIB();
+	result = XSendEvent(dpy, targetWindow, (propagate == true ? True : False), __eventMask , &ev);
+	LEAVE_XLIB();
+
+	if ((result == BadValue) || (result == BadWindow)) {
+	    DPRINTF(("bad status in sendClientEvent\n"));
+	    RETURN ( false )
+	}
+	RETURN (true)
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -7202,9 +7202,9 @@
 
 sendKeyOrButtonEvent:typeSymbol x:xPos y:yPos keyOrButton:keySymCodeOrButtonNr state:stateMask toViewId:targetId
     ^ self
-        sendKeyOrButtonEvent:typeSymbol
-        x:xPos y:yPos keyOrButton:keySymCodeOrButtonNr state:stateMask
-        toViewId:targetId useXTest:false
+	sendKeyOrButtonEvent:typeSymbol
+	x:xPos y:yPos keyOrButton:keySymCodeOrButtonNr state:stateMask
+	toViewId:targetId useXTest:false
 !
 
 sendKeyOrButtonEvent:typeSymbol x:xPos y:yPos keyOrButton:keySymCodeOrButtonNr state:stateMask toViewId:targetId useXTest:useXTestBoolean
@@ -7223,120 +7223,120 @@
     int state;
 
     if (__isSmallInteger(stateMask)) {
-        state = __intVal(stateMask);
+	state = __intVal(stateMask);
     } else {
-        state = 0;
+	state = 0;
     }
 
     if (ISCONNECTED
      && __isSmallInteger(xPos) && __isSmallInteger(yPos)
      && (__isSmallInteger(keySymCodeOrButtonNr) || __isStringLike(keySymCodeOrButtonNr))
      && (__isExternalAddress(targetId) || __isInteger(targetId))) {
-        Display *dpy = myDpy;
-
-        XEvent ev;
-        Window target;
-        Status result;
-        KeySym keySym, *syms;
-        int screen = __intVal(__INST(screen));
-        int nSyms;
-        int isButtonEvent = 0, isKeyEvent = 0;
-
-        if ((typeSymbol == @symbol(keyPress))
-         || (typeSymbol == @symbol(keyRelease))) {
-            isKeyEvent = 1;
-            ev.xany.type = (typeSymbol == @symbol(keyPress))
-                                ? KeyPress : KeyRelease;
-            if (__isStringLike(keySymCodeOrButtonNr)) {
-                keySym = XStringToKeysym(__stringVal(keySymCodeOrButtonNr));
-            } else {
-                if (__isCharacter(keySymCodeOrButtonNr)) {
-                    char s[2];
-                    s[0] = __intVal(__characterVal(keySymCodeOrButtonNr));
-                    s[1] = '\0';
-                    keySym = XStringToKeysym(s);
-                } else {
-                    if (__isSmallInteger(keySymCodeOrButtonNr)) {
-                        keySym = (KeySym) __intVal(keySymCodeOrButtonNr);
-                    } else {
-                        goto notOk;
-                    }
-                }
-            }
-            ev.xkey.keycode = XKeysymToKeycode(dpy, keySym);
-
-            if (stateMask == nil) {
-                /*
-                 * get the modifier from the keySym
-                 */
-                nSyms = 0;
-                syms = XGetKeyboardMapping(dpy, ev.xkey.keycode, 1, &nSyms);
-                if (syms) {
-                    int i;
-
-                    for (i=0; i<nSyms; i++) {
-                        if (syms[i] == keySym) {
+	Display *dpy = myDpy;
+
+	XEvent ev;
+	Window target;
+	Status result;
+	KeySym keySym, *syms;
+	int screen = __intVal(__INST(screen));
+	int nSyms;
+	int isButtonEvent = 0, isKeyEvent = 0;
+
+	if ((typeSymbol == @symbol(keyPress))
+	 || (typeSymbol == @symbol(keyRelease))) {
+	    isKeyEvent = 1;
+	    ev.xany.type = (typeSymbol == @symbol(keyPress))
+				? KeyPress : KeyRelease;
+	    if (__isStringLike(keySymCodeOrButtonNr)) {
+		keySym = XStringToKeysym(__stringVal(keySymCodeOrButtonNr));
+	    } else {
+		if (__isCharacter(keySymCodeOrButtonNr)) {
+		    char s[2];
+		    s[0] = __intVal(__characterVal(keySymCodeOrButtonNr));
+		    s[1] = '\0';
+		    keySym = XStringToKeysym(s);
+		} else {
+		    if (__isSmallInteger(keySymCodeOrButtonNr)) {
+			keySym = (KeySym) __intVal(keySymCodeOrButtonNr);
+		    } else {
+			goto notOk;
+		    }
+		}
+	    }
+	    ev.xkey.keycode = XKeysymToKeycode(dpy, keySym);
+
+	    if (stateMask == nil) {
+		/*
+		 * get the modifier from the keySym
+		 */
+		nSyms = 0;
+		syms = XGetKeyboardMapping(dpy, ev.xkey.keycode, 1, &nSyms);
+		if (syms) {
+		    int i;
+
+		    for (i=0; i<nSyms; i++) {
+			if (syms[i] == keySym) {
 #ifdef MODIFIERDEBUG
-                            console_printf("modifier-index is %d\n", i);
-#endif
-                            if (i) state = (1 << (i-1));
-                            break;
-                        }
-                    }
-                    XFree(syms);
-                }
-            }
-        } else {
-            if ((typeSymbol == @symbol(buttonPress))
-             || (typeSymbol == @symbol(buttonRelease))) {
-                isButtonEvent = 1;
-                ev.xany.type = (typeSymbol == @symbol(buttonPress))
-                                ? ButtonPress : ButtonRelease;
-
-                if (__isSmallInteger(keySymCodeOrButtonNr)) {
-                    ev.xbutton.button = __intVal(keySymCodeOrButtonNr);
-                } else {
-                    ev.xbutton.button = 1;
-                }
-            } else {
-                DPRINTF(("invalid sendEvent typeSymbol\n"));
-                RETURN (false);
-            }
-        }
-
-        if (__isExternalAddress(targetId)) {
-            target = __WindowVal(targetId);
-        } else {
-            target = (Window) __longIntVal(targetId);
-        }
-        ev.xkey.window = target;
-        ev.xkey.same_screen = 1;
-        ev.xkey.subwindow = 0;
-        ev.xkey.root = RootWindow(dpy, screen);
-        ev.xkey.x = __intVal(xPos);
-        ev.xkey.y = __intVal(yPos);
-        ev.xkey.state = state;
-        ev.xkey.time = CurrentTime;
-
-        ENTER_XLIB();
+			    console_printf("modifier-index is %d\n", i);
+#endif
+			    if (i) state = (1 << (i-1));
+			    break;
+			}
+		    }
+		    XFree(syms);
+		}
+	    }
+	} else {
+	    if ((typeSymbol == @symbol(buttonPress))
+	     || (typeSymbol == @symbol(buttonRelease))) {
+		isButtonEvent = 1;
+		ev.xany.type = (typeSymbol == @symbol(buttonPress))
+				? ButtonPress : ButtonRelease;
+
+		if (__isSmallInteger(keySymCodeOrButtonNr)) {
+		    ev.xbutton.button = __intVal(keySymCodeOrButtonNr);
+		} else {
+		    ev.xbutton.button = 1;
+		}
+	    } else {
+		DPRINTF(("invalid sendEvent typeSymbol\n"));
+		RETURN (false);
+	    }
+	}
+
+	if (__isExternalAddress(targetId)) {
+	    target = __WindowVal(targetId);
+	} else {
+	    target = (Window) __longIntVal(targetId);
+	}
+	ev.xkey.window = target;
+	ev.xkey.same_screen = 1;
+	ev.xkey.subwindow = 0;
+	ev.xkey.root = RootWindow(dpy, screen);
+	ev.xkey.x = __intVal(xPos);
+	ev.xkey.y = __intVal(yPos);
+	ev.xkey.state = state;
+	ev.xkey.time = CurrentTime;
+
+	ENTER_XLIB();
 #ifdef XTEST
-        if (useXTestBoolean == true) {
-            if (isButtonEvent) {
-                XTestFakeButtonEvent(dpy, ev.xbutton.button, ev.xany.type == ButtonPress, CurrentTime);
-            } else {
-                XTestFakeKeyEvent(dpy, ev.xkey.keycode, ev.xany.type == KeyPress, CurrentTime);
-            }
-        } else
-#endif
-        {
-            result = XSendEvent(dpy, target, False, 0 , &ev);
-        }
-        LEAVE_XLIB();
-        if ((result == BadValue) || (result == BadWindow)) {
-            DPRINTF(("bad status\n"));
-            RETURN ( false )
-        }
-        RETURN (true)
+	if (useXTestBoolean == true) {
+	    if (isButtonEvent) {
+		XTestFakeButtonEvent(dpy, ev.xbutton.button, ev.xany.type == ButtonPress, CurrentTime);
+	    } else {
+		XTestFakeKeyEvent(dpy, ev.xkey.keycode, ev.xany.type == KeyPress, CurrentTime);
+	    }
+	} else
+#endif
+	{
+	    result = XSendEvent(dpy, target, False, 0 , &ev);
+	}
+	LEAVE_XLIB();
+	if ((result == BadValue) || (result == BadWindow)) {
+	    DPRINTF(("bad status\n"));
+	    RETURN ( false )
+	}
+	RETURN (true)
     }
   notOk: ;
 %}.
@@ -7353,62 +7353,62 @@
 
      "/ CTRL-c
      v device
-         sendKeyOrButtonEvent:#keyPress
-         x:10 y:10
-         keyOrButton:#'Control'
-         state:(v device ctrlModifierMask)
-         toViewId: v id.
+	 sendKeyOrButtonEvent:#keyPress
+	 x:10 y:10
+	 keyOrButton:#'Control'
+	 state:(v device ctrlModifierMask)
+	 toViewId: v id.
 
      v device
-         sendKeyOrButtonEvent:#keyPress
-         x:10 y:10
-         keyOrButton:'c'
-         state:(v device ctrlModifierMask)
-         toViewId: v id.
+	 sendKeyOrButtonEvent:#keyPress
+	 x:10 y:10
+	 keyOrButton:'c'
+	 state:(v device ctrlModifierMask)
+	 toViewId: v id.
 
      v device
-         sendKeyOrButtonEvent:#keyRelease
-         x:10 y:10
-         keyOrButton:'c'
-         state:(v device ctrlModifierMask)
-         toViewId: v id.
+	 sendKeyOrButtonEvent:#keyRelease
+	 x:10 y:10
+	 keyOrButton:'c'
+	 state:(v device ctrlModifierMask)
+	 toViewId: v id.
 
      v device
-         sendKeyOrButtonEvent:#keyRelease
-         x:10 y:10
-         keyOrButton:#'Control'
-         state:0
-         toViewId: v id.
+	 sendKeyOrButtonEvent:#keyRelease
+	 x:10 y:10
+	 keyOrButton:#'Control'
+	 state:0
+	 toViewId: v id.
 
      "/ CTRL-v
 
      v device
-         sendKeyOrButtonEvent:#keyPress
-         x:10 y:10
-         keyOrButton:#'Control'
-         state:(v device ctrlModifierMask)
-         toViewId: v id.
+	 sendKeyOrButtonEvent:#keyPress
+	 x:10 y:10
+	 keyOrButton:#'Control'
+	 state:(v device ctrlModifierMask)
+	 toViewId: v id.
 
      v device
-         sendKeyOrButtonEvent:#keyPress
-         x:10 y:10
-         keyOrButton:'v'
-         state:(v device ctrlModifierMask)
-         toViewId: v id.
+	 sendKeyOrButtonEvent:#keyPress
+	 x:10 y:10
+	 keyOrButton:'v'
+	 state:(v device ctrlModifierMask)
+	 toViewId: v id.
 
      v device
-         sendKeyOrButtonEvent:#keyRelease
-         x:10 y:10
-         keyOrButton:'v'
-         state:(v device ctrlModifierMask)
-         toViewId: v id.
+	 sendKeyOrButtonEvent:#keyRelease
+	 x:10 y:10
+	 keyOrButton:'v'
+	 state:(v device ctrlModifierMask)
+	 toViewId: v id.
 
      v device
-         sendKeyOrButtonEvent:#keyRelease
-         x:10 y:10
-         keyOrButton:#'Control'
-         state:0
-         toViewId: v id.
+	 sendKeyOrButtonEvent:#keyRelease
+	 x:10 y:10
+	 keyOrButton:#'Control'
+	 state:0
+	 toViewId: v id.
 END"
 ! !
 
@@ -7429,15 +7429,15 @@
     if (ISCONNECTED
      && __isStringLike(aFontName)) {
 
-        ENTER_XLIB();
-        newFont = XLoadQueryFont(myDpy, (char *)__stringVal(aFontName));
-        LEAVE_XLIB();
+	ENTER_XLIB();
+	newFont = XLoadQueryFont(myDpy, (char *)__stringVal(aFontName));
+	LEAVE_XLIB();
 #ifdef COUNT_RESOURCES
-        if (newFont)
-            __cnt_font++;
-#endif
-
-        RETURN ( newFont ? __MKEXTERNALADDRESS(newFont) : nil );
+	if (newFont)
+	    __cnt_font++;
+#endif
+
+	RETURN ( newFont ? __MKEXTERNALADDRESS(newFont) : nil );
     }
 %}.
     "/ --- disabled due to UNLIMITEDSTACK -- self primitiveFailedOrClosedConnection.
@@ -7457,38 +7457,38 @@
     aString isNil ifTrue:[^ false].
     fields := aString asCollectionOfSubstringsSeparatedBy:$-.
     fields size == 3 ifTrue:[
-        "take care of old font names: family-style-size"
-        family := fields at:1.
-        style := fields at:2.
-        size := Number readFromString:(fields at:3) onError:[^ false].
+	"take care of old font names: family-style-size"
+	family := fields at:1.
+	style := fields at:2.
+	size := Number readFromString:(fields at:3) onError:[^ false].
     ] ifFalse:[fields size == 2 ifTrue:[
-        "take care of old font names: family-size"
-        family := fields at:1.
-        size := Number readFromString:(fields at:2) onError:[^ false].
+	"take care of old font names: family-size"
+	family := fields at:1.
+	size := Number readFromString:(fields at:2) onError:[^ false].
     ] ifFalse:[fields size >= 15 ifTrue:[
-        family := fields at:3.
-        face := fields at:4.
-        style := fields at:5.
-        style = 'o' ifTrue:[
-            style := 'oblique'
-        ] ifFalse:[style = 'i' ifTrue:[
-             style := 'italic'
-        ] ifFalse:[style = 'r' ifTrue:[
-             style := 'roman'
-        ]]].
-        moreStyle := fields at:6.
-        (moreStyle ~= 'normal' and:[moreStyle size > 1]) ifTrue:[
-            style := style, '-', moreStyle.
-        ].
-        fheight := fields at:8.
-        size := (Number readFromString:(fields at:9) onError:[^ false]) / 10.
-        resX := fields at:10.
-        resY := fields at:11.
-        registry := fields at:14.
-        encoding := fields at:15.
-        coding := registry , '-' , encoding.
+	family := fields at:3.
+	face := fields at:4.
+	style := fields at:5.
+	style = 'o' ifTrue:[
+	    style := 'oblique'
+	] ifFalse:[style = 'i' ifTrue:[
+	     style := 'italic'
+	] ifFalse:[style = 'r' ifTrue:[
+	     style := 'roman'
+	]]].
+	moreStyle := fields at:6.
+	(moreStyle ~= 'normal' and:[moreStyle size > 1]) ifTrue:[
+	    style := style, '-', moreStyle.
+	].
+	fheight := fields at:8.
+	size := (Number readFromString:(fields at:9) onError:[^ false]) / 10.
+	resX := fields at:10.
+	resY := fields at:11.
+	registry := fields at:14.
+	encoding := fields at:15.
+	coding := registry , '-' , encoding.
     ] ifFalse:[
-        ^ false
+	^ false
     ]]].
     aBlock value:family value:face value:style value:size value:coding.
     ^ true
@@ -7533,166 +7533,166 @@
     OBJ *resultArray;
 
     if (ISCONNECTED
-         && __bothSmallInteger(index1, index2)
-         && __isExternalAddress(aFontId)
-         && __isNonNilObject(aString)) {
-        int lMax = __intVal(@global(MaxStringLength));
-        f = __FontVal(aFontId);
-        if (! f) goto fail;
-
-        if (__isArray(anArray) && __arraySize(anArray) > 0) {
-            resultArray = __arrayVal(anArray);
-        } else {
-            resultArray = 0;
-        }
-
-        i1 = __intVal(index1) - 1;
-
-        if (i1 >= 0) {
-            OBJ cls;
-
-            i2 = __intVal(index2) - 1;
-            if (i2 < i1) {
-                RETURN ( __MKSMALLINT(0) );
-            }
-
-            cp = (char *) __stringVal(aString);
-            l = i2 - i1 + 1;
-
-            if (__isStringLike(aString)) {
-                n = __stringSize(aString);
-                if (i2 >= n) goto fail;
-                cp += i1;
-                len = XTextExtents(f, cp, l,
-                                        &directionReturn, &fontAscentReturn, &fontDescentReturn,
-                                        &overAllReturn);
-            } else {
-                cls = __qClass(aString);
-                nInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
-                cp += nInstBytes;
-                n = __byteArraySize(aString) - nInstBytes;
-
-                if (__isBytes(aString)) {
-                    if (i2 >= n) goto fail;
-
-                    cp += i1;
-                    len = XTextExtents(f, cp, l,
-                                            &directionReturn, &fontAscentReturn, &fontDescentReturn,
-                                            &overAllReturn);
-                } else  if (__isWords(aString)) { /* TWOBYTESTRINGS */
-                    union {
-                        char b[2];
-                        unsigned short s;
-                    } u;
-                    int i;
-                    XChar2b *cp2 = (XChar2b *)0;
-                    int mustFree = 0;
-
-                    n = n / 2;
-                    if (i2 >= n) goto fail;
-
-                    cp += (i1 * 2);
-                    if (l > lMax) l = lMax;
-
-                    /*
-                     * ST/X TwoByteStrings store the asciiValue in native byteOrder;
-                     * X expects them MSB first
-                     * convert as required
-                     */
-
-                    u.s = 0x1234;
-                    if (u.b[0] != 0x12) {
-                        if (l <= NLOCALBUFFER) {
-                            cp2 = xlatebuffer;
-                        } else {
-                            cp2 = (XChar2b *)(malloc(l * 2));
-                            mustFree = 1;
-                        }
-                        for (i=0; i<l; i++) {
-                            cp2[i].byte1 = (((XChar2b *)cp)[i]).byte2;
-                            cp2[i].byte2 = (((XChar2b *)cp)[i]).byte1;
-                        }
-                        cp = (char *) cp2;
-                    }
-
-                    len = XTextExtents16(f, (XChar2b *)cp, l,
-                                            &directionReturn, &fontAscentReturn, &fontDescentReturn,
-                                            &overAllReturn);
-
-                    if (mustFree) {
-                        free(cp2);
-                    }
-                } else if (__isLongs(aString)) { /* FOURBYTESTRINGS */
-                    union {
-                        char b[2];
-                        unsigned short s;
-                    } u;
-                    int i;
-                    XChar2b *cp2 = (XChar2b *)0;
-                    int mustFree = 0;
-
-                    n = n / 4;
-                    if (i2 >= n) goto fail;
-
-                    cp += (i1 * 4);
-                    if (l > lMax) l = lMax;
-
-                    /*
-                     * For now: X does not support 32bit characters without the new 32Unicode extensions.
-                     * For now, treat chars above 0xFFFF as 0xFFFF (should we use default-char ?).
-                     */
-                    if (l <= NLOCALBUFFER) {
-                        cp2 = xlatebuffer;
-                    } else {
-                        cp2 = (XChar2b *)(malloc(l * 2));
-                        mustFree = 1;
-                    }
-                    for (i=0; i<l; i++) {
-                        int codePoint;
-
-                        codePoint = ((unsigned int32 *)cp)[i];
-                        if (codePoint > 0xFFFF) {
-                            codePoint = 0xFFFF;
-                        }
-                        cp2[i].byte1 = codePoint & 0xFF;
-                        cp2[i].byte2 = (codePoint >> 8) & 0xFF;;
-                    }
-                    cp = (char *) cp2;
-
-                    len = XTextExtents16(f, (XChar2b *)cp, l,
-                                            &directionReturn, &fontAscentReturn, &fontDescentReturn,
-                                            &overAllReturn);
-                    if (mustFree) {
-                        free(cp2);
-                    }
-                } else
-                    goto fail;      /*unknown string class */
-            }
-            if (resultArray) {
-                switch (__arraySize(anArray)) {
-                default:
-                case 8:
-                    resultArray[7] = __MKSMALLINT(directionReturn);
-                case 7:
-                    resultArray[6] = __MKSMALLINT(fontDescentReturn);
-                case 6:
-                    resultArray[5] = __MKSMALLINT(fontAscentReturn);
-                case 5:
-                    resultArray[4] = __MKSMALLINT(overAllReturn.descent);
-                case 4:
-                    resultArray[3] = __MKSMALLINT(overAllReturn.ascent);
-                case 3:
-                    resultArray[2] = __MKSMALLINT(overAllReturn.width);
-                case 2:
-                    resultArray[1] = __MKSMALLINT(overAllReturn.rbearing);
-                case 1:
-                    resultArray[0] = __MKSMALLINT(overAllReturn.lbearing);
-                case 0:
-                    break;
-                }
-            }
-            RETURN ( __MKSMALLINT(overAllReturn.width) );
-        }
+	 && __bothSmallInteger(index1, index2)
+	 && __isExternalAddress(aFontId)
+	 && __isNonNilObject(aString)) {
+	int lMax = __intVal(@global(MaxStringLength));
+	f = __FontVal(aFontId);
+	if (! f) goto fail;
+
+	if (__isArray(anArray) && __arraySize(anArray) > 0) {
+	    resultArray = __arrayVal(anArray);
+	} else {
+	    resultArray = 0;
+	}
+
+	i1 = __intVal(index1) - 1;
+
+	if (i1 >= 0) {
+	    OBJ cls;
+
+	    i2 = __intVal(index2) - 1;
+	    if (i2 < i1) {
+		RETURN ( __MKSMALLINT(0) );
+	    }
+
+	    cp = (char *) __stringVal(aString);
+	    l = i2 - i1 + 1;
+
+	    if (__isStringLike(aString)) {
+		n = __stringSize(aString);
+		if (i2 >= n) goto fail;
+		cp += i1;
+		len = XTextExtents(f, cp, l,
+					&directionReturn, &fontAscentReturn, &fontDescentReturn,
+					&overAllReturn);
+	    } else {
+		cls = __qClass(aString);
+		nInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
+		cp += nInstBytes;
+		n = __byteArraySize(aString) - nInstBytes;
+
+		if (__isBytes(aString)) {
+		    if (i2 >= n) goto fail;
+
+		    cp += i1;
+		    len = XTextExtents(f, cp, l,
+					    &directionReturn, &fontAscentReturn, &fontDescentReturn,
+					    &overAllReturn);
+		} else  if (__isWords(aString)) { /* TWOBYTESTRINGS */
+		    union {
+			char b[2];
+			unsigned short s;
+		    } u;
+		    int i;
+		    XChar2b *cp2 = (XChar2b *)0;
+		    int mustFree = 0;
+
+		    n = n / 2;
+		    if (i2 >= n) goto fail;
+
+		    cp += (i1 * 2);
+		    if (l > lMax) l = lMax;
+
+		    /*
+		     * ST/X TwoByteStrings store the asciiValue in native byteOrder;
+		     * X expects them MSB first
+		     * convert as required
+		     */
+
+		    u.s = 0x1234;
+		    if (u.b[0] != 0x12) {
+			if (l <= NLOCALBUFFER) {
+			    cp2 = xlatebuffer;
+			} else {
+			    cp2 = (XChar2b *)(malloc(l * 2));
+			    mustFree = 1;
+			}
+			for (i=0; i<l; i++) {
+			    cp2[i].byte1 = (((XChar2b *)cp)[i]).byte2;
+			    cp2[i].byte2 = (((XChar2b *)cp)[i]).byte1;
+			}
+			cp = (char *) cp2;
+		    }
+
+		    len = XTextExtents16(f, (XChar2b *)cp, l,
+					    &directionReturn, &fontAscentReturn, &fontDescentReturn,
+					    &overAllReturn);
+
+		    if (mustFree) {
+			free(cp2);
+		    }
+		} else if (__isLongs(aString)) { /* FOURBYTESTRINGS */
+		    union {
+			char b[2];
+			unsigned short s;
+		    } u;
+		    int i;
+		    XChar2b *cp2 = (XChar2b *)0;
+		    int mustFree = 0;
+
+		    n = n / 4;
+		    if (i2 >= n) goto fail;
+
+		    cp += (i1 * 4);
+		    if (l > lMax) l = lMax;
+
+		    /*
+		     * For now: X does not support 32bit characters without the new 32Unicode extensions.
+		     * For now, treat chars above 0xFFFF as 0xFFFF (should we use default-char ?).
+		     */
+		    if (l <= NLOCALBUFFER) {
+			cp2 = xlatebuffer;
+		    } else {
+			cp2 = (XChar2b *)(malloc(l * 2));
+			mustFree = 1;
+		    }
+		    for (i=0; i<l; i++) {
+			int codePoint;
+
+			codePoint = ((unsigned int32 *)cp)[i];
+			if (codePoint > 0xFFFF) {
+			    codePoint = 0xFFFF;
+			}
+			cp2[i].byte1 = codePoint & 0xFF;
+			cp2[i].byte2 = (codePoint >> 8) & 0xFF;;
+		    }
+		    cp = (char *) cp2;
+
+		    len = XTextExtents16(f, (XChar2b *)cp, l,
+					    &directionReturn, &fontAscentReturn, &fontDescentReturn,
+					    &overAllReturn);
+		    if (mustFree) {
+			free(cp2);
+		    }
+		} else
+		    goto fail;      /*unknown string class */
+	    }
+	    if (resultArray) {
+		switch (__arraySize(anArray)) {
+		default:
+		case 8:
+		    resultArray[7] = __MKSMALLINT(directionReturn);
+		case 7:
+		    resultArray[6] = __MKSMALLINT(fontDescentReturn);
+		case 6:
+		    resultArray[5] = __MKSMALLINT(fontAscentReturn);
+		case 5:
+		    resultArray[4] = __MKSMALLINT(overAllReturn.descent);
+		case 4:
+		    resultArray[3] = __MKSMALLINT(overAllReturn.ascent);
+		case 3:
+		    resultArray[2] = __MKSMALLINT(overAllReturn.width);
+		case 2:
+		    resultArray[1] = __MKSMALLINT(overAllReturn.rbearing);
+		case 1:
+		    resultArray[0] = __MKSMALLINT(overAllReturn.lbearing);
+		case 0:
+		    break;
+		}
+	    }
+	    RETURN ( __MKSMALLINT(overAllReturn.width) );
+	}
     }
 #undef NLOCALBUFFER
 fail: ;
@@ -7704,17 +7704,17 @@
       |result|
       result := Array new:8.
       Screen current
-        extentsOf:'hello World' from:1 to:11
-        inFont:(Screen current  getFontWithFoundry:'*'
-                    family:'courier new'
-                    weight:'medium'
-                    slant:'r'
-                    spacing:nil
-                    pixelSize:nil
-                    size:10
-                    encoding:#'iso10646-1'
-            )
-        into:result.
+	extentsOf:'hello World' from:1 to:11
+	inFont:(Screen current  getFontWithFoundry:'*'
+		    family:'courier new'
+		    weight:'medium'
+		    slant:'r'
+		    spacing:nil
+		    pixelSize:nil
+		    size:10
+		    encoding:#'iso10646-1'
+	    )
+	into:result.
 
       result
     "
@@ -7729,35 +7729,35 @@
     |enc charSets|
 
     (registry size ~~ 0) ifTrue:[
-        enc := registry asLowercase.
-        encoding size ~~ 0 ifTrue:[
-           enc := enc, '-', encoding asLowercase.
-        ].
-        enc := enc asSymbol.
+	enc := registry asLowercase.
+	encoding size ~~ 0 ifTrue:[
+	   enc := enc, '-', encoding asLowercase.
+	].
+	enc := enc asSymbol.
     ] ifFalse:[
-        (encoding size ~~ 0) ifTrue:[
-            enc := encoding asLowercase asSymbol
-        ] ifFalse:[
-            charSets := charSetCollections.
-            (charSets notEmptyOrNil) ifTrue:[
-                charSets := charSets asUppercase asCollectionOfWords.
-                (charSets includes:'ISO8859-1') ifTrue:[
-                    enc := #'iso8859-1'
-                ] ifFalse:[
-                    (charSets includes:'ISO8859') ifTrue:[
-                        enc := #iso8859
-                    ] ifFalse:[
-                        (charSets includes:'ASCII') ifTrue:[
-                            enc := #ascii
-                        ] ifFalse:[
-                            (charSets includes:'ADOBE-STANDARD') ifTrue:[
-                                enc := #iso8859
-                            ]
-                        ]
-                    ]
-                ]
-            ]
-        ]
+	(encoding size ~~ 0) ifTrue:[
+	    enc := encoding asLowercase asSymbol
+	] ifFalse:[
+	    charSets := charSetCollections.
+	    (charSets notEmptyOrNil) ifTrue:[
+		charSets := charSets asUppercase asCollectionOfWords.
+		(charSets includes:'ISO8859-1') ifTrue:[
+		    enc := #'iso8859-1'
+		] ifFalse:[
+		    (charSets includes:'ISO8859') ifTrue:[
+			enc := #iso8859
+		    ] ifFalse:[
+			(charSets includes:'ASCII') ifTrue:[
+			    enc := #ascii
+			] ifFalse:[
+			    (charSets includes:'ADOBE-STANDARD') ifTrue:[
+				enc := #iso8859
+			    ]
+			]
+		    ]
+		]
+	    ]
+	]
     ].
     ^  enc
 
@@ -7771,7 +7771,7 @@
 
     listOfXFonts := nil.
     XftFontDescription notNil ifTrue:[
-        XftFontDescription flushListOfAvailableFonts.
+	XftFontDescription flushListOfAvailableFonts.
     ].
 
     "
@@ -7796,47 +7796,47 @@
     aFontNameString isNil ifTrue:[^ nil].
 
     Error handle:[:ex |
-        family := nil.
+	family := nil.
     ] do:[
-        fields := aFontNameString asCollectionOfSubstringsSeparatedBy:$-.
-        fields size == 3 ifTrue:[
-            "take care of old font names: family-style-size"
-            family := fields at:1.
-            style := fields at:2.
-            size := Number readFromString:(fields at:3).
-        ] ifFalse:[
-            fields size == 2 ifTrue:[
-                "take care of old font names: family-size"
-                family := fields at:1.
-                size := Number readFromString:(fields at:2).
-            ] ifFalse:[
-                fields size >= 15 ifTrue:[
-                    family := fields at:3.
-                    face := fields at:4.
-                    style := fields at:5.
-                    style = 'o' ifTrue:[
-                        style := 'oblique'
-                    ] ifFalse:[style = 'i' ifTrue:[
-                         style := 'italic'
-                    ] ifFalse:[style = 'r' ifTrue:[
-                         style := 'roman'
-                    ]]].
-                    moreStyle := fields at:6.
-                    (moreStyle ~= 'normal' and:[moreStyle size > 1]) ifTrue:[
-                        style := style, '-', moreStyle.
-                    ].
+	fields := aFontNameString asCollectionOfSubstringsSeparatedBy:$-.
+	fields size == 3 ifTrue:[
+	    "take care of old font names: family-style-size"
+	    family := fields at:1.
+	    style := fields at:2.
+	    size := Number readFromString:(fields at:3).
+	] ifFalse:[
+	    fields size == 2 ifTrue:[
+		"take care of old font names: family-size"
+		family := fields at:1.
+		size := Number readFromString:(fields at:2).
+	    ] ifFalse:[
+		fields size >= 15 ifTrue:[
+		    family := fields at:3.
+		    face := fields at:4.
+		    style := fields at:5.
+		    style = 'o' ifTrue:[
+			style := 'oblique'
+		    ] ifFalse:[style = 'i' ifTrue:[
+			 style := 'italic'
+		    ] ifFalse:[style = 'r' ifTrue:[
+			 style := 'roman'
+		    ]]].
+		    moreStyle := fields at:6.
+		    (moreStyle ~= 'normal' and:[moreStyle size > 1]) ifTrue:[
+			style := style, '-', moreStyle.
+		    ].
 "/                    pxlSize := (Integer readFromString:(fields at:8)).
-                    size := (Number readFromString:(fields at:9)) / 10.
-                    resX := fields at:10.
-                    resY := fields at:11.
-                    registry := fields at:14.
-                    encoding := fields at:15.
-                    coding := registry , '-' , encoding.
-                ] ifFalse:[
-                    "/ very old name (such as cursor, 5x7 etc)
-                ]
-            ]
-        ].
+		    size := (Number readFromString:(fields at:9)) / 10.
+		    resX := fields at:10.
+		    resY := fields at:11.
+		    registry := fields at:14.
+		    encoding := fields at:15.
+		    coding := registry , '-' , encoding.
+		] ifFalse:[
+		    "/ very old name (such as cursor, 5x7 etc)
+		]
+	    ]
+	].
     ].
 
     family notNil ifTrue:[
@@ -7862,36 +7862,36 @@
     int len;
 
     if (ISCONNECTED) {
-        if (__isExternalAddress(fontId)) {
-            f = __FontVal(fontId);
-            if (f) {
-                minCode = __MKUINT((f->min_byte1<<8) + f->min_char_or_byte2);
-                maxCode = __MKUINT((f->max_byte1<<8) + f->max_char_or_byte2);
-
-                if (f->direction == FontLeftToRight) {
-                    dir = @symbol(LeftToRight);
-                } else if (f->direction == FontRightToLeft) {
-                    dir = @symbol(RightToLeft);
-                }
-                avgAscent = __MKSMALLINT(f->ascent);
-                avgDescent = __MKSMALLINT(f->descent);
-                maxAscent = __MKSMALLINT(f->max_bounds.ascent);
-                maxDescent = __MKSMALLINT(f->max_bounds.descent);
-                minWidth = __MKSMALLINT(f->min_bounds.width);
-                maxWidth = __MKSMALLINT(f->max_bounds.width);
-
-                ENTER_XLIB();
-                len = XTextWidth(f, "n", 1);
-                LEAVE_XLIB();
-
-                avgWidth = __MKSMALLINT( len );
-            }
-        }
+	if (__isExternalAddress(fontId)) {
+	    f = __FontVal(fontId);
+	    if (f) {
+		minCode = __MKUINT((f->min_byte1<<8) + f->min_char_or_byte2);
+		maxCode = __MKUINT((f->max_byte1<<8) + f->max_char_or_byte2);
+
+		if (f->direction == FontLeftToRight) {
+		    dir = @symbol(LeftToRight);
+		} else if (f->direction == FontRightToLeft) {
+		    dir = @symbol(RightToLeft);
+		}
+		avgAscent = __MKSMALLINT(f->ascent);
+		avgDescent = __MKSMALLINT(f->descent);
+		maxAscent = __MKSMALLINT(f->max_bounds.ascent);
+		maxDescent = __MKSMALLINT(f->max_bounds.descent);
+		minWidth = __MKSMALLINT(f->min_bounds.width);
+		maxWidth = __MKSMALLINT(f->max_bounds.width);
+
+		ENTER_XLIB();
+		len = XTextWidth(f, "n", 1);
+		LEAVE_XLIB();
+
+		avgWidth = __MKSMALLINT( len );
+	    }
+	}
     }
 %}.
     avgAscent == nil ifTrue:[
-        self primitiveFailedOrClosedConnection.
-        ^ nil
+	self primitiveFailedOrClosedConnection.
+	^ nil
     ].
 
     "DingBats font returns 0 for maxAscent/maxDescent"
@@ -7934,8 +7934,8 @@
 
     "
      Screen current
-        fontProperties:#(#'PIXEL_SIZE' #'POINT_SIZE' RESOLUTION notExistent)
-        of:(Screen current getDefaultFontWithEncoding:#'iso10646-1')
+	fontProperties:#(#'PIXEL_SIZE' #'POINT_SIZE' RESOLUTION notExistent)
+	of:(Screen current getDefaultFontWithEncoding:#'iso10646-1')
     "
 !
 
@@ -7956,20 +7956,20 @@
     OBJ x;
 
     if (__isExternalAddress(aFontId)) {
-        f = __FontVal(aFontId);
-        if (f && (prop = f->properties) != 0) {
-            n = f->n_properties;
-            propsArray = __ARRAY_NEW_INT(n*2);
-            for (i = 0; n; n--, prop++) {
-                x = __MKUINT(prop->name); __ArrayInstPtr(propsArray)->a_element[i++] = x; __STORE(propsArray, x);
-                x = __MKUINT(prop->card32); __ArrayInstPtr(propsArray)->a_element[i++] = x; __STORE(propsArray, x);
-            }
-        }
+	f = __FontVal(aFontId);
+	if (f && (prop = f->properties) != 0) {
+	    n = f->n_properties;
+	    propsArray = __ARRAY_NEW_INT(n*2);
+	    for (i = 0; n; n--, prop++) {
+		x = __MKUINT(prop->name); __ArrayInstPtr(propsArray)->a_element[i++] = x; __STORE(propsArray, x);
+		x = __MKUINT(prop->card32); __ArrayInstPtr(propsArray)->a_element[i++] = x; __STORE(propsArray, x);
+	    }
+	}
     }
 %}.
     result := Dictionary new.
     propsArray notNil ifTrue:[
-        propsArray pairWiseDo:[:n :v | result at:(self atomName:n) put:v].
+	propsArray pairWiseDo:[:n :v | result at:(self atomName:n) put:v].
     ].
     ^ result
 
@@ -7980,7 +7980,7 @@
      |d|
      d := Dictionary new.
      (Screen current fontPropertiesOf:(Screen current getDefaultFontWithEncoding:#'iso10646-1')) keysAndValuesDo:[:name :value|
-          d at:name put:((Screen current atomName:value) ? value)
+	  d at:name put:((Screen current atomName:value) ? value)
      ].
      d
     "
@@ -7997,11 +7997,11 @@
     resX := props at:1.
     resY := props at:2.
     (resX notNil and:[resY notNil]) ifTrue:[
-        ^ resX @ resY
+	^ resX @ resY
     ].
     res := props at:3.
     res notNil ifTrue:[
-        ^ res @ res
+	^ res @ res
     ].
     ^ self resolution
 
@@ -8021,15 +8021,15 @@
 
     props := self fontPropertiesOf:aFontId.
     #('FONT' 'FONT_NAME' 'FULL_NAME' 'FULLNAME' ) do:[:try |
-        |fullNameID|
-
-        fullNameID := props at:try ifAbsent:nil.
-        fullNameID notNil ifTrue:[
-            fullName := self atomName:fullNameID.
-            fullName notEmptyOrNil ifTrue:[
-                ^ fullName
-            ].
-        ]
+	|fullNameID|
+
+	fullNameID := props at:try ifAbsent:nil.
+	fullNameID notNil ifTrue:[
+	    fullName := self atomName:fullNameID.
+	    fullName notEmptyOrNil ifTrue:[
+		^ fullName
+	    ].
+	]
     ].
 
     ^ nil.
@@ -8053,36 +8053,36 @@
     int i;
 
     if (ISCONNECTED) {
-        if (__isStringLike(pattern)) {
-            for (;;) {
-                ENTER_XLIB();
-                fonts = XListFonts(myDpy, __stringVal(pattern), nnames, &available);
-                LEAVE_XLIB();
-                if (fonts == 0) RETURN(nil);
-                if (available < nnames) break;
-                XFreeFontNames(fonts);
-                nnames = available * 2;
-            }
-
-            /*
-             * now, that we know the number of font names,
-             * create the array ...
-             */
-            arr = __ARRAY_NEW_INT(available);
-            if (arr != nil) {
-                /*
-                 * ... and fill it
-                 */
-                for (i=0; i<available; i++) {
-                    __PROTECT__(arr);
-                    str = __MKSTRING(fonts[i]);
-                    __UNPROTECT__(arr);
-                    __ArrayInstPtr(arr)->a_element[i] = str; __STORE(arr, str);
-                }
-            }
-            XFreeFontNames(fonts);
-            RETURN (arr);
-        }
+	if (__isStringLike(pattern)) {
+	    for (;;) {
+		ENTER_XLIB();
+		fonts = XListFonts(myDpy, __stringVal(pattern), nnames, &available);
+		LEAVE_XLIB();
+		if (fonts == 0) RETURN(nil);
+		if (available < nnames) break;
+		XFreeFontNames(fonts);
+		nnames = available * 2;
+	    }
+
+	    /*
+	     * now, that we know the number of font names,
+	     * create the array ...
+	     */
+	    arr = __ARRAY_NEW_INT(available);
+	    if (arr != nil) {
+		/*
+		 * ... and fill it
+		 */
+		for (i=0; i<available; i++) {
+		    __PROTECT__(arr);
+		    str = __MKSTRING(fonts[i]);
+		    __UNPROTECT__(arr);
+		    __ArrayInstPtr(arr)->a_element[i] = str; __STORE(arr, str);
+		}
+	    }
+	    XFreeFontNames(fonts);
+	    RETURN (arr);
+	}
     }
 %}.
     ^ nil
@@ -8100,7 +8100,7 @@
 
     id := self createFontFor:'-misc-fixed-*-*-*-*-*-*-*-*-*-*-', encoding.
     id isNil ifTrue:[
-        id := self createFontFor:'fixed'
+	id := self createFontFor:'fixed'
     ].
     ^ id.
 
@@ -8110,7 +8110,7 @@
 !
 
 getFontWithFamily:familyString face:faceString
-            style:styleArgString size:sizeArgOrNil sizeUnit:sizeUnit encoding:encoding
+	    style:styleArgString size:sizeArgOrNil sizeUnit:sizeUnit encoding:encoding
 
     "try to get the specified font, if not available, try next smaller
      font. Access to X-fonts by name is possible, by passing the X font name
@@ -8123,28 +8123,28 @@
     styleString := styleArgString.
 
     sizeArgOrNil notNil ifTrue:[
-        roundedSize := sizeArgOrNil rounded asInteger.
-        sizeUnit == #px ifTrue:[
-            pixelSize := roundedSize.
-        ] ifFalse:[
-            pointSize := roundedSize.
-        ].
+	roundedSize := sizeArgOrNil rounded asInteger.
+	sizeUnit == #px ifTrue:[
+	    pixelSize := roundedSize.
+	] ifFalse:[
+	    pointSize := roundedSize.
+	].
     ].
 
     "special: if face is nil, allow access to X-fonts"
     faceString isNil ifTrue:[
-        roundedSize notNil ifTrue:[
-            theName := familyString , '-' , roundedSize printString
-        ] ifFalse:[
-            theName := familyString
-        ].
-        theName notNil ifTrue:[
-            theId := self createFontFor:theName.
-        ].
-        theId isNil ifTrue:[
-            theId := self getDefaultFontWithEncoding:encoding
-        ].
-        ^ theId
+	roundedSize notNil ifTrue:[
+	    theName := familyString , '-' , roundedSize printString
+	] ifFalse:[
+	    theName := familyString
+	].
+	theName notNil ifTrue:[
+	    theId := self createFontFor:theName.
+	].
+	theId isNil ifTrue:[
+	    theId := self getDefaultFontWithEncoding:encoding
+	].
+	^ theId
     ].
 
     "/ spacing other than 'normal' is contained as last component
@@ -8152,67 +8152,67 @@
 
     (styleString notNil
      and:[(styleString endsWith:'-narrow')
-          or:[styleString endsWith:'-semicondensed']]) ifTrue:[
-        |i|
-        i := styleString lastIndexOf:$-.
-        spacing := styleString copyFrom:(i+1).
-        styleString := styleString copyTo:(i-1).
+	  or:[styleString endsWith:'-semicondensed']]) ifTrue:[
+	|i|
+	i := styleString lastIndexOf:$-.
+	spacing := styleString copyFrom:(i+1).
+	styleString := styleString copyTo:(i-1).
     ] ifFalse:[
-        spacing := 'normal'.
+	spacing := 'normal'.
     ].
 
     xlatedStyle := styleString.
     xlatedStyle notNil ifTrue:[
-        xlatedStyle := xlatedStyle first asString
+	xlatedStyle := xlatedStyle first asString
     ].
 
     encoding isNil ifTrue:[
-        encodingMatch := '*-*'.
+	encodingMatch := '*-*'.
     ] ifFalse:[
-        idx := encoding indexOf:$-.
-        idx ~~ 0 ifTrue:[
-            encodingMatch := encoding
-        ] ifFalse:[
-            encodingMatch := encoding , '-*'.
-        ].
+	idx := encoding indexOf:$-.
+	idx ~~ 0 ifTrue:[
+	    encodingMatch := encoding
+	] ifFalse:[
+	    encodingMatch := encoding , '-*'.
+	].
     ].
 
     id := self
-            getFontWithFoundry:'*'
-            family:familyString asLowercase
-            weight:faceString
-            slant:xlatedStyle
-            spacing:spacing
-            pixelSize:pixelSize
-            size:pointSize
-            encoding:encodingMatch.
+	    getFontWithFoundry:'*'
+	    family:familyString asLowercase
+	    weight:faceString
+	    slant:xlatedStyle
+	    spacing:spacing
+	    pixelSize:pixelSize
+	    size:pointSize
+	    encoding:encodingMatch.
 
     id isNil ifTrue:[
-        (encodingMatch notNil and:[encodingMatch ~= '*']) ifTrue:[
-            "/ too stupid: registries come in both cases
-            "/ and X does not ignore case
-            "/
-            id := self
-                    getFontWithFoundry:'*'
-                    family:familyString asLowercase
-                    weight:faceString
-                    slant:xlatedStyle
-                    spacing:spacing
-                    pixelSize:nil
-                    size:roundedSize
-                    encoding:encodingMatch asUppercase.
-            id isNil ifTrue:[
-                id := self
-                        getFontWithFoundry:'*'
-                        family:familyString asLowercase
-                        weight:faceString
-                        slant:xlatedStyle
-                        spacing:spacing
-                        pixelSize:nil
-                        size:roundedSize
-                        encoding:encodingMatch asLowercase.
-            ]
-        ]
+	(encodingMatch notNil and:[encodingMatch ~= '*']) ifTrue:[
+	    "/ too stupid: registries come in both cases
+	    "/ and X does not ignore case
+	    "/
+	    id := self
+		    getFontWithFoundry:'*'
+		    family:familyString asLowercase
+		    weight:faceString
+		    slant:xlatedStyle
+		    spacing:spacing
+		    pixelSize:nil
+		    size:roundedSize
+		    encoding:encodingMatch asUppercase.
+	    id isNil ifTrue:[
+		id := self
+			getFontWithFoundry:'*'
+			family:familyString asLowercase
+			weight:faceString
+			slant:xlatedStyle
+			spacing:spacing
+			pixelSize:nil
+			size:roundedSize
+			encoding:encodingMatch asLowercase.
+	    ]
+	]
     ].
     ^ id
 
@@ -8221,8 +8221,8 @@
 !
 
 getFontWithFoundry:foundry family:family weight:weight
-              slant:slant spacing:spc pixelSize:pSize size:size
-              encoding:encoding
+	      slant:slant spacing:spc pixelSize:pSize size:size
+	      encoding:encoding
 
     "get the specified font, if not available, return nil.
      Individual attributes can be left empty (i.e. '') or nil to match any.
@@ -8243,17 +8243,17 @@
 
     "this works only on 'Release >= 3' - X-servers"
     "name is:
-        -foundry-family    -weight -slant-
-         sony    helvetica bold     r
-         adobe   courier   medium   i
-         msic    fixed              o
-         ...     ...
+	-foundry-family    -weight -slant-
+	 sony    helvetica bold     r
+	 adobe   courier   medium   i
+	 msic    fixed              o
+	 ...     ...
     "
 
     size isNil ifTrue:[
-        sizeMatch := '*'
+	sizeMatch := '*'
     ] ifFalse:[
-        sizeMatch := size printString , '0'
+	sizeMatch := size printString , '0'
     ].
     foundryMatch := foundry ? '*'.
     familyMatch := family ? '*'.
@@ -8261,22 +8261,22 @@
     slantMatch := slant ? '*'.
     spcMatch := spc ? '*'.
     pSize isNil ifTrue:[
-        pSizeMatch := '*'
+	pSizeMatch := '*'
     ] ifFalse:[
-        pSizeMatch := pSize printString
+	pSizeMatch := pSize printString
     ].
     encodingMatch := encoding ? '*'.
 
     theName := ('-' , foundryMatch,
-                '-' , familyMatch,
-                '-' , weightMatch ,
-                '-' , slantMatch ,
-                '-' , spcMatch ,
-                '-*' ,
-                '-' , pSizeMatch ,
-                '-' , sizeMatch ,
-                '-*-*-*-*' ,
-                '-' , encodingMatch).
+		'-' , familyMatch,
+		'-' , weightMatch ,
+		'-' , slantMatch ,
+		'-' , spcMatch ,
+		'-*' ,
+		'-' , pSizeMatch ,
+		'-' , sizeMatch ,
+		'-*-*-*-*' ,
+		'-' , encodingMatch).
 
 "/  Transcript showCR:theName; endEntry.
 
@@ -8285,24 +8285,24 @@
 
     "
      Display
-        getFontWithFoundry:'*'
-        family:'courier'
-        weight:'medium'
-        slant:'r'
-        spacing:nil
-        pixelSize:nil
-        size:13
-        encoding:#'iso8859-1'.
+	getFontWithFoundry:'*'
+	family:'courier'
+	weight:'medium'
+	slant:'r'
+	spacing:nil
+	pixelSize:nil
+	size:13
+	encoding:#'iso8859-1'.
 
      Display
-        getFontWithFoundry:'*'
-        family:'courier'
-        weight:'medium'
-        slant:'r'
-        spacing:nil
-        pixelSize:nil
-        size:13
-        encoding:#'iso10646-1'
+	getFontWithFoundry:'*'
+	family:'courier'
+	weight:'medium'
+	slant:'r'
+	spacing:nil
+	pixelSize:nil
+	size:13
+	encoding:#'iso10646-1'
     "
 
     "Modified: / 10-04-1997 / 19:15:44 / cg"
@@ -8318,20 +8318,20 @@
 
     "
       Screen current
-        heightOf:'hello world' from:1 to:10
-        inFont:(Screen current  getFontWithFoundry:'*'
-                    family:'courier new'
-                    weight:'medium'
-                    slant:'r'
-                    spacing:nil
-                    pixelSize:nil
-                    size:13
-                    encoding:#'iso10646-1'
-            ).
+	heightOf:'hello world' from:1 to:10
+	inFont:(Screen current  getFontWithFoundry:'*'
+		    family:'courier new'
+		    weight:'medium'
+		    slant:'r'
+		    spacing:nil
+		    pixelSize:nil
+		    size:13
+		    encoding:#'iso10646-1'
+	    ).
 
       Screen current
-        heightOf:'hello World gggÖÜ' from:1 to:15
-        inFont:(Screen current getDefaultFontWithEncoding:#'iso10646-1')
+	heightOf:'hello World gggÖÜ' from:1 to:15
+	inFont:(Screen current getDefaultFontWithEncoding:#'iso10646-1')
     "
 !
 
@@ -8344,24 +8344,24 @@
     |names listOfXftFonts|
 
     listOfXFonts isNil ifTrue:[
-        names := self getAvailableFontsMatching:'*'.
-        names isNil ifTrue:[
-            "no names returned ..."
-            ^ nil
-        ].
-        listOfXFonts := names collect:[:aName | self fontDescriptionFromXFontName:aName].
-        listOfXFonts := FontDescription genericFonts, listOfXFonts.
+	names := self getAvailableFontsMatching:'*'.
+	names isNil ifTrue:[
+	    "no names returned ..."
+	    ^ nil
+	].
+	listOfXFonts := names collect:[:aName | self fontDescriptionFromXFontName:aName].
+	listOfXFonts := FontDescription genericFonts, listOfXFonts.
     ].
 
     self supportsXftFonts ifTrue:[
-        UserPreferences current useXFontsOnly ifFalse:[
-            listOfXftFonts := XftFontDescription listOfAvailableFonts.
-
-            UserPreferences current useXftFontsOnly ifTrue:[
-                ^ listOfXftFonts
-            ].
-            ^ listOfXftFonts , listOfXFonts.
-        ].
+	UserPreferences current useXFontsOnly ifFalse:[
+	    listOfXftFonts := XftFontDescription listOfAvailableFonts.
+
+	    UserPreferences current useXftFontsOnly ifTrue:[
+		^ listOfXftFonts
+	    ].
+	    ^ listOfXftFonts , listOfXFonts.
+	].
     ].
     ^ listOfXFonts
 
@@ -8387,10 +8387,10 @@
 
     sizes := super pixelSizesInFamily:aFamilyName face:aFaceName style:aStyleName filtering:filter.
     (sizes notNil and:[sizes isEmpty or:[sizes includes:0]]) ifTrue:[
-        "special: in X11R5 and above, size 0 means:
-         there are scaled versions in all sizes available"
-
-        ^ #(4 5 6 7 8 9 10 11 12 14 16 18 20 22 24 28 32 48 64 72 96 144 192 288)
+	"special: in X11R5 and above, size 0 means:
+	 there are scaled versions in all sizes available"
+
+	^ #(4 5 6 7 8 9 10 11 12 14 16 18 20 22 24 28 32 48 64 72 96 144 192 288)
     ].
     ^ sizes
 
@@ -8411,21 +8411,21 @@
      * ignore closed connection
      */
     if (! ISCONNECTED) {
-        RETURN ( self );
+	RETURN ( self );
     }
 
     if (__isExternalAddress(aFontId)) {
-        f = __FontVal(aFontId);
-        if (f) {
-
-            ENTER_XLIB();
-            XFreeFont(myDpy, f);
-            LEAVE_XLIB();
+	f = __FontVal(aFontId);
+	if (f) {
+
+	    ENTER_XLIB();
+	    XFreeFont(myDpy, f);
+	    LEAVE_XLIB();
 #ifdef COUNT_RESOURCES
-            __cnt_font--;
-#endif
-        }
-        RETURN ( self );
+	    __cnt_font--;
+#endif
+	}
+	RETURN ( self );
     }
 %}.
     self primitiveFailed
@@ -8440,10 +8440,10 @@
 
     sizes := super sizesInFamily:aFamilyName face:aFaceName style:aStyleName filtering:filter.
     (sizes notNil and:[sizes includes:0]) ifTrue:[
-        "special: in X11R5 and above, size 0 means:
-         there are scaled versions in all sizes available"
-
-        ^ #(4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 20 22 24 28 32 48 64 72 96 144 192 288)
+	"special: in X11R5 and above, size 0 means:
+	 there are scaled versions in all sizes available"
+
+	^ #(4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 20 22 24 28 32 48 64 72 96 144 192 288)
     ].
     ^ sizes
 
@@ -8470,185 +8470,185 @@
     XCharStruct overAllReturn;
 
     if (ISCONNECTED) {
-        if (__bothSmallInteger(index1, index2)
-         && __isExternalAddress(aFontId)
-         && __isNonNilObject(aString)) {
-            int lMax = __intVal(@global(MaxStringLength));
-            f = __FontVal(aFontId);
-            if (! f) goto fail;
-
-            i1 = __intVal(index1) - 1;
-
-            if (i1 >= 0) {
-                OBJ cls;
-
-                i2 = __intVal(index2) - 1;
-                if (i2 < i1) {
-                    RETURN ( __MKSMALLINT(0) );
-                }
-
-                cp = (char *) __stringVal(aString);
-                l = i2 - i1 + 1;
-
-                if (__isStringLike(aString)) {
-                    n = __stringSize(aString);
-                    if (i2 < n) {
-                        cp += i1;
+	if (__bothSmallInteger(index1, index2)
+	 && __isExternalAddress(aFontId)
+	 && __isNonNilObject(aString)) {
+	    int lMax = __intVal(@global(MaxStringLength));
+	    f = __FontVal(aFontId);
+	    if (! f) goto fail;
+
+	    i1 = __intVal(index1) - 1;
+
+	    if (i1 >= 0) {
+		OBJ cls;
+
+		i2 = __intVal(index2) - 1;
+		if (i2 < i1) {
+		    RETURN ( __MKSMALLINT(0) );
+		}
+
+		cp = (char *) __stringVal(aString);
+		l = i2 - i1 + 1;
+
+		if (__isStringLike(aString)) {
+		    n = __stringSize(aString);
+		    if (i2 < n) {
+			cp += i1;
 
 #if 1
-                        len = XTextExtents(f, cp, l,
-                                                &directionReturn, &fontAscentReturn, &fontDescentReturn,
-                                                &overAllReturn);
-                        //console_printf("lBear:%d rBear:%d width:%d\n", overAllReturn.lbearing, overAllReturn.rbearing, overAllReturn.width);
-                        RETURN ( __MKSMALLINT(overAllReturn.width) );
+			len = XTextExtents(f, cp, l,
+						&directionReturn, &fontAscentReturn, &fontDescentReturn,
+						&overAllReturn);
+			//console_printf("lBear:%d rBear:%d width:%d\n", overAllReturn.lbearing, overAllReturn.rbearing, overAllReturn.width);
+			RETURN ( __MKSMALLINT(overAllReturn.width) );
 #else
-                        ENTER_XLIB();
-                        len = XTextWidth(f, cp, l);
-                        LEAVE_XLIB();
-                        RETURN ( __MKSMALLINT(len) );
-#endif
-                    }
-                }
-
-                cls = __qClass(aString);
-                nInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
-                cp += nInstBytes;
-
-                if (__isBytes(aString)) {
-                    n = __byteArraySize(aString) - nInstBytes;
-                    if (i2 < n) {
-                        cp += i1;
+			ENTER_XLIB();
+			len = XTextWidth(f, cp, l);
+			LEAVE_XLIB();
+			RETURN ( __MKSMALLINT(len) );
+#endif
+		    }
+		}
+
+		cls = __qClass(aString);
+		nInstBytes = __OBJS2BYTES__(__intVal(__ClassInstPtr(cls)->c_ninstvars));
+		cp += nInstBytes;
+
+		if (__isBytes(aString)) {
+		    n = __byteArraySize(aString) - nInstBytes;
+		    if (i2 < n) {
+			cp += i1;
 
 #if 1
-                        len = XTextExtents(f, cp, l,
-                                                &directionReturn, &fontAscentReturn, &fontDescentReturn,
-                                                &overAllReturn);
-                        RETURN ( __MKSMALLINT(overAllReturn.width) );
+			len = XTextExtents(f, cp, l,
+						&directionReturn, &fontAscentReturn, &fontDescentReturn,
+						&overAllReturn);
+			RETURN ( __MKSMALLINT(overAllReturn.width) );
 #else
-                        ENTER_XLIB();
-                        len = XTextWidth(f, cp, l);
-                        LEAVE_XLIB();
-                        RETURN ( __MKSMALLINT(len) );
-#endif
-                    }
-                }
-
-                /* TWOBYTESTRINGS */
-                if (__isWords(aString)) {
-                    n = (__byteArraySize(aString) - nInstBytes) / 2;
-
-                    if (i2 < n) {
-                        union {
-                            char b[2];
-                            unsigned short s;
-                        } u;
-                        int i;
-                        XChar2b *cp2 = (XChar2b *)0;
-                        int mustFree = 0;
-
-                        cp += (i1 * 2);
-                        if (l > lMax) l = lMax;
-
-                        /*
-                         * ST/X TwoByteStrings store the asciiValue in native byteOrder;
-                         * X expects them MSB first
-                         * convert as required
-                         */
-
-                        u.s = 0x1234;
-                        if (u.b[0] != 0x12) {
-                            if (l <= NLOCALBUFFER) {
-                                cp2 = xlatebuffer;
-                            } else {
-                                cp2 = (XChar2b *)(malloc(l * 2));
-                                mustFree = 1;
-                            }
-                            for (i=0; i<l; i++) {
-                                cp2[i].byte1 = (((XChar2b *)cp)[i]).byte2;
-                                cp2[i].byte2 = (((XChar2b *)cp)[i]).byte1;
-                            }
-                            cp = (char *) cp2;
-                        }
+			ENTER_XLIB();
+			len = XTextWidth(f, cp, l);
+			LEAVE_XLIB();
+			RETURN ( __MKSMALLINT(len) );
+#endif
+		    }
+		}
+
+		/* TWOBYTESTRINGS */
+		if (__isWords(aString)) {
+		    n = (__byteArraySize(aString) - nInstBytes) / 2;
+
+		    if (i2 < n) {
+			union {
+			    char b[2];
+			    unsigned short s;
+			} u;
+			int i;
+			XChar2b *cp2 = (XChar2b *)0;
+			int mustFree = 0;
+
+			cp += (i1 * 2);
+			if (l > lMax) l = lMax;
+
+			/*
+			 * ST/X TwoByteStrings store the asciiValue in native byteOrder;
+			 * X expects them MSB first
+			 * convert as required
+			 */
+
+			u.s = 0x1234;
+			if (u.b[0] != 0x12) {
+			    if (l <= NLOCALBUFFER) {
+				cp2 = xlatebuffer;
+			    } else {
+				cp2 = (XChar2b *)(malloc(l * 2));
+				mustFree = 1;
+			    }
+			    for (i=0; i<l; i++) {
+				cp2[i].byte1 = (((XChar2b *)cp)[i]).byte2;
+				cp2[i].byte2 = (((XChar2b *)cp)[i]).byte1;
+			    }
+			    cp = (char *) cp2;
+			}
 
 #if 1
-                        len = XTextExtents16(f, (XChar2b *)cp, l,
-                                                &directionReturn, &fontAscentReturn, &fontDescentReturn,
-                                                &overAllReturn);
-                        len = overAllReturn.width;
+			len = XTextExtents16(f, (XChar2b *)cp, l,
+						&directionReturn, &fontAscentReturn, &fontDescentReturn,
+						&overAllReturn);
+			len = overAllReturn.width;
 #else
-                        ENTER_XLIB();
-                        len = XTextWidth16(f, (XChar2b *)cp, l);
-                        LEAVE_XLIB();
-#endif
-
-                        if (mustFree) {
-                            free(cp2);
-                        }
-
-                        RETURN ( __MKSMALLINT(len) );
-                    }
-                }
-                /* FOURBYTESTRINGS */
-                if (__isLongs(aString)) {
-                    int i;
-                    XChar2b *cp2;
-                    int mustFree = 0;
-
-                    n = (__byteArraySize(aString) - nInstBytes) / 4;
-                    if (i2 < n) {
-                        union {
-                            char b[2];
-                            unsigned short s;
-                        } u;
-                        int i;
-                        XChar2b *cp2 = (XChar2b *)0;
-                        int mustFree = 0;
-
-                        cp += (i1 * 4);
-                        if (l > lMax) l = lMax;
-
-                        /*
-                         * For now: X does not support 32bit characters without the new 32Unicode extensions.
-                         * For now, treat chars above 0xFFFF as 0xFFFF (should we use default-char ?).
-                         */
-                        if (l <= NLOCALBUFFER) {
-                            cp2 = xlatebuffer;
-                        } else {
-                            cp2 = (XChar2b *)(malloc(l * 2));
-                            mustFree = 1;
-                        }
-                        for (i=0; i<l; i++) {
-                            int codePoint;
-
-                            codePoint = ((unsigned int32 *)cp)[i];
-                            if (codePoint > 0xFFFF) {
-                                codePoint = 0xFFFF;
-                            }
-                            cp2[i].byte1 = codePoint & 0xFF;
-                            cp2[i].byte2 = (codePoint >> 8) & 0xFF;;
-                        }
-                        cp = (char *) cp2;
+			ENTER_XLIB();
+			len = XTextWidth16(f, (XChar2b *)cp, l);
+			LEAVE_XLIB();
+#endif
+
+			if (mustFree) {
+			    free(cp2);
+			}
+
+			RETURN ( __MKSMALLINT(len) );
+		    }
+		}
+		/* FOURBYTESTRINGS */
+		if (__isLongs(aString)) {
+		    int i;
+		    XChar2b *cp2;
+		    int mustFree = 0;
+
+		    n = (__byteArraySize(aString) - nInstBytes) / 4;
+		    if (i2 < n) {
+			union {
+			    char b[2];
+			    unsigned short s;
+			} u;
+			int i;
+			XChar2b *cp2 = (XChar2b *)0;
+			int mustFree = 0;
+
+			cp += (i1 * 4);
+			if (l > lMax) l = lMax;
+
+			/*
+			 * For now: X does not support 32bit characters without the new 32Unicode extensions.
+			 * For now, treat chars above 0xFFFF as 0xFFFF (should we use default-char ?).
+			 */
+			if (l <= NLOCALBUFFER) {
+			    cp2 = xlatebuffer;
+			} else {
+			    cp2 = (XChar2b *)(malloc(l * 2));
+			    mustFree = 1;
+			}
+			for (i=0; i<l; i++) {
+			    int codePoint;
+
+			    codePoint = ((unsigned int32 *)cp)[i];
+			    if (codePoint > 0xFFFF) {
+				codePoint = 0xFFFF;
+			    }
+			    cp2[i].byte1 = codePoint & 0xFF;
+			    cp2[i].byte2 = (codePoint >> 8) & 0xFF;;
+			}
+			cp = (char *) cp2;
 
 #if 1
-                        len = XTextExtents16(f, (XChar2b *)cp, l,
-                                                &directionReturn, &fontAscentReturn, &fontDescentReturn,
-                                                &overAllReturn);
-                        len = overAllReturn.width;
+			len = XTextExtents16(f, (XChar2b *)cp, l,
+						&directionReturn, &fontAscentReturn, &fontDescentReturn,
+						&overAllReturn);
+			len = overAllReturn.width;
 #else
-                        ENTER_XLIB();
-                        len = XTextWidth16(f, (XChar2b *)cp, l);
-                        LEAVE_XLIB();
-#endif
-
-                        if (mustFree) {
-                            free(cp2);
-                        }
-
-                        RETURN ( __MKSMALLINT(len) );
-                    }
-                }
-            }
-        }
+			ENTER_XLIB();
+			len = XTextWidth16(f, (XChar2b *)cp, l);
+			LEAVE_XLIB();
+#endif
+
+			if (mustFree) {
+			    free(cp2);
+			}
+
+			RETURN ( __MKSMALLINT(len) );
+		    }
+		}
+	    }
+	}
     }
 #undef NLOCALBUFFER
 fail: ;
@@ -8666,31 +8666,31 @@
     int _mode, ok = 1;
 
     if (mode == @symbol(asyncPointer))
-        _mode = AsyncPointer;
+	_mode = AsyncPointer;
     else if (mode == @symbol(syncPointer))
-        _mode = SyncPointer;
+	_mode = SyncPointer;
     else if (mode == @symbol(asyncKeyboard))
-        _mode = AsyncKeyboard;
+	_mode = AsyncKeyboard;
     else if (mode == @symbol(syncKeyboard))
-        _mode = SyncKeyboard;
+	_mode = SyncKeyboard;
     else if (mode == @symbol(syncBoth))
-        _mode = SyncBoth;
+	_mode = SyncBoth;
     else if (mode == @symbol(asyncBoth))
-        _mode = AsyncBoth;
+	_mode = AsyncBoth;
     else if (mode == @symbol(replayPointer))
-        _mode = ReplayPointer;
+	_mode = ReplayPointer;
     else if (mode == @symbol(replayKeyboard))
-        _mode = ReplayKeyboard;
+	_mode = ReplayKeyboard;
     else
-        ok = 0;
+	ok = 0;
 
     if (ok
      && ISCONNECTED) {
-        ENTER_XLIB();
-        XAllowEvents(myDpy, _mode, CurrentTime);
-        LEAVE_XLIB();
-
-        RETURN (self);
+	ENTER_XLIB();
+	XAllowEvents(myDpy, _mode, CurrentTime);
+	LEAVE_XLIB();
+
+	RETURN (self);
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -8704,52 +8704,52 @@
     int result, ok;
 
     if (ISCONNECTED) {
-        if (__isExternalAddress(aWindowId)) {
-
-            ENTER_XLIB();
-            result = XGrabKeyboard(myDpy,
-                                   __WindowVal(aWindowId),
-                                   True /* False */,
-                                   GrabModeAsync,
-                                   GrabModeAsync,
-                                   CurrentTime);
-            LEAVE_XLIB();
-
-            ok = 0;
-            switch(result) {
-                case AlreadyGrabbed:
-                    if (@global(ErrorPrinting) == true) {
-                        console_fprintf(stderr, "XWorkstation [warning]: grab keyboard: AlreadyGrabbed\n");
-                    }
-                    break;
-                case GrabNotViewable:
-                    if (@global(ErrorPrinting) == true) {
-                        console_fprintf(stderr, "XWorkstation [warning]: grab keyboard: GrabNotViewable\n");
-                    }
-                    break;
-                case GrabInvalidTime:
-                    if (@global(ErrorPrinting) == true) {
-                        console_fprintf(stderr, "XWorkstation [warning]: grab keyboard: InvalidTime\n");
-                    }
-                    break;
-                case GrabFrozen:
-                    if (@global(ErrorPrinting) == true) {
-                        console_fprintf(stderr, "XWorkstation [warning]: grab keyboard: Frozen\n");
-                    }
-                    break;
-                default:
-                    ok = 1;
-                    break;
-            }
-            if (! ok) {
-                ENTER_XLIB();
-                XUngrabKeyboard(myDpy, CurrentTime);
-                LEAVE_XLIB();
-                RETURN (false);
-            }
-
-            RETURN ( true );
-        }
+	if (__isExternalAddress(aWindowId)) {
+
+	    ENTER_XLIB();
+	    result = XGrabKeyboard(myDpy,
+				   __WindowVal(aWindowId),
+				   True /* False */,
+				   GrabModeAsync,
+				   GrabModeAsync,
+				   CurrentTime);
+	    LEAVE_XLIB();
+
+	    ok = 0;
+	    switch(result) {
+		case AlreadyGrabbed:
+		    if (@global(ErrorPrinting) == true) {
+			console_fprintf(stderr, "XWorkstation [warning]: grab keyboard: AlreadyGrabbed\n");
+		    }
+		    break;
+		case GrabNotViewable:
+		    if (@global(ErrorPrinting) == true) {
+			console_fprintf(stderr, "XWorkstation [warning]: grab keyboard: GrabNotViewable\n");
+		    }
+		    break;
+		case GrabInvalidTime:
+		    if (@global(ErrorPrinting) == true) {
+			console_fprintf(stderr, "XWorkstation [warning]: grab keyboard: InvalidTime\n");
+		    }
+		    break;
+		case GrabFrozen:
+		    if (@global(ErrorPrinting) == true) {
+			console_fprintf(stderr, "XWorkstation [warning]: grab keyboard: Frozen\n");
+		    }
+		    break;
+		default:
+		    ok = 1;
+		    break;
+	    }
+	    if (! ok) {
+		ENTER_XLIB();
+		XUngrabKeyboard(myDpy, CurrentTime);
+		LEAVE_XLIB();
+		RETURN (false);
+	    }
+
+	    RETURN ( true );
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -8769,88 +8769,88 @@
     int pointer_mode, keyboard_mode;
 
     if (ISCONNECTED) {
-        if (__isExternalAddress(aWindowId)) {
-            if (__isExternalAddress(confineId))
-                confineWin = __WindowVal(confineId);
-            else
-                confineWin = (Window) None;
-
-            if (__isExternalAddress(aCursorId))
-                curs = __CursorVal(aCursorId);
-            else
-                curs = (Cursor) None;
-
-            if (pMode == @symbol(sync))
-                pointer_mode = GrabModeSync;
-            else
-                pointer_mode = GrabModeAsync;
-
-            if (kMode == @symbol(sync))
-                keyboard_mode = GrabModeSync;
-            else
-                keyboard_mode = GrabModeAsync;
-
-            if (__isSmallInteger(eventMask))
-                evMask = __intVal(eventMask);
-            else
-                evMask = ButtonPressMask | ButtonMotionMask | PointerMotionMask | ButtonReleaseMask;
+	if (__isExternalAddress(aWindowId)) {
+	    if (__isExternalAddress(confineId))
+		confineWin = __WindowVal(confineId);
+	    else
+		confineWin = (Window) None;
+
+	    if (__isExternalAddress(aCursorId))
+		curs = __CursorVal(aCursorId);
+	    else
+		curs = (Cursor) None;
+
+	    if (pMode == @symbol(sync))
+		pointer_mode = GrabModeSync;
+	    else
+		pointer_mode = GrabModeAsync;
+
+	    if (kMode == @symbol(sync))
+		keyboard_mode = GrabModeSync;
+	    else
+		keyboard_mode = GrabModeAsync;
+
+	    if (__isSmallInteger(eventMask))
+		evMask = __intVal(eventMask);
+	    else
+		evMask = ButtonPressMask | ButtonMotionMask | PointerMotionMask | ButtonReleaseMask;
 
 
 /*
-            ENTER_XLIB();
+	    ENTER_XLIB();
 */
-            result = XGrabPointer(myDpy,
-                                  __WindowVal(aWindowId),
-                                  False,
-                                  evMask,
-                                  pointer_mode, keyboard_mode,
-                                  confineWin,
-                                  curs,
-                                  CurrentTime);
+	    result = XGrabPointer(myDpy,
+				  __WindowVal(aWindowId),
+				  False,
+				  evMask,
+				  pointer_mode, keyboard_mode,
+				  confineWin,
+				  curs,
+				  CurrentTime);
 /*
-            LEAVE_XLIB();
+	    LEAVE_XLIB();
 */
 
 
-            ok = 0;
-            switch (result) {
-                case AlreadyGrabbed:
-                    if (@global(ErrorPrinting) == true) {
-                        console_fprintf(stderr, "XWorkstation [warning]: grab pointer: AlreadyGrabbed\n");
-                    }
-                    break;
-                case GrabNotViewable:
-                    if (@global(ErrorPrinting) == true) {
-                        console_fprintf(stderr, "XWorkstation [warning]: grab pointer: GrabNotViewable\n");
-                    }
-                    break;
-                case GrabInvalidTime:
-                    if (@global(ErrorPrinting) == true) {
-                        console_fprintf(stderr, "XWorkstation [warning]: grab pointer: InvalidTime\n");
-                    }
-                    break;
-                case GrabFrozen:
-                    if (@global(ErrorPrinting) == true) {
-                        console_fprintf(stderr, "XWorkstation [warning]: grab pointer: Frozen\n");
-                    }
-                    break;
-                default:
-                    ok = 1;
-                    break;
-            }
-
-            if (! ok) {
+	    ok = 0;
+	    switch (result) {
+		case AlreadyGrabbed:
+		    if (@global(ErrorPrinting) == true) {
+			console_fprintf(stderr, "XWorkstation [warning]: grab pointer: AlreadyGrabbed\n");
+		    }
+		    break;
+		case GrabNotViewable:
+		    if (@global(ErrorPrinting) == true) {
+			console_fprintf(stderr, "XWorkstation [warning]: grab pointer: GrabNotViewable\n");
+		    }
+		    break;
+		case GrabInvalidTime:
+		    if (@global(ErrorPrinting) == true) {
+			console_fprintf(stderr, "XWorkstation [warning]: grab pointer: InvalidTime\n");
+		    }
+		    break;
+		case GrabFrozen:
+		    if (@global(ErrorPrinting) == true) {
+			console_fprintf(stderr, "XWorkstation [warning]: grab pointer: Frozen\n");
+		    }
+		    break;
+		default:
+		    ok = 1;
+		    break;
+	    }
+
+	    if (! ok) {
 /*
-                ENTER_XLIB();
+		ENTER_XLIB();
 */
-                XUngrabPointer(myDpy, CurrentTime);
+		XUngrabPointer(myDpy, CurrentTime);
 /*
-                LEAVE_XLIB();
+		LEAVE_XLIB();
 */
-                RETURN (false);
-            }
-            RETURN ( true );
-        }
+		RETURN (false);
+	    }
+	    RETURN ( true );
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -8863,12 +8863,12 @@
     "grap the pointer - return true if ok"
 
     ^ self
-        grabPointerIn:aWindowId
-        withCursor:aCursorId
-        eventMask:nil
-        pointerMode:pMode
-        keyboardMode:kMode
-        confineTo:confineId
+	grabPointerIn:aWindowId
+	withCursor:aCursorId
+	eventMask:nil
+	pointerMode:pMode
+	keyboardMode:kMode
+	confineTo:confineId
 
     "Modified: / 28.7.1998 / 02:47:51 / cg"
 !
@@ -8880,12 +8880,12 @@
 %{
 
     if (ISCONNECTED) {
-        Display *dpy = myDpy;
-
-        ENTER_XLIB();
-        XUngrabKeyboard(dpy, CurrentTime);
-        XSync(dpy, 0);
-        LEAVE_XLIB();
+	Display *dpy = myDpy;
+
+	ENTER_XLIB();
+	XUngrabKeyboard(dpy, CurrentTime);
+	XSync(dpy, 0);
+	LEAVE_XLIB();
 
     }
 %}.
@@ -8898,12 +8898,12 @@
 %{
 
     if (ISCONNECTED) {
-        Display *dpy = myDpy;
-
-        ENTER_XLIB();
-        XUngrabPointer(dpy, CurrentTime);
-        XSync(dpy, 0);
-        LEAVE_XLIB();
+	Display *dpy = myDpy;
+
+	ENTER_XLIB();
+	XUngrabPointer(dpy, CurrentTime);
+	XSync(dpy, 0);
+	LEAVE_XLIB();
 
     }
 %}.
@@ -8913,8 +8913,8 @@
     "release the keyboard"
 
     activeKeyboardGrab notNil ifTrue:[
-        activeKeyboardGrab := nil.
-        self primUngrabKeyboard.
+	activeKeyboardGrab := nil.
+	self primUngrabKeyboard.
     ]
 !
 
@@ -8922,8 +8922,8 @@
     "release the pointer"
 
     activePointerGrab notNil ifTrue:[
-        activePointerGrab := nil.
-        self primUngrabPointer.
+	activePointerGrab := nil.
+	self primUngrabPointer.
     ]
 ! !
 
@@ -8955,71 +8955,71 @@
     KeySym keySym, *syms;
 
     if (__isStringLike(keySymCodeOrChar)) {
-        keySym = XStringToKeysym(__stringVal(keySymCodeOrChar));
+	keySym = XStringToKeysym(__stringVal(keySymCodeOrChar));
     } else {
-        if (__isCharacter(keySymCodeOrChar)) {
-            char s[2];
-
-            s[0] = __intVal(__characterVal(keySymCodeOrChar));
-            s[1] = '\0';
-            keySym = XStringToKeysym(s);
-        } else {
-            if (__isSmallInteger(keySymCodeOrChar)) {
-                keySym = (KeySym) __intVal(keySymCodeOrChar);
-            } else {
-                goto notOK;
-            }
-        }
+	if (__isCharacter(keySymCodeOrChar)) {
+	    char s[2];
+
+	    s[0] = __intVal(__characterVal(keySymCodeOrChar));
+	    s[1] = '\0';
+	    keySym = XStringToKeysym(s);
+	} else {
+	    if (__isSmallInteger(keySymCodeOrChar)) {
+		keySym = (KeySym) __intVal(keySymCodeOrChar);
+	    } else {
+		goto notOK;
+	    }
+	}
     }
 
     if (modifierMaskOrNil != nil) {
-        if (__isSmallInteger(modifierMaskOrNil)) {
-            modifierMask = __intVal(modifierMaskOrNil);
-        } else {
-            goto notOK;
-        }
+	if (__isSmallInteger(modifierMaskOrNil)) {
+	    modifierMask = __intVal(modifierMaskOrNil);
+	} else {
+	    goto notOK;
+	}
     }
 
     if (ISCONNECTED) {
-        Display *dpy;
-        Window window;
-        int keyCode;
-        int result;
-        int mKbd, mPtr;
-
-        mKbd = modeKbd == @symbol(GrabModeAsync) ? GrabModeAsync :GrabModeSync;
-        mPtr = modePtr == @symbol(GrabModeAsync) ? GrabModeAsync :GrabModeSync;
-
-        dpy = myDpy;
-        keyCode = XKeysymToKeycode(dpy, keySym);
-        if (__isExternalAddress(aWindowIdOrNil)) {
-            window = __WindowVal(aWindowIdOrNil);
-        } else {
-            int screen;
-
-            screen = DefaultScreen(dpy);
-            window = RootWindow(dpy, screen);
-        }
-        ENTER_XLIB();
-
-        result = XGrabKey (dpy,
-            keyCode, modifierMask, window,
-            False, mKbd, mPtr );
-
-        XSync(dpy, True);
-        XFlush(dpy);
-
-        LEAVE_XLIB();
-
-        if (result != Success) {
-            if (result == BadAccess) {
-                __INST(lastError) = @symbol(badAccess);
-            } else {
-                __INST(lastError) = @symbol(other);
-            }
-            RETURN (false);
-        }
-        RETURN (true);
+	Display *dpy;
+	Window window;
+	int keyCode;
+	int result;
+	int mKbd, mPtr;
+
+	mKbd = modeKbd == @symbol(GrabModeAsync) ? GrabModeAsync :GrabModeSync;
+	mPtr = modePtr == @symbol(GrabModeAsync) ? GrabModeAsync :GrabModeSync;
+
+	dpy = myDpy;
+	keyCode = XKeysymToKeycode(dpy, keySym);
+	if (__isExternalAddress(aWindowIdOrNil)) {
+	    window = __WindowVal(aWindowIdOrNil);
+	} else {
+	    int screen;
+
+	    screen = DefaultScreen(dpy);
+	    window = RootWindow(dpy, screen);
+	}
+	ENTER_XLIB();
+
+	result = XGrabKey (dpy,
+	    keyCode, modifierMask, window,
+	    False, mKbd, mPtr );
+
+	XSync(dpy, True);
+	XFlush(dpy);
+
+	LEAVE_XLIB();
+
+	if (result != Success) {
+	    if (result == BadAccess) {
+		__INST(lastError) = @symbol(badAccess);
+	    } else {
+		__INST(lastError) = @symbol(other);
+	    }
+	    RETURN (false);
+	}
+	RETURN (true);
     }
   notOK: ;
 %}.
@@ -9042,11 +9042,11 @@
      the DisplayRootWindow"
 
     ^ self
-        grabKey:keySymCodeOrChar
-        modifier:modifierMaskOrNil
-        grabModeKeyboard:#GrabModeAsync
-        grabModePointer:#GrabModeAsync
-        window:aWindowIdOrNil
+	grabKey:keySymCodeOrChar
+	modifier:modifierMaskOrNil
+	grabModeKeyboard:#GrabModeAsync
+	grabModePointer:#GrabModeAsync
+	window:aWindowIdOrNil
 
     "
      Display grabKey:#Escape modifier:nil window:nil.
@@ -9068,66 +9068,66 @@
     KeySym keySym, *syms;
 
     if (__isStringLike(keySymCodeOrChar)) {
-        keySym = XStringToKeysym(__stringVal(keySymCodeOrChar));
+	keySym = XStringToKeysym(__stringVal(keySymCodeOrChar));
     } else {
-        if (__isCharacter(keySymCodeOrChar)) {
-            char s[2];
-
-            s[0] = __intVal(__characterVal(keySymCodeOrChar));
-            s[1] = '\0';
-            keySym = XStringToKeysym(s);
-        } else {
-            if (__isSmallInteger(keySymCodeOrChar)) {
-                keySym = (KeySym) __intVal(keySymCodeOrChar);
-            } else {
-                goto notOK;
-            }
-        }
+	if (__isCharacter(keySymCodeOrChar)) {
+	    char s[2];
+
+	    s[0] = __intVal(__characterVal(keySymCodeOrChar));
+	    s[1] = '\0';
+	    keySym = XStringToKeysym(s);
+	} else {
+	    if (__isSmallInteger(keySymCodeOrChar)) {
+		keySym = (KeySym) __intVal(keySymCodeOrChar);
+	    } else {
+		goto notOK;
+	    }
+	}
     }
 
     if (modifierMaskOrNil != nil) {
-        if (__isSmallInteger(modifierMaskOrNil)) {
-            modifierMask = __intVal(modifierMaskOrNil);
-        } else {
-            goto notOK;
-        }
+	if (__isSmallInteger(modifierMaskOrNil)) {
+	    modifierMask = __intVal(modifierMaskOrNil);
+	} else {
+	    goto notOK;
+	}
     }
 
     if (ISCONNECTED) {
-        Display *dpy;
-        Window window;
-        int keyCode;
-        int result;
-
-        dpy = myDpy;
-        if (__isExternalAddress(aWindowIdOrNil)) {
-            window = __WindowVal(aWindowIdOrNil);
-        } else {
-            int screen;
-
-            screen = DefaultScreen(dpy);
-            window = RootWindow(dpy, screen);
-        }
-        keyCode = XKeysymToKeycode(dpy, keySym);
-
-        ENTER_XLIB();
-
-        result = XUngrabKey (dpy, keyCode, modifierMask, window);
-
-        XSync(dpy, True);
-        XFlush(dpy);
-
-        LEAVE_XLIB();
-
-        if (result != Success) {
-            if (result == BadAccess) {
-                __INST(lastError) = @symbol(badAccess);
-            } else {
-                __INST(lastError) = @symbol(other);
-            }
-            RETURN (false);
-        }
-        RETURN (true);
+	Display *dpy;
+	Window window;
+	int keyCode;
+	int result;
+
+	dpy = myDpy;
+	if (__isExternalAddress(aWindowIdOrNil)) {
+	    window = __WindowVal(aWindowIdOrNil);
+	} else {
+	    int screen;
+
+	    screen = DefaultScreen(dpy);
+	    window = RootWindow(dpy, screen);
+	}
+	keyCode = XKeysymToKeycode(dpy, keySym);
+
+	ENTER_XLIB();
+
+	result = XUngrabKey (dpy, keyCode, modifierMask, window);
+
+	XSync(dpy, True);
+	XFlush(dpy);
+
+	LEAVE_XLIB();
+
+	if (result != Success) {
+	    if (result == BadAccess) {
+		__INST(lastError) = @symbol(badAccess);
+	    } else {
+		__INST(lastError) = @symbol(other);
+	    }
+	    RETURN (false);
+	}
+	RETURN (true);
     }
   notOK: ;
 %}.
@@ -9148,14 +9148,14 @@
     GC gc;
 
     if (ISCONNECTED) {
-        if (__isExternalAddress(aGCId)) {
-            gc = __GCVal(aGCId);
-            gcv.clip_mask = None;
-            ENTER_XLIB();
-            XChangeGC(myDpy, gc, GCClipMask, &gcv);
-            LEAVE_XLIB();
-            RETURN ( self );
-        }
+	if (__isExternalAddress(aGCId)) {
+	    gc = __GCVal(aGCId);
+	    gcv.clip_mask = None;
+	    ENTER_XLIB();
+	    XChangeGC(myDpy, gc, GCClipMask, &gcv);
+	    LEAVE_XLIB();
+	    RETURN ( self );
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -9168,13 +9168,13 @@
 %{
 
     if (ISCONNECTED) {
-        if (__isExternalAddress(aGCId)
-         && __isSmallInteger(bgColorIndex)) {
-            ENTER_XLIB();
-            XSetBackground(myDpy, __GCVal(aGCId), __intVal(bgColorIndex));
-            LEAVE_XLIB();
-            RETURN ( self );
-        }
+	if (__isExternalAddress(aGCId)
+	 && __isSmallInteger(bgColorIndex)) {
+	    ENTER_XLIB();
+	    XSetBackground(myDpy, __GCVal(aGCId), __intVal(bgColorIndex));
+	    LEAVE_XLIB();
+	    RETURN ( self );
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -9190,25 +9190,25 @@
     Pixmap bitmap;
 
     if (ISCONNECTED) {
-        Display *dpy = myDpy;
-
-        if (__isExternalAddress(aGCId)) {
-            gc = __GCVal(aGCId);
-            if (__isExternalAddress(aBitmapId)) {
-                bitmap = __PixmapVal(aBitmapId);
-                ENTER_XLIB();
-                XSetStipple(dpy, gc, bitmap);
-                XSetFillStyle(dpy, gc, FillOpaqueStippled);
-                LEAVE_XLIB();
-                RETURN ( self );
-            }
-            if (aBitmapId == nil) {
-                ENTER_XLIB();
-                XSetFillStyle(dpy, gc, FillSolid);
-                LEAVE_XLIB();
-                RETURN ( self );
-            }
-        }
+	Display *dpy = myDpy;
+
+	if (__isExternalAddress(aGCId)) {
+	    gc = __GCVal(aGCId);
+	    if (__isExternalAddress(aBitmapId)) {
+		bitmap = __PixmapVal(aBitmapId);
+		ENTER_XLIB();
+		XSetStipple(dpy, gc, bitmap);
+		XSetFillStyle(dpy, gc, FillOpaqueStippled);
+		LEAVE_XLIB();
+		RETURN ( self );
+	    }
+	    if (aBitmapId == nil) {
+		ENTER_XLIB();
+		XSetFillStyle(dpy, gc, FillSolid);
+		LEAVE_XLIB();
+		RETURN ( self );
+	    }
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -9224,18 +9224,18 @@
     GC gc;
 
     if (ISCONNECTED) {
-        if (__isExternalAddress(aGCId)) {
-            gc = __GCVal(aGCId);
-            if (aBool == true)
-                gcv.subwindow_mode = ClipByChildren;
-            else
-                gcv.subwindow_mode = IncludeInferiors;
-
-            ENTER_XLIB();
-            XChangeGC(myDpy, gc, GCSubwindowMode, &gcv);
-            LEAVE_XLIB();
-            RETURN ( self );
-        }
+	if (__isExternalAddress(aGCId)) {
+	    gc = __GCVal(aGCId);
+	    if (aBool == true)
+		gcv.subwindow_mode = ClipByChildren;
+	    else
+		gcv.subwindow_mode = IncludeInferiors;
+
+	    ENTER_XLIB();
+	    XChangeGC(myDpy, gc, GCSubwindowMode, &gcv);
+	    LEAVE_XLIB();
+	    RETURN ( self );
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -9250,18 +9250,18 @@
     XRectangle r;
 
     if (ISCONNECTED) {
-        if (__isExternalAddress(aGCId)
-         && __bothSmallInteger(clipX, clipY)
-         && __bothSmallInteger(clipWidth, clipHeight)) {
-            r.x = __intVal(clipX);
-            r.y = __intVal(clipY);
-            r.width = __intVal(clipWidth);
-            r.height = __intVal(clipHeight);
-            ENTER_XLIB();
-            XSetClipRectangles(myDpy, __GCVal(aGCId), 0, 0, &r, 1, Unsorted);
-            LEAVE_XLIB();
-            RETURN ( self );
-        }
+	if (__isExternalAddress(aGCId)
+	 && __bothSmallInteger(clipX, clipY)
+	 && __bothSmallInteger(clipWidth, clipHeight)) {
+	    r.x = __intVal(clipX);
+	    r.y = __intVal(clipY);
+	    r.width = __intVal(clipWidth);
+	    r.height = __intVal(clipHeight);
+	    ENTER_XLIB();
+	    XSetClipRectangles(myDpy, __GCVal(aGCId), 0, 0, &r, 1, Unsorted);
+	    LEAVE_XLIB();
+	    RETURN ( self );
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -9274,17 +9274,17 @@
 %{
 
     if (ISCONNECTED) {
-        if (__isExternalAddress(aGCId)
-         && __isSmallInteger(offset)
-         && __isByteArrayLike(dashList)) {
-            ENTER_XLIB();
-            XSetDashes(myDpy, __GCVal(aGCId),
-                       __intVal(offset),
-                       __ByteArrayInstPtr(dashList)->ba_element,
-                       __byteArraySize(dashList));
-            LEAVE_XLIB();
-            RETURN ( self );
-        }
+	if (__isExternalAddress(aGCId)
+	 && __isSmallInteger(offset)
+	 && __isByteArrayLike(dashList)) {
+	    ENTER_XLIB();
+	    XSetDashes(myDpy, __GCVal(aGCId),
+		       __intVal(offset),
+		       __ByteArrayInstPtr(dashList)->ba_element,
+		       __byteArraySize(dashList));
+	    LEAVE_XLIB();
+	    RETURN ( self );
+	}
     }
 bad: ;
 %}.
@@ -9305,14 +9305,14 @@
     XFontStruct *f;
 
     if (ISCONNECTED) {
-        if (__isExternalAddress(aFontId)
-         && __isExternalAddress(aGCId)) {
-            f = (XFontStruct *) __FontVal(aFontId);
-            ENTER_XLIB();
-            XSetFont(myDpy, __GCVal(aGCId), f->fid);
-            LEAVE_XLIB();
-            RETURN ( self );
-        }
+	if (__isExternalAddress(aFontId)
+	 && __isExternalAddress(aGCId)) {
+	    f = (XFontStruct *) __FontVal(aFontId);
+	    ENTER_XLIB();
+	    XSetFont(myDpy, __GCVal(aGCId), f->fid);
+	    LEAVE_XLIB();
+	    RETURN ( self );
+	}
     }
 %}.
     "
@@ -9330,17 +9330,17 @@
     GC gc;
 
     if (ISCONNECTED) {
-        Display *dpy = myDpy;
-        if (__bothSmallInteger(fgColorIndex, bgColorIndex)
-         && __isExternalAddress(aGCId)) {
-            gc = __GCVal(aGCId);
-
-            ENTER_XLIB();
-            XSetForeground(dpy, gc, __intVal(fgColorIndex));
-            XSetBackground(dpy, gc, __intVal(bgColorIndex));
-            LEAVE_XLIB();
-            RETURN ( self );
-        }
+	Display *dpy = myDpy;
+	if (__bothSmallInteger(fgColorIndex, bgColorIndex)
+	 && __isExternalAddress(aGCId)) {
+	    gc = __GCVal(aGCId);
+
+	    ENTER_XLIB();
+	    XSetForeground(dpy, gc, __intVal(fgColorIndex));
+	    XSetBackground(dpy, gc, __intVal(bgColorIndex));
+	    LEAVE_XLIB();
+	    RETURN ( self );
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -9353,13 +9353,13 @@
 %{
 
     if (ISCONNECTED) {
-        if (__isExternalAddress(aGCId)
-         && __isSmallInteger(fgColorIndex)) {
-            ENTER_XLIB();
-            XSetForeground(myDpy, __GCVal(aGCId), __intVal(fgColorIndex));
-            LEAVE_XLIB();
-            RETURN ( self );
-        }
+	if (__isExternalAddress(aGCId)
+	 && __isSmallInteger(fgColorIndex)) {
+	    ENTER_XLIB();
+	    XSetForeground(myDpy, __GCVal(aGCId), __intVal(fgColorIndex));
+	    LEAVE_XLIB();
+	    RETURN ( self );
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -9373,30 +9373,30 @@
     int fun = -1;
 
     if (ISCONNECTED) {
-        if (__isExternalAddress(aGCId)) {
-            GC gc = __GCVal(aGCId);
-            if (aFunctionSymbol == @symbol(copy)) fun = GXcopy;
-            else if (aFunctionSymbol == @symbol(copyInverted)) fun = GXcopyInverted;
-            else if (aFunctionSymbol == @symbol(xor)) fun = GXxor;
-            else if (aFunctionSymbol == @symbol(and)) fun = GXand;
-            else if (aFunctionSymbol == @symbol(andReverse)) fun = GXandReverse;
-            else if (aFunctionSymbol == @symbol(andInverted)) fun = GXandInverted;
-            else if (aFunctionSymbol == @symbol(or)) fun = GXor;
-            else if (aFunctionSymbol == @symbol(orReverse)) fun = GXorReverse;
-            else if (aFunctionSymbol == @symbol(orInverted)) fun = GXorInverted;
-            else if (aFunctionSymbol == @symbol(invert)) fun = GXinvert;
-            else if (aFunctionSymbol == @symbol(clear)) fun = GXclear;
-            else if (aFunctionSymbol == @symbol(set)) fun = GXset;
-            else if (aFunctionSymbol == @symbol(noop)) fun = GXnoop;
-            else if (aFunctionSymbol == @symbol(equiv)) fun = GXequiv;
-            else if (aFunctionSymbol == @symbol(nand)) fun = GXnand;
-            if (fun != -1) {
-                ENTER_XLIB();
-                XSetFunction(myDpy, gc, fun);
-                LEAVE_XLIB();
-                RETURN ( self );
-            }
-        }
+	if (__isExternalAddress(aGCId)) {
+	    GC gc = __GCVal(aGCId);
+	    if (aFunctionSymbol == @symbol(copy)) fun = GXcopy;
+	    else if (aFunctionSymbol == @symbol(copyInverted)) fun = GXcopyInverted;
+	    else if (aFunctionSymbol == @symbol(xor)) fun = GXxor;
+	    else if (aFunctionSymbol == @symbol(and)) fun = GXand;
+	    else if (aFunctionSymbol == @symbol(andReverse)) fun = GXandReverse;
+	    else if (aFunctionSymbol == @symbol(andInverted)) fun = GXandInverted;
+	    else if (aFunctionSymbol == @symbol(or)) fun = GXor;
+	    else if (aFunctionSymbol == @symbol(orReverse)) fun = GXorReverse;
+	    else if (aFunctionSymbol == @symbol(orInverted)) fun = GXorInverted;
+	    else if (aFunctionSymbol == @symbol(invert)) fun = GXinvert;
+	    else if (aFunctionSymbol == @symbol(clear)) fun = GXclear;
+	    else if (aFunctionSymbol == @symbol(set)) fun = GXset;
+	    else if (aFunctionSymbol == @symbol(noop)) fun = GXnoop;
+	    else if (aFunctionSymbol == @symbol(equiv)) fun = GXequiv;
+	    else if (aFunctionSymbol == @symbol(nand)) fun = GXnand;
+	    if (fun != -1) {
+		ENTER_XLIB();
+		XSetFunction(myDpy, gc, fun);
+		LEAVE_XLIB();
+		RETURN ( self );
+	    }
+	}
     }
 %}.
     "
@@ -9414,12 +9414,12 @@
 %{
 
     if (ISCONNECTED) {
-        if (__isExternalAddress(aGCId)) {
-            ENTER_XLIB();
-            XSetGraphicsExposures(myDpy, __GCVal(aGCId), (aBoolean==true)?1:0);
-            LEAVE_XLIB();
-            RETURN ( self );
-        }
+	if (__isExternalAddress(aGCId)) {
+	    ENTER_XLIB();
+	    XSetGraphicsExposures(myDpy, __GCVal(aGCId), (aBoolean==true)?1:0);
+	    LEAVE_XLIB();
+	    RETURN ( self );
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -9443,56 +9443,56 @@
     int x_nDash;
 
     if (ISCONNECTED) {
-        if (__isExternalAddress(aGCId)
-         && __isSmallInteger(aNumber)) {
-            Display *dpy = myDpy;
-
-            if (lineStyle == @symbol(solid)) {
-                x_dashes = (char *)0;
-                x_style = LineSolid;
-            } else if (lineStyle == @symbol(dashed)) {
-                x_dashes = dashList;
-                x_nDash = sizeof(dashList);
-                x_style = LineOnOffDash;
-            } else if (lineStyle == @symbol(doubleDashed)) {
-                x_dashes = dashList;
-                x_nDash = sizeof(dashList);
-                x_style = LineDoubleDash;
-            } else if (lineStyle == @symbol(dotted)) {
-                x_dashes = dotList;
-                x_nDash = sizeof(dotList);
-                x_style = LineOnOffDash;
-            } else if (lineStyle == @symbol(dashDot)) {
-                x_dashes = dashDotList;
-                x_nDash = sizeof(dashDotList);
-                x_style = LineOnOffDash;
-            } else if (lineStyle == @symbol(dashDotDot)) {
-                x_dashes = dashDotDotList;
-                x_nDash = sizeof(dashDotDotList);
-                x_style = LineOnOffDash;
-            } else goto bad;
-
-            if (capStyle == @symbol(notLast)) x_cap = CapNotLast;
-            else if (capStyle == @symbol(butt)) x_cap = CapButt;
-            else if (capStyle == @symbol(round)) x_cap  = CapRound;
-            else if (capStyle == @symbol(projecting)) x_cap  = CapProjecting;
-            else goto bad;
-
-            if (joinStyle == @symbol(miter)) x_join = JoinMiter;
-            else if (joinStyle == @symbol(bevel)) x_join = JoinBevel;
-            else if (joinStyle == @symbol(round)) x_join  = JoinRound;
-            else goto bad;
-
-            ENTER_XLIB();
-            if (x_dashes) {
-                XSetDashes(dpy, __GCVal(aGCId), 0, x_dashes, x_nDash);
-            }
-            XSetLineAttributes(dpy,
-                               __GCVal(aGCId), __intVal(aNumber),
-                               x_style, x_cap, x_join);
-            LEAVE_XLIB();
-            RETURN ( self );
-        }
+	if (__isExternalAddress(aGCId)
+	 && __isSmallInteger(aNumber)) {
+	    Display *dpy = myDpy;
+
+	    if (lineStyle == @symbol(solid)) {
+		x_dashes = (char *)0;
+		x_style = LineSolid;
+	    } else if (lineStyle == @symbol(dashed)) {
+		x_dashes = dashList;
+		x_nDash = sizeof(dashList);
+		x_style = LineOnOffDash;
+	    } else if (lineStyle == @symbol(doubleDashed)) {
+		x_dashes = dashList;
+		x_nDash = sizeof(dashList);
+		x_style = LineDoubleDash;
+	    } else if (lineStyle == @symbol(dotted)) {
+		x_dashes = dotList;
+		x_nDash = sizeof(dotList);
+		x_style = LineOnOffDash;
+	    } else if (lineStyle == @symbol(dashDot)) {
+		x_dashes = dashDotList;
+		x_nDash = sizeof(dashDotList);
+		x_style = LineOnOffDash;
+	    } else if (lineStyle == @symbol(dashDotDot)) {
+		x_dashes = dashDotDotList;
+		x_nDash = sizeof(dashDotDotList);
+		x_style = LineOnOffDash;
+	    } else goto bad;
+
+	    if (capStyle == @symbol(notLast)) x_cap = CapNotLast;
+	    else if (capStyle == @symbol(butt)) x_cap = CapButt;
+	    else if (capStyle == @symbol(round)) x_cap  = CapRound;
+	    else if (capStyle == @symbol(projecting)) x_cap  = CapProjecting;
+	    else goto bad;
+
+	    if (joinStyle == @symbol(miter)) x_join = JoinMiter;
+	    else if (joinStyle == @symbol(bevel)) x_join = JoinBevel;
+	    else if (joinStyle == @symbol(round)) x_join  = JoinRound;
+	    else goto bad;
+
+	    ENTER_XLIB();
+	    if (x_dashes) {
+		XSetDashes(dpy, __GCVal(aGCId), 0, x_dashes, x_nDash);
+	    }
+	    XSetLineAttributes(dpy,
+			       __GCVal(aGCId), __intVal(aNumber),
+			       x_style, x_cap, x_join);
+	    LEAVE_XLIB();
+	    RETURN ( self );
+	}
     }
 bad: ;
 %}.
@@ -9513,12 +9513,12 @@
 %{
 
     if (ISCONNECTED) {
-        if (__bothSmallInteger(orgX, orgY) && __isExternalAddress(aGCid)) {
-            ENTER_XLIB();
-            XSetTSOrigin(myDpy, __GCVal(aGCid), __intVal(orgX), __intVal(orgY));
-            LEAVE_XLIB();
-            RETURN ( self );
-        }
+	if (__bothSmallInteger(orgX, orgY) && __isExternalAddress(aGCid)) {
+	    ENTER_XLIB();
+	    XSetTSOrigin(myDpy, __GCVal(aGCid), __intVal(orgX), __intVal(orgY));
+	    LEAVE_XLIB();
+	    RETURN ( self );
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -9534,25 +9534,25 @@
     Pixmap pixmap;
 
     if (ISCONNECTED) {
-        Display *dpy = myDpy;
-
-        if (__isExternalAddress(aGCId)) {
-            gc = __GCVal(aGCId);
-            if (__isExternalAddress(aPixmapId)) {
-                pixmap = __PixmapVal(aPixmapId);
-                ENTER_XLIB();
-                XSetTile(dpy, gc, pixmap);
-                XSetFillStyle(dpy, gc, FillTiled);
-                LEAVE_XLIB();
-                RETURN ( self );
-            }
-            if (aPixmapId == nil) {
-                ENTER_XLIB();
-                XSetFillStyle(dpy, gc, FillSolid);
-                LEAVE_XLIB();
-                RETURN ( self );
-            }
-        }
+	Display *dpy = myDpy;
+
+	if (__isExternalAddress(aGCId)) {
+	    gc = __GCVal(aGCId);
+	    if (__isExternalAddress(aPixmapId)) {
+		pixmap = __PixmapVal(aPixmapId);
+		ENTER_XLIB();
+		XSetTile(dpy, gc, pixmap);
+		XSetFillStyle(dpy, gc, FillTiled);
+		LEAVE_XLIB();
+		RETURN ( self );
+	    }
+	    if (aPixmapId == nil) {
+		ENTER_XLIB();
+		XSetFillStyle(dpy, gc, FillSolid);
+		LEAVE_XLIB();
+		RETURN ( self );
+	    }
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -9564,17 +9564,17 @@
     <context: #return>
 %{
     if (ISCONNECTED) {
-        if (__isExternalAddress(aGCId)
-         && __isSmallInteger(bits)) {
-            unsigned long mask = __intVal(bits);
-            if (__intVal(bits) == -1) {
-                mask = AllPlanes;
-            }
-            ENTER_XLIB();
-            XSetPlaneMask(myDpy, __GCVal(aGCId), mask);
-            LEAVE_XLIB();
-            RETURN ( self );
-        }
+	if (__isExternalAddress(aGCId)
+	 && __isSmallInteger(bits)) {
+	    unsigned long mask = __intVal(bits);
+	    if (__intVal(bits) == -1) {
+		mask = AllPlanes;
+	    }
+	    ENTER_XLIB();
+	    XSetPlaneMask(myDpy, __GCVal(aGCId), mask);
+	    LEAVE_XLIB();
+	    RETURN ( self );
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -9592,13 +9592,13 @@
 
 %{ /* UNLIMITEDSTACK */   /* calls XSync()! */
     if (ISCONNECTED) {
-        Display *dpy = myDpy;
-
-
-        __INST(displayId) = nil;
-        ENTER_XLIB();
-        XCloseDisplay(dpy);
-        LEAVE_XLIB();
+	Display *dpy = myDpy;
+
+
+	__INST(displayId) = nil;
+	ENTER_XLIB();
+	XCloseDisplay(dpy);
+	LEAVE_XLIB();
     }
 %}
 !
@@ -9609,10 +9609,10 @@
 
 %{
     if (ISCONNECTED) {
-        Display *dpy = myDpy;
-
-        __INST(displayId) = nil;
-        close(ConnectionNumber(dpy));
+	Display *dpy = myDpy;
+
+	__INST(displayId) = nil;
+	close(ConnectionNumber(dpy));
     }
 %}
 !
@@ -9629,7 +9629,7 @@
      application window group"
 
     windowGroupWindow isNil ifTrue:[
-        windowGroupWindow := WindowGroupWindow new create.
+	windowGroupWindow := WindowGroupWindow new create.
     ].
     ^ windowGroupWindow
 !
@@ -9678,15 +9678,15 @@
      as hostname:number"
 
     displayId notNil ifTrue:[
-        "/ already connected - you bad guy try to trick me manually ?
-        ^ self
+	"/ already connected - you bad guy try to trick me manually ?
+	^ self
     ].
 
     displayId := self openConnectionTo:aDisplayName.
     displayId isNil ifTrue:[
-        "/ could not connect.
-        DeviceOpenErrorSignal raiseWith:aDisplayName.
-        ^ nil
+	"/ could not connect.
+	DeviceOpenErrorSignal raiseWith:aDisplayName.
+	^ nil
     ].
 
     xlibTimeout := xlibTimeout ? DefaultXLibTimeout.
@@ -9723,8 +9723,8 @@
     self initializeDeviceSignals.
 
     Screen default isNil ifTrue:[
-        "not initialized yet?"
-        self initializeViewStyle.
+	"not initialized yet?"
+	self initializeViewStyle.
     ].
 !
 
@@ -9741,46 +9741,46 @@
 
     map := self modifierMapping.
     map isNil ifTrue:[
-        "/
-        "/ mhmh - a crippled Xlib which does not provide modifier mappings
-        "/ setup some reasonable default. If that is not sufficient,
-        "/ you have to change things from your display.rc file.
-        "/
-        altModifierMask := self modifier1Mask.
-        metaModifierMask := self modifier2Mask.
+	"/
+	"/ mhmh - a crippled Xlib which does not provide modifier mappings
+	"/ setup some reasonable default. If that is not sufficient,
+	"/ you have to change things from your display.rc file.
+	"/
+	altModifierMask := self modifier1Mask.
+	metaModifierMask := self modifier2Mask.
     ] ifFalse:[
-        | mod symbolFromKeyCode nonNilOnes |
-
-        altModifierMask := 0.
-        metaModifierMask := 0.
-
-        symbolFromKeyCode := [:key | self symbolFromKeycode:key].
-        nonNilOnes := [:str | str notNil].
-
-        mod := map at:1.
-        mod notNil ifTrue:[
-            shiftModifiers := mod collect:symbolFromKeyCode thenSelect:nonNilOnes.
-        ].
-        mod := map at:3.
-        mod notNil ifTrue:[
-            ctrlModifiers  := mod collect:symbolFromKeyCode thenSelect:nonNilOnes.
-        ].
-        mod := map at:4.
-        mod notNil ifTrue:[
-            mod := mod collect:symbolFromKeyCode thenSelect:nonNilOnes.
-            (mod includes:#'Num_Lock') ifFalse:[
-                metaModifiers := mod.
-                metaModifierMask := 1 bitShift:(4-1).
-            ].
-        ].
-        mod := map at:5.
-        mod notNil ifTrue:[
-            mod := mod collect:symbolFromKeyCode thenSelect:nonNilOnes.
-            (mod includes:#'Num_Lock') ifFalse:[
-                altModifiers   := mod.
-                altModifierMask := 1 bitShift:(5-1).
-            ].
-        ]
+	| mod symbolFromKeyCode nonNilOnes |
+
+	altModifierMask := 0.
+	metaModifierMask := 0.
+
+	symbolFromKeyCode := [:key | self symbolFromKeycode:key].
+	nonNilOnes := [:str | str notNil].
+
+	mod := map at:1.
+	mod notNil ifTrue:[
+	    shiftModifiers := mod collect:symbolFromKeyCode thenSelect:nonNilOnes.
+	].
+	mod := map at:3.
+	mod notNil ifTrue:[
+	    ctrlModifiers  := mod collect:symbolFromKeyCode thenSelect:nonNilOnes.
+	].
+	mod := map at:4.
+	mod notNil ifTrue:[
+	    mod := mod collect:symbolFromKeyCode thenSelect:nonNilOnes.
+	    (mod includes:#'Num_Lock') ifFalse:[
+		metaModifiers := mod.
+		metaModifierMask := 1 bitShift:(4-1).
+	    ].
+	].
+	mod := map at:5.
+	mod notNil ifTrue:[
+	    mod := mod collect:symbolFromKeyCode thenSelect:nonNilOnes.
+	    (mod includes:#'Num_Lock') ifFalse:[
+		altModifiers   := mod.
+		altModifierMask := 1 bitShift:(5-1).
+	    ].
+	]
     ].
 
     "
@@ -9792,29 +9792,29 @@
 
 initializeScreenBounds
     self isOpen ifFalse:[
-        "queries answer nil if not open"
-        ^ self.
+	"queries answer nil if not open"
+	^ self.
     ].
     self isXineramaActive ifTrue:[
-        |rect|
-
-        self monitorBounds do:[:eachRect|
-            rect isNil ifTrue:[
-                rect := eachRect.
-            ] ifFalse:[
-                rect := rect merge:eachRect.
-            ]
-        ].
-        width := rect width.
-        height := rect height.
-
-        "propagate possible size changes to our rootView"
-        rootView notNil ifTrue:[
-            rootView initialize.
-        ].
+	|rect|
+
+	self monitorBounds do:[:eachRect|
+	    rect isNil ifTrue:[
+		rect := eachRect.
+	    ] ifFalse:[
+		rect := rect merge:eachRect.
+	    ]
+	].
+	width := rect width.
+	height := rect height.
+
+	"propagate possible size changes to our rootView"
+	rootView notNil ifTrue:[
+	    rootView initialize.
+	].
     ] ifFalse:[
-        width := self queryWidth.
-        height := self queryHeight.
+	width := self queryWidth.
+	height := self queryHeight.
     ].
     widthMM := self queryWidthMM.
     heightMM := self queryHeightMM.
@@ -9866,12 +9866,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.
@@ -9881,13 +9881,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.
     ].
 
 %{
@@ -9906,52 +9906,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);
+	    }
+	}
     }
 %}.
 !
@@ -9966,17 +9966,17 @@
     ignoreBackingStore := false.
 
     (self serverVendor = 'X11/NeWS') ifTrue:[
-        "/
-        "/ this is a kludge around a bug in the X11/NeWS server,
-        "/ which does not correctly handle saveUnder
-        "/
-        hasSaveUnder := false.
+	"/
+	"/ this is a kludge around a bug in the X11/NeWS server,
+	"/ which does not correctly handle saveUnder
+	"/
+	hasSaveUnder := false.
     ].
 !
 
 initializeUniqueID
     uniqueDeviceID isNil ifTrue:[
-        uniqueDeviceID := UUID genUUID.
+	uniqueDeviceID := UUID genUUID.
     ]
 !
 
@@ -9997,24 +9997,24 @@
     char *nm;
 
     if (__isStringLike(dpyName))
-        nm = (char *) __stringVal(dpyName);
+	nm = (char *) __stringVal(dpyName);
     else {
-        nm = NULL;
+	nm = NULL;
     }
     dpy = XOpenDisplay(nm);
 
     if (dpy) {
-        static int firstCall = 1;
-        OBJ dpyID;
-
-        dpyID = __MKEXTERNALADDRESS(dpy);
-
-        if (firstCall) {
-            firstCall = 0;
-            XSetErrorHandler(__XErrorHandler__);
-            XSetIOErrorHandler(__XIOErrorHandler__);
-        }
-        RETURN (dpyID);
+	static int firstCall = 1;
+	OBJ dpyID;
+
+	dpyID = __MKEXTERNALADDRESS(dpy);
+
+	if (firstCall) {
+	    firstCall = 0;
+	    XSetErrorHandler(__XErrorHandler__);
+	    XSetIOErrorHandler(__XIOErrorHandler__);
+	}
+	RETURN (dpyID);
     }
 %}.
     ^ nil
@@ -10024,12 +10024,12 @@
 %{  /* NOCONTEXT */
 
     if (ISCONNECTED) {
-        Display *dpy;
-        int scr;
-
-        dpy = myDpy;
-        scr = DefaultScreen(dpy);
-        RETURN ( __MKSMALLINT(BlackPixel(dpy, scr)));
+	Display *dpy;
+	int scr;
+
+	dpy = myDpy;
+	scr = DefaultScreen(dpy);
+	RETURN ( __MKSMALLINT(BlackPixel(dpy, scr)));
     }
 %}.
     ^ nil
@@ -10043,12 +10043,12 @@
 %{  /* NOCONTEXT */
 
     if (ISCONNECTED) {
-        Display *dpy;
-        int scr;
-
-        dpy = myDpy;
-        scr = DefaultScreen(dpy);
-        RETURN ( __MKSMALLINT(DisplayCells(dpy, scr)));
+	Display *dpy;
+	int scr;
+
+	dpy = myDpy;
+	scr = DefaultScreen(dpy);
+	RETURN ( __MKSMALLINT(DisplayCells(dpy, scr)));
     }
 %}.
     ^ nil
@@ -10062,10 +10062,10 @@
 %{  /* NOCONTEXT */
 
     if (ISCONNECTED) {
-        Display *dpy;
-
-        dpy = myDpy;
-        RETURN ( __MKSMALLINT(DefaultScreen(dpy)));
+	Display *dpy;
+
+	dpy = myDpy;
+	RETURN ( __MKSMALLINT(DefaultScreen(dpy)));
     }
 %}.
     ^ nil
@@ -10079,12 +10079,12 @@
 %{  /* NOCONTEXT */
 
     if (ISCONNECTED) {
-        Display *dpy;
-        Visual *visual;
-
-        dpy = myDpy;
-        visual = DefaultVisualOfScreen(DefaultScreenOfDisplay(dpy));
-        RETURN ( __MKEXTERNALADDRESS( visual ) );
+	Display *dpy;
+	Visual *visual;
+
+	dpy = myDpy;
+	visual = DefaultVisualOfScreen(DefaultScreenOfDisplay(dpy));
+	RETURN ( __MKEXTERNALADDRESS( visual ) );
     }
 %}.
     ^ nil
@@ -10100,25 +10100,25 @@
 %{  /* NOCONTEXT */
 
     if (ISCONNECTED) {
-        Display *dpy;
-        Visual *visual;
-
-        dpy = myDpy;
-        visual = DefaultVisualOfScreen(DefaultScreenOfDisplay(dpy));
-        switch (visual->class) {
-            case StaticGray:
-                RETURN ( @symbol(StaticGray) );
-            case GrayScale:
-                RETURN ( @symbol(GrayScale) );
-            case StaticColor:
-                RETURN ( @symbol(StaticColor) );
-            case PseudoColor:
-                RETURN ( @symbol(PseudoColor) );
-            case TrueColor:
-                RETURN ( @symbol(TrueColor) );
-            case DirectColor:
-                RETURN ( @symbol(DirectColor) );
-        }
+	Display *dpy;
+	Visual *visual;
+
+	dpy = myDpy;
+	visual = DefaultVisualOfScreen(DefaultScreenOfDisplay(dpy));
+	switch (visual->class) {
+	    case StaticGray:
+		RETURN ( @symbol(StaticGray) );
+	    case GrayScale:
+		RETURN ( @symbol(GrayScale) );
+	    case StaticColor:
+		RETURN ( @symbol(StaticColor) );
+	    case PseudoColor:
+		RETURN ( @symbol(PseudoColor) );
+	    case TrueColor:
+		RETURN ( @symbol(TrueColor) );
+	    case DirectColor:
+		RETURN ( @symbol(DirectColor) );
+	}
     }
 %}.
     ^ nil
@@ -10132,12 +10132,12 @@
 %{  /* NOCONTEXT */
 
     if (ISCONNECTED) {
-        Display *dpy;
-        int scr;
-
-        dpy = myDpy;
-        scr = DefaultScreen(dpy);
-        RETURN ( __MKSMALLINT(DisplayPlanes(dpy, scr)));
+	Display *dpy;
+	int scr;
+
+	dpy = myDpy;
+	scr = DefaultScreen(dpy);
+	RETURN ( __MKSMALLINT(DisplayPlanes(dpy, scr)));
     }
 %}.
     ^ nil
@@ -10151,12 +10151,12 @@
 %{  /* NOCONTEXT */
 
     if (ISCONNECTED) {
-        Display *dpy;
-        int scr;
-
-        dpy = myDpy;
-        scr = DefaultScreen(dpy);
-        RETURN ( __MKSMALLINT(DisplayHeight(dpy, scr)));
+	Display *dpy;
+	int scr;
+
+	dpy = myDpy;
+	scr = DefaultScreen(dpy);
+	RETURN ( __MKSMALLINT(DisplayHeight(dpy, scr)));
     }
 %}.
     ^ nil
@@ -10170,18 +10170,18 @@
 %{  /* NOCONTEXT */
 
     if (ISCONNECTED) {
-        Display *dpy;
-        int scr;
-        int h;
-
-        dpy = myDpy;
-        scr = DefaultScreen(dpy);
-        h = DisplayHeightMM(dpy, scr);
-        if (h == 0) {
-            console_fprintf(stderr, "XWorkstation [warning]: invalid height - fixup\n");
-            h = 250;
-        }
-        RETURN ( __MKSMALLINT(h));
+	Display *dpy;
+	int scr;
+	int h;
+
+	dpy = myDpy;
+	scr = DefaultScreen(dpy);
+	h = DisplayHeightMM(dpy, scr);
+	if (h == 0) {
+	    console_fprintf(stderr, "XWorkstation [warning]: invalid height - fixup\n");
+	    h = 250;
+	}
+	RETURN ( __MKSMALLINT(h));
     }
 %}.
     ^ nil
@@ -10195,17 +10195,17 @@
 %{  /* NOCONTEXT */
 
     if (ISCONNECTED) {
-        Display *dpy;
-        Visual *visual;
-        OBJ redMask, greenMask, blueMask, bprgb;
-
-        dpy = myDpy;
-        visual = DefaultVisualOfScreen(DefaultScreenOfDisplay(dpy));
-        redMask   = __MKSMALLINT(visual->red_mask);
-        greenMask = __MKSMALLINT(visual->green_mask);
-        blueMask  = __MKSMALLINT(visual->blue_mask);
-        bprgb  = __MKSMALLINT(visual->bits_per_rgb);
-        RETURN ( __ARRAY_WITH4(redMask, greenMask, blueMask, bprgb) );
+	Display *dpy;
+	Visual *visual;
+	OBJ redMask, greenMask, blueMask, bprgb;
+
+	dpy = myDpy;
+	visual = DefaultVisualOfScreen(DefaultScreenOfDisplay(dpy));
+	redMask   = __MKSMALLINT(visual->red_mask);
+	greenMask = __MKSMALLINT(visual->green_mask);
+	blueMask  = __MKSMALLINT(visual->blue_mask);
+	bprgb  = __MKSMALLINT(visual->bits_per_rgb);
+	RETURN ( __ARRAY_WITH4(redMask, greenMask, blueMask, bprgb) );
     }
 %}.
     ^ nil
@@ -10219,12 +10219,12 @@
 %{  /* NOCONTEXT */
 
     if (ISCONNECTED) {
-        Display *dpy;
-        int scr;
-
-        dpy = myDpy;
-        scr = DefaultScreen(dpy);
-        RETURN ( __MKSMALLINT(WhitePixel(dpy, scr)));
+	Display *dpy;
+	int scr;
+
+	dpy = myDpy;
+	scr = DefaultScreen(dpy);
+	RETURN ( __MKSMALLINT(WhitePixel(dpy, scr)));
     }
 %}.
     ^ nil
@@ -10238,12 +10238,12 @@
 %{  /* NOCONTEXT */
 
     if (ISCONNECTED) {
-        Display *dpy;
-        int scr;
-
-        dpy = myDpy;
-        scr = DefaultScreen(dpy);
-        RETURN ( __MKSMALLINT(DisplayWidth(dpy, scr)));
+	Display *dpy;
+	int scr;
+
+	dpy = myDpy;
+	scr = DefaultScreen(dpy);
+	RETURN ( __MKSMALLINT(DisplayWidth(dpy, scr)));
     }
 %}.
     ^ nil
@@ -10257,18 +10257,18 @@
 %{  /* NOCONTEXT */
 
     if (ISCONNECTED) {
-        Display *dpy;
-        int scr;
-        int w;
-
-        dpy = myDpy;
-        scr = DefaultScreen(dpy);
-        w = DisplayWidthMM(dpy, scr);
-        if (w == 0) {
-            console_fprintf(stderr, "XWorkstation [warning]: invalid width - fixup\n");
-            w = 250;
-        }
-        RETURN ( __MKSMALLINT(w));
+	Display *dpy;
+	int scr;
+	int w;
+
+	dpy = myDpy;
+	scr = DefaultScreen(dpy);
+	w = DisplayWidthMM(dpy, scr);
+	if (w == 0) {
+	    console_fprintf(stderr, "XWorkstation [warning]: invalid width - fixup\n");
+	    w = 250;
+	}
+	RETURN ( __MKSMALLINT(w));
     }
 %}.
     ^ nil
@@ -10280,8 +10280,8 @@
 
 reinitialize
     preWaitAction notNil ifTrue:[
-        Processor removePreWaitAction:preWaitAction.
-        preWaitAction := nil.
+	Processor removePreWaitAction:preWaitAction.
+	preWaitAction := nil.
     ].
     virtualRootId := rootId := nil.
     selectionFetchers := nil.
@@ -10290,8 +10290,8 @@
 
 releaseDeviceResources
     preWaitAction notNil ifTrue:[
-        Processor removePreWaitAction:preWaitAction.
-        preWaitAction := nil.
+	Processor removePreWaitAction:preWaitAction.
+	preWaitAction := nil.
     ].
     selectionFetchers := nil.
     super releaseDeviceResources.
@@ -10315,7 +10315,7 @@
      By default, this is X's modifier1, which is the ALT key on
      most keyboards. However, there may be exceptions to this,
      and the setting can be changed with:
-        Display altModifierMask:(Display modifier2Mask)
+	Display altModifierMask:(Display modifier2Mask)
      Setting the mask to 0 disables the ALT key (in ST/X) altogether.
     "
 
@@ -10327,7 +10327,7 @@
      Nil returned for other displays"
 
     OperatingSystem isOSXlike ifTrue:[
-        ^ 8192
+	^ 8192
     ].
     ^ nil
 
@@ -10339,7 +10339,7 @@
      Nil returned for other displays"
 
     OperatingSystem isOSXlike ifTrue:[
-        ^ 16
+	^ 16
     ].
     ^ nil
 
@@ -10371,7 +10371,7 @@
      most keyboards (if present at all).
      However, there may be exceptions to this, and the setting can
      be changed with:
-        Display metaModifierMask:(Display modifier1Mask)
+	Display metaModifierMask:(Display modifier1Mask)
      Setting the mask to 0 disables the META key (in ST/X) altogether.
      As reported, some Xservers place the Meta-key onto NumLock,
      and having NumLock enabled makes ST/X think, that meta is pressed
@@ -10445,18 +10445,18 @@
     ret := Array new:8.
     nextKey := 1.
     1 to:8 do:[ :i |
-        (modifierKeyMap at:nextKey) ~= 0 ifTrue:[
-            |mod|
-
-            mod := OrderedCollection new:maxKeyPerMod.
-            modifierKeyMap from:nextKey to:(nextKey+maxKeyPerMod-1) do:[ :key |
-                key ~= 0 ifTrue:[
-                    mod add:key
-                ].
-            ].
-            ret at:i put:mod asArray.
-        ].
-        nextKey := nextKey+maxKeyPerMod.
+	(modifierKeyMap at:nextKey) ~= 0 ifTrue:[
+	    |mod|
+
+	    mod := OrderedCollection new:maxKeyPerMod.
+	    modifierKeyMap from:nextKey to:(nextKey+maxKeyPerMod-1) do:[ :key |
+		key ~= 0 ifTrue:[
+		    mod add:key
+		].
+	    ].
+	    ret at:i put:mod asArray.
+	].
+	nextKey := nextKey+maxKeyPerMod.
     ].
 
     ^ ret
@@ -10470,12 +10470,12 @@
 
      mapping := Display modifierMapping.
      ^ mapping collect:[:eachRow |
-                             eachRow notNil ifTrue:[
-                                 eachRow collect:[ :key | Display stringFromKeycode:key ].
-                             ] ifFalse:[
-                                 nil
-                             ]
-                       ].
+			     eachRow notNil ifTrue:[
+				 eachRow collect:[ :key | Display stringFromKeycode:key ].
+			     ] ifFalse:[
+				 nil
+			     ]
+		       ].
     "
 !
 
@@ -10500,22 +10500,22 @@
     XModifierKeymap *modmap;
 
     if (ISCONNECTED) {
-        Display *dpy = myDpy;
-
-        if ((modmap = XGetModifierMapping(dpy)) != 0) {
-           modifierKeyMap = __BYTEARRAY_UNINITIALIZED_NEW_INT(modmap->max_keypermod * 8);
-           if (modifierKeyMap != nil) {
-                memcpy((char *)__ByteArrayInstPtr(modifierKeyMap)->ba_element,
-                       (char *)modmap->modifiermap, modmap->max_keypermod * 8);
-           }
-           XFreeModifiermap(modmap);
-        }
+	Display *dpy = myDpy;
+
+	if ((modmap = XGetModifierMapping(dpy)) != 0) {
+	   modifierKeyMap = __BYTEARRAY_UNINITIALIZED_NEW_INT(modmap->max_keypermod * 8);
+	   if (modifierKeyMap != nil) {
+		memcpy((char *)__ByteArrayInstPtr(modifierKeyMap)->ba_element,
+		       (char *)modmap->modifiermap, modmap->max_keypermod * 8);
+	   }
+	   XFreeModifiermap(modmap);
+	}
     }
 %}.
     ^ modifierKeyMap
 
     "
-        Display rawModifierMapping
+	Display rawModifierMapping
     "
 !
 
@@ -10543,19 +10543,19 @@
     char *keystring;
 
     if (ISCONNECTED && __isSmallInteger(code)) {
-        Display *dpy = myDpy;
+	Display *dpy = myDpy;
 
 // Our Windows Xlib does not support Xkb as of 2013-01
 //        if ((keysym = XkbKeycodeToKeysym(dpy, __intVal(code), 0, 0)) != NoSymbol
-        if ((keysym = XKeycodeToKeysym(dpy, __intVal(code), 0)) != NoSymbol
-            && (keystring = XKeysymToString(keysym)) != 0)
-            str = __MKSYMBOL(keystring, 0);
+	if ((keysym = XKeycodeToKeysym(dpy, __intVal(code), 0)) != NoSymbol
+	    && (keystring = XKeysymToString(keysym)) != 0)
+	    str = __MKSYMBOL(keystring, 0);
     }
 %}.
     ^ str
 
     "
-        Display symbolFromKeycode:50
+	Display symbolFromKeycode:50
     "
 ! !
 
@@ -10565,8 +10565,8 @@
     "output an audible beep or bell"
 
     UserPreferences current beepEnabled ifTrue:[
-        self beep:0 volume:50.
-        self flush
+	self beep:0 volume:50.
+	self flush
     ]
 
     "
@@ -10586,14 +10586,14 @@
 
     if (__isSmallInteger(volumeInPercent)
      && ISCONNECTED) {
-        /* stupid: X wants -100 .. 100 and calls this percent */
-        volume = __intVal(volumeInPercent) * 2 - 100;
-        if (volume < -100) volume = -100;
-        else if (volume > 100) volume = 100;
-
-        ENTER_XLIB();
-        XBell(myDpy, volume);
-        LEAVE_XLIB();
+	/* stupid: X wants -100 .. 100 and calls this percent */
+	volume = __intVal(volumeInPercent) * 2 - 100;
+	if (volume < -100) volume = -100;
+	else if (volume > 100) volume = 100;
+
+	ENTER_XLIB();
+	XBell(myDpy, volume);
+	LEAVE_XLIB();
     }
 %}
 !
@@ -10606,9 +10606,9 @@
     <context: #return>
 %{
     if (ISCONNECTED) {
-        ENTER_XLIB();
-        XSynchronize(myDpy, 0);
-        LEAVE_XLIB();
+	ENTER_XLIB();
+	XSynchronize(myDpy, 0);
+	LEAVE_XLIB();
     }
 %}
     "
@@ -10627,9 +10627,9 @@
     <context: #return>
 %{
     if (ISCONNECTED) {
-        ENTER_XLIB();
-        XFlush(myDpy);
-        LEAVE_XLIB();
+	ENTER_XLIB();
+	XFlush(myDpy);
+	LEAVE_XLIB();
     }
 %}.
 
@@ -10641,12 +10641,12 @@
 %{
 #ifdef DPS
     if (ISCONNECTED
-        && __isExternalAddress(aDPSContext)) {
-        ENTER_XLIB();
-        DPSFlushContext(__DPSContextVal(aDPSContext));
-        LEAVE_XLIB();
-
-        RETURN ( self );
+	&& __isExternalAddress(aDPSContext)) {
+	ENTER_XLIB();
+	DPSFlushContext(__DPSContextVal(aDPSContext));
+	LEAVE_XLIB();
+
+	RETURN ( self );
     }
 #endif
 %}.
@@ -10657,12 +10657,12 @@
     "flush the device, if necessary"
 
     operationsUntilFlush notNil ifTrue:[
-        operationsUntilFlush <= 0 ifTrue:[
-            self flush.
-            ^ true.
-        ] ifFalse:[
-            operationsUntilFlush := operationsUntilFlush - 1.
-        ].
+	operationsUntilFlush <= 0 ifTrue:[
+	    self flush.
+	    ^ true.
+	] ifFalse:[
+	    operationsUntilFlush := operationsUntilFlush - 1.
+	].
     ].
     ^ false.
 !
@@ -10679,9 +10679,9 @@
 
     if (ISCONNECTED) {
 
-        ENTER_XLIB();
-        XSync(myDpy, 0);
-        LEAVE_XLIB();
+	ENTER_XLIB();
+	XSync(myDpy, 0);
+	LEAVE_XLIB();
 
     }
 %}.
@@ -10694,11 +10694,11 @@
     XMappingEvent *ev;
 
     if (ISCONNECTED && __isByteArrayLike(eB)) {
-        ev = (XMappingEvent *)(__ByteArrayInstPtr(eB)->ba_element);
-        ENTER_XLIB();
-        XRefreshKeyboardMapping(ev);
-        LEAVE_XLIB();
-        RETURN ( self );
+	ev = (XMappingEvent *)(__ByteArrayInstPtr(eB)->ba_element);
+	ENTER_XLIB();
+	XRefreshKeyboardMapping(ev);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -10738,25 +10738,25 @@
     Window focusWindow;
 
     if (ISCONNECTED) {
-        if (__isExternalAddress(aWindowId)) {
-            focusWindow = __WindowVal(aWindowId);
-        } else if (aWindowId == nil) {
-            focusWindow = None;
-        } else
-            goto err;
-        if (revertSymbol == @symbol(parent))
-            arg = RevertToParent;
-        else if (revertSymbol == @symbol(root))
-            arg = RevertToPointerRoot;
-        else
-            arg = RevertToNone;
-
-
-        ENTER_XLIB();
-        XSetInputFocus(myDpy, focusWindow, arg, CurrentTime);
-        LEAVE_XLIB();
-
-        RETURN ( self );
+	if (__isExternalAddress(aWindowId)) {
+	    focusWindow = __WindowVal(aWindowId);
+	} else if (aWindowId == nil) {
+	    focusWindow = None;
+	} else
+	    goto err;
+	if (revertSymbol == @symbol(parent))
+	    arg = RevertToParent;
+	else if (revertSymbol == @symbol(root))
+	    arg = RevertToPointerRoot;
+	else
+	    arg = RevertToNone;
+
+
+	ENTER_XLIB();
+	XSetInputFocus(myDpy, focusWindow, arg, CurrentTime);
+	LEAVE_XLIB();
+
+	RETURN ( self );
     }
 err:;
 %}.
@@ -10789,9 +10789,9 @@
 
     if (ISCONNECTED) {
 
-        ENTER_XLIB();
-        XSynchronize(myDpy, 1);
-        LEAVE_XLIB();
+	ENTER_XLIB();
+	XSynchronize(myDpy, 1);
+	LEAVE_XLIB();
 
     }
 %}
@@ -10827,20 +10827,20 @@
     unsigned int mask;
 
     if (ISCONNECTED) {
-        Display *dpy = myDpy;
-
-        w = RootWindow(dpy, screen);
-        if (w) {
-
-            ENTER_XLIB();
-            XQueryPointer(dpy, w, &rootRet, &childRet,
-                                 &rootX, &rootY,
-                                 &winX, &winY,
-                                 &mask);
-            LEAVE_XLIB();
-
-            RETURN (__MKSMALLINT(mask));
-        }
+	Display *dpy = myDpy;
+
+	w = RootWindow(dpy, screen);
+	if (w) {
+
+	    ENTER_XLIB();
+	    XQueryPointer(dpy, w, &rootRet, &childRet,
+				 &rootX, &rootY,
+				 &winX, &winY,
+				 &mask);
+	    LEAVE_XLIB();
+
+	    RETURN (__MKSMALLINT(mask));
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -10896,23 +10896,23 @@
     unsigned int mask;
 
     if (ISCONNECTED && rootWindowId != nil) {
-        Display *dpy = myDpy;
-        Window w = (Window)__externalAddressVal(rootWindowId);
-
-        ENTER_XLIB();
-        XQueryPointer(dpy, w, &rootRet, &childRet,
-                              &rootX, &rootY,
-                              &winX, &winY,
-                              &mask);
-        LEAVE_XLIB();
-        xpos = __MKSMALLINT(rootX);
-        ypos = __MKSMALLINT(rootY);
+	Display *dpy = myDpy;
+	Window w = (Window)__externalAddressVal(rootWindowId);
+
+	ENTER_XLIB();
+	XQueryPointer(dpy, w, &rootRet, &childRet,
+			      &rootX, &rootY,
+			      &winX, &winY,
+			      &mask);
+	LEAVE_XLIB();
+	xpos = __MKSMALLINT(rootX);
+	ypos = __MKSMALLINT(rootY);
 
     }
 %}.
     xpos isNil ifTrue:[
-        self primitiveFailedOrClosedConnection.
-        ^ nil
+	self primitiveFailedOrClosedConnection.
+	^ nil
     ].
     ^ xpos @ ypos
 !
@@ -10952,21 +10952,21 @@
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)
      && __bothSmallInteger(xpos, ypos)) {
-        Display *dpy = myDpy;
-        Window w = __WindowVal(aWindowId);
-
-        ENTER_XLIB();
-        XWarpPointer(dpy,
-                     None,  /* src window */
-                     w,  /* dst window */
-                     0,  /* src_x */
-                     0,  /* src_y */
-                     0,  /* src_w */
-                     0,  /* src_h */
-                     __intVal(xpos),  /* dst_x */
-                     __intVal(ypos)   /* dst_y */
-                    );
-        LEAVE_XLIB();
+	Display *dpy = myDpy;
+	Window w = __WindowVal(aWindowId);
+
+	ENTER_XLIB();
+	XWarpPointer(dpy,
+		     None,  /* src window */
+		     w,  /* dst window */
+		     0,  /* src_x */
+		     0,  /* src_y */
+		     0,  /* src_w */
+		     0,  /* src_h */
+		     __intVal(xpos),  /* dst_x */
+		     __intVal(ypos)   /* dst_y */
+		    );
+	LEAVE_XLIB();
     }
 %}.
     ^ self
@@ -10982,7 +10982,7 @@
     "register someone to be notified when the selection changes"
 
     selectionHandlers isNil ifTrue:[
-        selectionHandlers := IdentitySet new.
+	selectionHandlers := IdentitySet new.
     ].
     selectionHandlers add:someone
 !
@@ -10992,7 +10992,7 @@
      Answer nil, if there is none"
 
     selectionFetchers isNil ifTrue:[
-        ^ nil.
+	^ nil.
     ].
 
     ^ selectionFetchers at:aDrawableId ifAbsent:[].
@@ -11002,7 +11002,7 @@
     "register a SelectionFetcher that receives selection events for aDrawableId"
 
     selectionFetchers isNil ifTrue:[
-        selectionFetchers := Dictionary new.
+	selectionFetchers := Dictionary new.
     ].
 
     selectionFetchers at:aSelectionFetcher drawableID put:aSelectionFetcher.
@@ -11012,8 +11012,8 @@
     "no longer tell someone about selection changes"
 
     selectionHandlers notNil ifTrue:[
-        selectionHandlers remove:someone ifAbsent:nil.
-        selectionHandlers := selectionHandlers asNilIfEmpty
+	selectionHandlers remove:someone ifAbsent:nil.
+	selectionHandlers := selectionHandlers asNilIfEmpty
     ].
 !
 
@@ -11034,26 +11034,26 @@
 
 %{
     if (ISCONNECTED && __isAtomID(propertyID)) {
-        Display *dpy = myDpy;
-        Atom prop;
-        Window window;
-
-        prop = __AtomVal(propertyID);
-
-        if (__isExternalAddress(aWindowID)) {
-            window = __WindowVal(aWindowID);
-        } else if (aWindowID == nil) {
-            window = DefaultRootWindow(dpy);
-        } else if (__isInteger(aWindowID)) {
-            window = (Window)__unsignedLongIntVal(aWindowID);
-        } else {
-            goto fail;
-        }
-
-        ENTER_XLIB();
-        XDeleteProperty(dpy, window, prop);
-        LEAVE_XLIB();
-        RETURN(true);
+	Display *dpy = myDpy;
+	Atom prop;
+	Window window;
+
+	prop = __AtomVal(propertyID);
+
+	if (__isExternalAddress(aWindowID)) {
+	    window = __WindowVal(aWindowID);
+	} else if (aWindowID == nil) {
+	    window = DefaultRootWindow(dpy);
+	} else if (__isInteger(aWindowID)) {
+	    window = (Window)__unsignedLongIntVal(aWindowID);
+	} else {
+	    goto fail;
+	}
+
+	ENTER_XLIB();
+	XDeleteProperty(dpy, window, prop);
+	LEAVE_XLIB();
+	RETURN(true);
     }
 fail:;
 %}.
@@ -11066,62 +11066,62 @@
     |val propertyAtomID association windowIDOrNil|
 
     propertySymbolOrAtomID isString ifTrue:[
-        propertyAtomID := self atomIDOf:propertySymbolOrAtomID create:false.
-        propertyAtomID isNil ifTrue:[
-            "The propertyAtom does not even exist"
-            ^ nil
-        ].
+	propertyAtomID := self atomIDOf:propertySymbolOrAtomID create:false.
+	propertyAtomID isNil ifTrue:[
+	    "The propertyAtom does not even exist"
+	    ^ nil
+	].
     ] ifFalse:[
-        propertyAtomID := propertySymbolOrAtomID.
+	propertyAtomID := propertySymbolOrAtomID.
     ].
     aWindowOrWindowIDOrNil isView ifTrue:[
-        windowIDOrNil := aWindowOrWindowIDOrNil drawableId.
+	windowIDOrNil := aWindowOrWindowIDOrNil drawableId.
     ] ifFalse:[
-        windowIDOrNil := aWindowOrWindowIDOrNil.
+	windowIDOrNil := aWindowOrWindowIDOrNil.
     ].
 
     association := self primGetProperty:propertyAtomID from:windowIDOrNil delete:doDelete.
     association isNil ifTrue:[
-        "The property does not exist in the specified window"
-        ^ nil
+	"The property does not exist in the specified window"
+	^ nil
     ].
     val := association value.
     (val isByteArray and:[association key = (self atomIDOf:#'UTF8_STRING' create:true)]) ifTrue:[
-        val := val utf8Decoded.
+	val := val utf8Decoded.
     ].
     (val isString and:[val includes:(Character codePoint:0)]) ifTrue:[
-        val := val asCollectionOfSubCollectionsSeparatedBy:(Character codePoint:0).
+	val := val asCollectionOfSubCollectionsSeparatedBy:(Character codePoint:0).
     ].
     association value:val.
     ^ association
 
     "
      Display
-        getProperty:#'_NET_DESKTOP_NAMES'
-        from:nil
-        delete:false
+	getProperty:#'_NET_DESKTOP_NAMES'
+	from:nil
+	delete:false
 
      Display
-        getProperty:#'_NET_CURRENT_DESKTOP'
-        from:nil
-        delete:false
+	getProperty:#'_NET_CURRENT_DESKTOP'
+	from:nil
+	delete:false
 
      Display
-        getProperty:#'_NET_WM_ALLOWED_ACTIONS'
-        from:Transcript
-        delete:false
+	getProperty:#'_NET_WM_ALLOWED_ACTIONS'
+	from:Transcript
+	delete:false
 
      Display
-        getProperty:#'_NET_SUPPORTED'
-        from:nil
-        delete:false
+	getProperty:#'_NET_SUPPORTED'
+	from:nil
+	delete:false
 
      Transcript showCR:(
-         (Display
-            getProperty:#'_NET_SUPPORTED'
-            from:nil
-            delete:false) value
-                    collect:[:eachID | Display atomName:eachID])
+	 (Display
+	    getProperty:#'_NET_SUPPORTED'
+	    from:nil
+	    delete:false) value
+		    collect:[:eachID | Display atomName:eachID])
 
     "
 
@@ -11149,90 +11149,90 @@
 #   define PROP_SIZE    2048
 
     if (ISCONNECTED) {
-        Display *dpy = myDpy;
-
-        if (__isAtomID(propertyAtomID)) {
-            property = __AtomVal(propertyAtomID);
-
-            if (__isExternalAddress(aWindowIDOrNil)) {
-                window = __WindowVal(aWindowIDOrNil);
-            } else if (aWindowIDOrNil == nil) {
-                window = DefaultRootWindow(dpy);
-            } else
-                goto fail;
+	Display *dpy = myDpy;
+
+	if (__isAtomID(propertyAtomID)) {
+	    property = __AtomVal(propertyAtomID);
+
+	    if (__isExternalAddress(aWindowIDOrNil)) {
+		window = __WindowVal(aWindowIDOrNil);
+	    } else if (aWindowIDOrNil == nil) {
+		window = DefaultRootWindow(dpy);
+	    } else
+		goto fail;
 
 #ifdef PROPERTY_DEBUG
-            console_fprintf(stderr, "getProperty %x\n", property);
-#endif
-
-            do {
-                int retVal;
-                unsigned char *data;
-                unsigned long nitems, nReturnedBytes;
-
-                ENTER_XLIB();
-                retVal = XGetWindowProperty(dpy, window, property, nread/4, PROP_SIZE,
-                                            doDelete == true,
-                                            AnyPropertyType, &actual_type, &actual_format,
-                                            &nitems, &bytes_after, (unsigned char **)&data);
-                LEAVE_XLIB();
-                if (retVal != Success) {
+	    console_fprintf(stderr, "getProperty %x\n", property);
+#endif
+
+	    do {
+		int retVal;
+		unsigned char *data;
+		unsigned long nitems, nReturnedBytes;
+
+		ENTER_XLIB();
+		retVal = XGetWindowProperty(dpy, window, property, nread/4, PROP_SIZE,
+					    doDelete == true,
+					    AnyPropertyType, &actual_type, &actual_format,
+					    &nitems, &bytes_after, (unsigned char **)&data);
+		LEAVE_XLIB();
+		if (retVal != Success) {
 #ifdef PROPERTY_DEBUG
-                    console_fprintf(stderr, "- no success\n");
-#endif
-                    ok = 0;
-                    break;
-                }
+		    console_fprintf(stderr, "- no success\n");
+#endif
+		    ok = 0;
+		    break;
+		}
 #ifdef PROPERTY_DEBUG
-                console_fprintf(stderr, "- type:%x format:%d nitems:%d bytes_after:%d\n", actual_type, actual_format, nitems, bytes_after);
-#endif
-                if (actual_type == None) {
-                    // The property does not exist in the specified window
-                    ok = 0;
-                    break;
-                }
-                typeID = __MKATOMOBJ(actual_type);
-
-                nReturnedBytes = nitems * (actual_format == 32 ? sizeof(long) : actual_format / 8);
-                if (! cp) {
-                    cp = cp2 = (char *)malloc(nReturnedBytes+bytes_after);
-                    if (! cp) {
-                        XFree(data);
-                        goto fail;
-                    }
-                } else {
-                    cp2 = cp + nread;
-                }
-
-                nread += nReturnedBytes;
-                memcpy(cp2, data, nReturnedBytes);
-                XFree(data);
-            } while (bytes_after > 0);
-
-            if (ok) {
-                switch (actual_format) {
-                case 32:
-                    // bad design: even though it says "32",
-                    // what is really returned are longs.
-                    // this does make a difference on 64bit machines!
-                    val = __stArrayFromCULongArray((unsigned long*)cp, nread/sizeof(long));
-                    break;
-                case 16:
-                    val = __stArrayFromCUShortArray((unsigned short*)cp, nread/2);
-                    break;
-                case 8:
-                default:
-                    if (actual_type == XA_STRING) {
-                        val = __MKSTRING_L(cp, nread);
-                    } else {
-                        val = __MKBYTEARRAY(cp, nread);
-                    }
-                    break;
-                }
-                if (cp) free(cp);
-                goto done;
-            }
-        }
+		console_fprintf(stderr, "- type:%x format:%d nitems:%d bytes_after:%d\n", actual_type, actual_format, nitems, bytes_after);
+#endif
+		if (actual_type == None) {
+		    // The property does not exist in the specified window
+		    ok = 0;
+		    break;
+		}
+		typeID = __MKATOMOBJ(actual_type);
+
+		nReturnedBytes = nitems * (actual_format == 32 ? sizeof(long) : actual_format / 8);
+		if (! cp) {
+		    cp = cp2 = (char *)malloc(nReturnedBytes+bytes_after);
+		    if (! cp) {
+			XFree(data);
+			goto fail;
+		    }
+		} else {
+		    cp2 = cp + nread;
+		}
+
+		nread += nReturnedBytes;
+		memcpy(cp2, data, nReturnedBytes);
+		XFree(data);
+	    } while (bytes_after > 0);
+
+	    if (ok) {
+		switch (actual_format) {
+		case 32:
+		    // bad design: even though it says "32",
+		    // what is really returned are longs.
+		    // this does make a difference on 64bit machines!
+		    val = __stArrayFromCULongArray((unsigned long*)cp, nread/sizeof(long));
+		    break;
+		case 16:
+		    val = __stArrayFromCUShortArray((unsigned short*)cp, nread/2);
+		    break;
+		case 8:
+		default:
+		    if (actual_type == XA_STRING) {
+			val = __MKSTRING_L(cp, nread);
+		    } else {
+			val = __MKBYTEARRAY(cp, nread);
+		    }
+		    break;
+		}
+		if (cp) free(cp);
+		goto done;
+	    }
+	}
     }
 fail:
     if (cp) free(cp);
@@ -11256,59 +11256,59 @@
 
 %{  /* UNLIMITEDSTACK */
     if (ISCONNECTED && __isAtomID(propertyID) && __isAtomID(typeID)) {
-        Display *dpy = myDpy;
-        Atom prop, type;
-        Window window;
-
-        prop = __AtomVal(propertyID);
-        type = __AtomVal(typeID);
-
-        if (__isExternalAddress(aWindowID)) {
-            window = __WindowVal(aWindowID);
-        } else if (aWindowID == nil) {
-            window = DefaultRootWindow(dpy);
-        } else if (__isInteger(aWindowID)) {
-            window = (Window)__unsignedLongIntVal(aWindowID);
-        } else {
-            RETURN(false);
-        }
-
-        retval = true;
-
-        ENTER_XLIB();
-        if (__isInteger(anObject)) {
-            unsigned INT value = __longIntVal(anObject);
-            XChangeProperty(dpy, window, prop, type, 32,
-                            PropModeReplace,
-                            (unsigned char *)&value, 1);
-        } else if (__isByteArrayLike(anObject)) {
-            XChangeProperty(dpy, window, prop, type, 8,
-                            PropModeReplace,
-                            __byteArrayVal(anObject),
-                            __byteArraySize(anObject));
-        } else if (__isWords(anObject)) {
-            /* wordArray-like (16bit-string) object */
-            XChangeProperty(dpy, window, prop, type, 16,
-                            PropModeReplace,
-                            __stringVal(anObject),
-                            __wordArraySize(anObject));
-        } else if (__isIntegerArray(anObject)) {
-            /* array of atoms */
-            XChangeProperty(dpy, window, prop, type, 32,
-                            PropModeReplace,
-                            (char *)__integerArrayVal(anObject),
-                            __integerArraySize(anObject));
-        } else if (__isStringLike(anObject)) {
-            XChangeProperty(dpy, window, prop, type, 8,
-                            PropModeReplace,
-                            __stringVal(anObject),
-                            __stringSize(anObject));
-        } else {
-            retval = false;
-        }
-        LEAVE_XLIB();
-
-        DPRINTF(("changeProp win=%"_lx_" prop=%"_lx_" type=%"_lx_"\n", (INT)window, (INT)prop, (INT)type));
+	Display *dpy = myDpy;
+	Atom prop, type;
+	Window window;
+
+	prop = __AtomVal(propertyID);
+	type = __AtomVal(typeID);
+
+	if (__isExternalAddress(aWindowID)) {
+	    window = __WindowVal(aWindowID);
+	} else if (aWindowID == nil) {
+	    window = DefaultRootWindow(dpy);
+	} else if (__isInteger(aWindowID)) {
+	    window = (Window)__unsignedLongIntVal(aWindowID);
+	} else {
+	    RETURN(false);
+	}
+
+	retval = true;
+
+	ENTER_XLIB();
+	if (__isInteger(anObject)) {
+	    unsigned INT value = __longIntVal(anObject);
+	    XChangeProperty(dpy, window, prop, type, 32,
+			    PropModeReplace,
+			    (unsigned char *)&value, 1);
+	} else if (__isByteArrayLike(anObject)) {
+	    XChangeProperty(dpy, window, prop, type, 8,
+			    PropModeReplace,
+			    __byteArrayVal(anObject),
+			    __byteArraySize(anObject));
+	} else if (__isWords(anObject)) {
+	    /* wordArray-like (16bit-string) object */
+	    XChangeProperty(dpy, window, prop, type, 16,
+			    PropModeReplace,
+			    __stringVal(anObject),
+			    __wordArraySize(anObject));
+	} else if (__isIntegerArray(anObject)) {
+	    /* array of atoms */
+	    XChangeProperty(dpy, window, prop, type, 32,
+			    PropModeReplace,
+			    (char *)__integerArrayVal(anObject),
+			    __integerArraySize(anObject));
+	} else if (__isStringLike(anObject)) {
+	    XChangeProperty(dpy, window, prop, type, 8,
+			    PropModeReplace,
+			    __stringVal(anObject),
+			    __stringSize(anObject));
+	} else {
+	    retval = false;
+	}
+	LEAVE_XLIB();
+
+	DPRINTF(("changeProp win=%"_lx_" prop=%"_lx_" type=%"_lx_"\n", (INT)window, (INT)prop, (INT)type));
     }
 %}.
     ^ retval
@@ -11325,9 +11325,9 @@
     |windowID propertyAtoms|
 
     aWindowOrWindowIDOrNil isView ifTrue:[
-        windowID := aWindowOrWindowIDOrNil drawableId.
+	windowID := aWindowOrWindowIDOrNil drawableId.
     ] ifFalse:[
-        windowID := aWindowOrWindowIDOrNil.
+	windowID := aWindowOrWindowIDOrNil.
     ].
 
 %{
@@ -11336,40 +11336,40 @@
     int i;
 
     if (ISCONNECTED) {
-        Display *dpy = myDpy;
-        int numProps = 0;
-
-        if (__isExternalAddress(windowID)) {
-            window = __WindowVal(windowID);
-        } else if (windowID == nil) {
-            window = DefaultRootWindow(dpy);
-        } else if (__isInteger(windowID)) {
-            window = (Window)__unsignedLongIntVal(windowID);
-        } else {
-            goto fail;
-        }
-
-        ENTER_XLIB();
-        atomListPtr = XListProperties(dpy, window, &numProps);
-        LEAVE_XLIB();
-
-        if (atomListPtr == NULL) {
-            RETURN (nil);
-        }
-
-        propertyAtoms = __ARRAY_NEW_INT(numProps);
-        if (propertyAtoms == nil) {
-            goto fail;
-        }
-
-        for (i=0; i<numProps; i++) {
-            OBJ atm;
-
-            atm = __MKATOMOBJ(atomListPtr[i]);
-            __ArrayInstPtr(propertyAtoms)->a_element[i] = atm; __STORE(propertyAtoms, atm);
-        }
-        XFree(atomListPtr);
-        RETURN (propertyAtoms);
+	Display *dpy = myDpy;
+	int numProps = 0;
+
+	if (__isExternalAddress(windowID)) {
+	    window = __WindowVal(windowID);
+	} else if (windowID == nil) {
+	    window = DefaultRootWindow(dpy);
+	} else if (__isInteger(windowID)) {
+	    window = (Window)__unsignedLongIntVal(windowID);
+	} else {
+	    goto fail;
+	}
+
+	ENTER_XLIB();
+	atomListPtr = XListProperties(dpy, window, &numProps);
+	LEAVE_XLIB();
+
+	if (atomListPtr == NULL) {
+	    RETURN (nil);
+	}
+
+	propertyAtoms = __ARRAY_NEW_INT(numProps);
+	if (propertyAtoms == nil) {
+	    goto fail;
+	}
+
+	for (i=0; i<numProps; i++) {
+	    OBJ atm;
+
+	    atm = __MKATOMOBJ(atomListPtr[i]);
+	    __ArrayInstPtr(propertyAtoms)->a_element[i] = atm; __STORE(propertyAtoms, atm);
+	}
+	XFree(atomListPtr);
+	RETURN (propertyAtoms);
     }
 fail: ;
 %}.
@@ -11400,10 +11400,10 @@
     buffer replaceFrom:3 with:anIcon bits startingAt:1.
 
     self
-        setProperty:#'_NET_WM_ICON'
-        type:#CARDINAL
-        value:buffer
-        for:aWindowOrWindowID
+	setProperty:#'_NET_WM_ICON'
+	type:#CARDINAL
+	value:buffer
+	for:aWindowOrWindowID
 
     "
      Display setIcon:0 for:Transcript
@@ -11419,29 +11419,29 @@
     |propertyAtomID typeAtomID windowIDOrNil|
 
     propertySymbolOrAtomID isString ifTrue:[
-        propertyAtomID := self atomIDOf:propertySymbolOrAtomID create:false.
-        propertyAtomID isNil ifTrue:[
-            "/ the property atom does not exist
-            Logger info:'property ATOM does not exist: %1' with:propertySymbolOrAtomID.
-            ^ false
-        ].
+	propertyAtomID := self atomIDOf:propertySymbolOrAtomID create:false.
+	propertyAtomID isNil ifTrue:[
+	    "/ the property atom does not exist
+	    Logger info:'property ATOM does not exist: %1' with:propertySymbolOrAtomID.
+	    ^ false
+	].
     ] ifFalse:[
-        propertyAtomID := propertySymbolOrAtomID.
+	propertyAtomID := propertySymbolOrAtomID.
     ].
     typeSymbolOrAtomID isString ifTrue:[
-        typeAtomID := self atomIDOf:typeSymbolOrAtomID create:false.
-        typeAtomID isNil ifTrue:[
-            "/ the type atom does not exist
-            Logger info:'type ATOM does not exist: %1' with:typeSymbolOrAtomID.
-            ^ false
-        ].
+	typeAtomID := self atomIDOf:typeSymbolOrAtomID create:false.
+	typeAtomID isNil ifTrue:[
+	    "/ the type atom does not exist
+	    Logger info:'type ATOM does not exist: %1' with:typeSymbolOrAtomID.
+	    ^ false
+	].
     ] ifFalse:[
-        typeAtomID := typeSymbolOrAtomID.
+	typeAtomID := typeSymbolOrAtomID.
     ].
     aWindowOrWindowIDOrNil isView ifTrue:[
-        windowIDOrNil := aWindowOrWindowIDOrNil drawableId.
+	windowIDOrNil := aWindowOrWindowIDOrNil drawableId.
     ] ifFalse:[
-        windowIDOrNil := aWindowOrWindowIDOrNil.
+	windowIDOrNil := aWindowOrWindowIDOrNil.
     ].
 
     ^ self primSetProperty:propertyAtomID type:typeAtomID value:anObject for:windowIDOrNil
@@ -11460,7 +11460,7 @@
     extent := self monitorBounds first extent.
 
     self isPDA ifTrue:[
-        ^ extent - (16 @ 20)
+	^ extent - (16 @ 20)
     ].
     ^ extent * 2 // 3
 !
@@ -11476,12 +11476,12 @@
 
 #ifdef XINERAMA
     if (ISCONNECTED) {
-        Display *dpy;
-        dpy = myDpy;
-
-        if (XineramaIsActive(dpy)) {
-            RETURN ( true );
-        }
+	Display *dpy;
+	dpy = myDpy;
+
+	if (XineramaIsActive(dpy)) {
+	    RETURN ( true );
+	}
     }
 #endif
 %}.
@@ -11524,15 +11524,15 @@
 
     atomSymbol := aStringOrSymbol asSymbol.
     (atoms notNil and:[(atom := atoms at:atomSymbol ifAbsent:[nil]) notNil]) ifTrue:[
-        ^ atom.
+	^ atom.
     ].
 
     atom := self primAtomIDOf:atomSymbol create:create.
     atom notNil ifTrue:[
-        atoms isNil ifTrue:[
-            atoms := IdentityDictionary new.
-        ].
-        atoms at:atomSymbol put:atom.
+	atoms isNil ifTrue:[
+	    atoms := IdentityDictionary new.
+	].
+	atoms at:atomSymbol put:atom.
     ].
 
     ^ atom
@@ -11559,15 +11559,15 @@
     char *name;
 
     if (ISCONNECTED && __isAtomID(anAtomID)) {
-        ENTER_XLIB();
-        name = XGetAtomName(myDpy, __AtomVal(anAtomID));
-        LEAVE_XLIB();
-        if (name == 0) {
-            RETURN (nil);
-        }
-        str = __MKSTRING(name);
-        XFree(name);
-        RETURN ( str );
+	ENTER_XLIB();
+	name = XGetAtomName(myDpy, __AtomVal(anAtomID));
+	LEAVE_XLIB();
+	if (name == 0) {
+	    RETURN (nil);
+	}
+	str = __MKSTRING(name);
+	XFree(name);
+	RETURN ( str );
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -11591,11 +11591,11 @@
      This is highly X specific and  currently not used.
 
      Notice:
-        we do not plan to use X's resources for ST/X's defaults,
-        styles or resources. This would make porting of applications
-        to different platforms much more difficult (Windows has no resource
-        database). If you stay within ST/X's resource files, these can be
-        easily transported to other platforms.
+	we do not plan to use X's resources for ST/X's defaults,
+	styles or resources. This would make porting of applications
+	to different platforms much more difficult (Windows has no resource
+	database). If you stay within ST/X's resource files, these can be
+	easily transported to other platforms.
 
      This method is provided for special applications which want to access
      existing X resources and are not planned to be ever ported to other
@@ -11608,27 +11608,27 @@
      && __isStringLike(name)
      && __isStringLike(cls)) {
 
-        rslt = XGetDefault(myDpy, (char *) __stringVal(cls),
-                                  (char *) __stringVal(name));
-
-        RETURN (rslt ? __MKSTRING(rslt) : nil );
+	rslt = XGetDefault(myDpy, (char *) __stringVal(cls),
+				  (char *) __stringVal(name));
+
+	RETURN (rslt ? __MKSTRING(rslt) : nil );
     }
 %}.
     self primitiveFailedOrClosedConnection.
     ^ nil.
 
     "if your ~/.Xdefaults contains an entry such as:
-        OpenWindows.Beep:       notices
+	OpenWindows.Beep:       notices
      the following returns 'notices'.
 
-         Display getResource:'Beep' class:'OpenWindows'
+	 Display getResource:'Beep' class:'OpenWindows'
 
      if your ~/.Xdefaults contains an entry such as:
-        *.beNiceToColormap:       false
+	*.beNiceToColormap:       false
      the following return 'false'.
 
-         Display getResource:'beNiceToColormap' class:'any'
-         Display getResource:'beNiceToColormap' class:''
+	 Display getResource:'beNiceToColormap' class:'any'
+	 Display getResource:'beNiceToColormap' class:''
     "
 !
 
@@ -11644,14 +11644,14 @@
     if (ISCONNECTED
      && __isStringLike(aStringOrSymbol)) {
 
-        ENTER_XLIB();
-        prop = XInternAtom(myDpy, __stringVal(aStringOrSymbol),
-                                  (create == true) ? False : True);
-        LEAVE_XLIB();
-        if (prop == None) {
-            RETURN (nil);
-        }
-        RETURN ( __MKATOMOBJ(prop) );
+	ENTER_XLIB();
+	prop = XInternAtom(myDpy, __stringVal(aStringOrSymbol),
+				  (create == true) ? False : True);
+	LEAVE_XLIB();
+	if (prop == None) {
+	    RETURN (nil);
+	}
+	RETURN ( __MKATOMOBJ(prop) );
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -11677,35 +11677,35 @@
     |rawInfo info|
 
     ((w <= 0) or:[h <= 0]) ifTrue:[
-        self primitiveFailed.
-        ^ nil
+	self primitiveFailed.
+	^ nil
     ].
 
     rawInfo := Array new:8.
-                  "1 -> bit order"
-                  "2 -> depth"
-                  "3 -> bytes_per_line"
-                  "4 -> byte_order"
-                  "5 -> format"
-                  "6 -> bitmap_unit"
-                  "7 -> bitmap_pad"
-                  "8 -> bits_per_pixel"
+		  "1 -> bit order"
+		  "2 -> depth"
+		  "3 -> bytes_per_line"
+		  "4 -> byte_order"
+		  "5 -> format"
+		  "6 -> bitmap_unit"
+		  "7 -> bitmap_pad"
+		  "8 -> bits_per_pixel"
 
     "/ had to extract the getPixel call into a separate method, to specify
     "/ unlimitedStack (some implementations use alloca and require huge amounts
     "/ of temporary stack space
 
     (self primGetBitsFrom:aDrawableId x:srcx y:srcy width:w height:h into:imageBits infoInto:rawInfo) ifTrue:[
-        info := IdentityDictionary new.
-        info at:#bitOrder put:(rawInfo at:1).
-        info at:#depth put:(rawInfo at:2).
-        info at:#bytesPerLine put:(rawInfo at:3).
-        info at:#byteOrder put:(rawInfo at:4).
-        info at:#format put:(rawInfo at:5).
-        info at:#bitmapUnit put:(rawInfo at:6).
-        info at:#bitmapPad put:(rawInfo at:7).
-        info at:#bitsPerPixel put:(rawInfo at:8).
-        ^ info
+	info := IdentityDictionary new.
+	info at:#bitOrder put:(rawInfo at:1).
+	info at:#depth put:(rawInfo at:2).
+	info at:#bytesPerLine put:(rawInfo at:3).
+	info at:#byteOrder put:(rawInfo at:4).
+	info at:#format put:(rawInfo at:5).
+	info at:#bitmapUnit put:(rawInfo at:6).
+	info at:#bitmapPad put:(rawInfo at:7).
+	info at:#bitsPerPixel put:(rawInfo at:8).
+	^ info
     ].
     "
      some error occurred - either args are not smallintegers, imageBits is not a ByteArray
@@ -11730,20 +11730,20 @@
 
     if (ISCONNECTED
      && __isExternalAddress(aDrawableId) && __bothSmallInteger(x, y)) {
-        win = __WindowVal(aDrawableId);
-        xpos = __intVal(x);
-        ypos = __intVal(y);
-        if ((xpos < 0) || (ypos < 0)) {
-            RETURN ( __MKSMALLINT(0) );
-        }
-        ENTER_XLIB();
-        img = XGetImage(myDpy, win, xpos, ypos, 1, 1, ~(unsigned long)0, ZPixmap);
-        LEAVE_XLIB();
-        if (img != 0) {
-            ret = XGetPixel(img, 0, 0);
-            XDestroyImage(img);
-            RETURN (  __MKSMALLINT(ret) );
-        }
+	win = __WindowVal(aDrawableId);
+	xpos = __intVal(x);
+	ypos = __intVal(y);
+	if ((xpos < 0) || (ypos < 0)) {
+	    RETURN ( __MKSMALLINT(0) );
+	}
+	ENTER_XLIB();
+	img = XGetImage(myDpy, win, xpos, ypos, 1, 1, ~(unsigned long)0, ZPixmap);
+	LEAVE_XLIB();
+	if (img != 0) {
+	    ret = XGetPixel(img, 0, 0);
+	    XDestroyImage(img);
+	    RETURN (  __MKSMALLINT(ret) );
+	}
     }
 %}.
     ^ nil
@@ -11769,80 +11769,80 @@
      && __bothSmallInteger(w, h)
      && __isArray(info) && (__arraySize(info) >= 8)
      && __isByteArray(imageBits)) {
-        Display *dpy = myDpy;
-
-        win = __WindowVal(aDrawableId);
-        ENTER_XLIB();
-        image = XGetImage(dpy, win, __intVal(srcx), __intVal(srcy),
-                                    __intVal(w), __intVal(h),
-                                    (unsigned long)AllPlanes, ZPixmap);
-        LEAVE_XLIB();
-
-        if (! image) {
-            RETURN ( false );
-        }
-
-        pad = image->bitmap_pad;
+	Display *dpy = myDpy;
+
+	win = __WindowVal(aDrawableId);
+	ENTER_XLIB();
+	image = XGetImage(dpy, win, __intVal(srcx), __intVal(srcy),
+				    __intVal(w), __intVal(h),
+				    (unsigned long)AllPlanes, ZPixmap);
+	LEAVE_XLIB();
+
+	if (! image) {
+	    RETURN ( false );
+	}
+
+	pad = image->bitmap_pad;
 #ifdef SUPERDEBUG
-        console_printf("pad:%d depth:%d\n", image->bitmap_pad, image->depth);
-#endif
-        switch (image->depth) {
-            case 1:
-            case 2:
-            case 4:
-            case 8:
-            case 16:
-            case 24:
-            case 32:
-                numBytes = image->bytes_per_line * image->height;
-                break;
-
-            default:
-                /* unsupported depth ? */
-                console_fprintf(stderr, "possibly unsupported depth:%d in primGetBits\n", image->depth);
-                numBytes = image->bytes_per_line * image->height;
-                break;
-        }
+	console_printf("pad:%d depth:%d\n", image->bitmap_pad, image->depth);
+#endif
+	switch (image->depth) {
+	    case 1:
+	    case 2:
+	    case 4:
+	    case 8:
+	    case 16:
+	    case 24:
+	    case 32:
+		numBytes = image->bytes_per_line * image->height;
+		break;
+
+	    default:
+		/* unsupported depth ? */
+		console_fprintf(stderr, "possibly unsupported depth:%d in primGetBits\n", image->depth);
+		numBytes = image->bytes_per_line * image->height;
+		break;
+	}
 
 #ifdef SUPERDEBUG
-        console_printf("bytes need:%d bytes given:%d\n", numBytes, __byteArraySize(imageBits));
-#endif
-
-        if (numBytes > __byteArraySize(imageBits)) {
-            /* imageBits too small */
-            console_fprintf(stderr, "Workstation [warning]: byteArray too small in primGetBits\n");
-            console_fprintf(stderr, "  bytes need:%d given:%d\n", numBytes, (int)__byteArraySize(imageBits));
-            console_fprintf(stderr, "  pad:%d depth:%d imgBytesPerLine:%d\n",
-                                image->bitmap_pad, image->depth, image->bytes_per_line);
-            goto fail;
-        }
-        if (image->bitmap_bit_order == MSBFirst)
-            __ArrayInstPtr(info)->a_element[0] = @symbol(msbFirst);
-        else
-            __ArrayInstPtr(info)->a_element[0] = @symbol(lsbFirst);
-        __ArrayInstPtr(info)->a_element[1] = __MKSMALLINT(image->depth);
-        __ArrayInstPtr(info)->a_element[2] = __MKSMALLINT(image->bytes_per_line);
-        if (image->byte_order == MSBFirst)
-            __ArrayInstPtr(info)->a_element[3] = @symbol(msbFirst);
-        else
-            __ArrayInstPtr(info)->a_element[3] = @symbol(lsbFirst);
-        if (image->format == XYBitmap)
-            __ArrayInstPtr(info)->a_element[4] = @symbol(XYBitmap);
-        else if (image->format == XYPixmap)
-            __ArrayInstPtr(info)->a_element[4] = @symbol(XYPixmap);
-        else if (image->format == ZPixmap)
-            __ArrayInstPtr(info)->a_element[4] = @symbol(ZPixmap);
-
-        __ArrayInstPtr(info)->a_element[5] = __MKSMALLINT(image->bitmap_unit);
-        __ArrayInstPtr(info)->a_element[6] = __MKSMALLINT(image->bitmap_pad);
-        __ArrayInstPtr(info)->a_element[7] = __MKSMALLINT(image->bits_per_pixel);
-        bcopy(image->data, __ByteArrayInstPtr(imageBits)->ba_element, numBytes);
-        XDestroyImage(image);
-        RETURN ( true );
+	console_printf("bytes need:%d bytes given:%d\n", numBytes, __byteArraySize(imageBits));
+#endif
+
+	if (numBytes > __byteArraySize(imageBits)) {
+	    /* imageBits too small */
+	    console_fprintf(stderr, "Workstation [warning]: byteArray too small in primGetBits\n");
+	    console_fprintf(stderr, "  bytes need:%d given:%d\n", numBytes, (int)__byteArraySize(imageBits));
+	    console_fprintf(stderr, "  pad:%d depth:%d imgBytesPerLine:%d\n",
+				image->bitmap_pad, image->depth, image->bytes_per_line);
+	    goto fail;
+	}
+	if (image->bitmap_bit_order == MSBFirst)
+	    __ArrayInstPtr(info)->a_element[0] = @symbol(msbFirst);
+	else
+	    __ArrayInstPtr(info)->a_element[0] = @symbol(lsbFirst);
+	__ArrayInstPtr(info)->a_element[1] = __MKSMALLINT(image->depth);
+	__ArrayInstPtr(info)->a_element[2] = __MKSMALLINT(image->bytes_per_line);
+	if (image->byte_order == MSBFirst)
+	    __ArrayInstPtr(info)->a_element[3] = @symbol(msbFirst);
+	else
+	    __ArrayInstPtr(info)->a_element[3] = @symbol(lsbFirst);
+	if (image->format == XYBitmap)
+	    __ArrayInstPtr(info)->a_element[4] = @symbol(XYBitmap);
+	else if (image->format == XYPixmap)
+	    __ArrayInstPtr(info)->a_element[4] = @symbol(XYPixmap);
+	else if (image->format == ZPixmap)
+	    __ArrayInstPtr(info)->a_element[4] = @symbol(ZPixmap);
+
+	__ArrayInstPtr(info)->a_element[5] = __MKSMALLINT(image->bitmap_unit);
+	__ArrayInstPtr(info)->a_element[6] = __MKSMALLINT(image->bitmap_pad);
+	__ArrayInstPtr(info)->a_element[7] = __MKSMALLINT(image->bits_per_pixel);
+	bcopy(image->data, __ByteArrayInstPtr(imageBits)->ba_element, numBytes);
+	XDestroyImage(image);
+	RETURN ( true );
     }
 fail:
     if (image) {
-        XDestroyImage(image);
+	XDestroyImage(image);
     }
 %}.
     ^ false
@@ -11863,22 +11863,22 @@
 
     selectionOwnerWindowId := self getSelectionOwnerOf:clipboardAtom.
     (selectionOwnerWindowId isNil   "no selection. There is the possibilty that one of our (modal) views has been closed.
-                                     Get the selection from our own buffer"
+				     Get the selection from our own buffer"
      or:[self viewIdKnown:selectionOwnerWindowId]) ifTrue:[
-        "one of our own views still holds the selection, so return my locally buffered data"
-        ^ copyBuffer
+	"one of our own views still holds the selection, so return my locally buffered data"
+	^ copyBuffer
     ].
 
     drawableId isNil ifTrue:[
-        "sorry, cannot fetch a selection, if there is no drawableId.
-         Should I borrow a drawableId from another window?"
-        ^ nil.
+	"sorry, cannot fetch a selection, if there is no drawableId.
+	 Should I borrow a drawableId from another window?"
+	^ nil.
     ].
 
     selection := SelectionFetcher
-        requestSelection:clipboardAtom
-        type:(self atomIDOf:#'ST_OBJECT')
-        onDevice:self for:drawableId.
+	requestSelection:clipboardAtom
+	type:(self atomIDOf:#'ST_OBJECT')
+	onDevice:self for:drawableId.
 
     "/ should not happen
     "/ cg: disabled the code below: I don't want any string here (when asking for an object)
@@ -11914,40 +11914,40 @@
     |selectionId selectionOwnerWindowId selection|
 
     selectionBufferSymbol == #selection ifTrue:[
-        selectionId := primaryAtom.
+	selectionId := primaryAtom.
     ] ifFalse:[
-        selectionId := clipboardAtom.
+	selectionId := clipboardAtom.
     ].
 
     selectionOwnerWindowId := self getSelectionOwnerOf:selectionId.
     (selectionOwnerWindowId isNil   "no selection. There is the possibilty that one of our (modal) views has been closed.
-                                     Get the selection from our own buffer"
+				     Get the selection from our own buffer"
      or:[self viewIdKnown:selectionOwnerWindowId]) ifTrue:[
-        "One of our own views still holds the selection, so return my locally buffered data"
-        "JV@2012-04-02: Added support for PRIMARY/SELECTION buffers."
-        ^ selectionId == primaryAtom ifTrue:[
-            self primaryBufferAsString
-        ] ifFalse:[
-            self copyBufferAsString.
-        ]
+	"One of our own views still holds the selection, so return my locally buffered data"
+	"JV@2012-04-02: Added support for PRIMARY/SELECTION buffers."
+	^ selectionId == primaryAtom ifTrue:[
+	    self primaryBufferAsString
+	] ifFalse:[
+	    self copyBufferAsString.
+	]
     ].
 
     drawableId isNil ifTrue:[
-        "sorry, cannot fetch a selection, if there is no drawableId.
-         Should I borrow a drawableId from another window?"
-         ^ nil.
+	"sorry, cannot fetch a selection, if there is no drawableId.
+	 Should I borrow a drawableId from another window?"
+	 ^ nil.
     ].
 
     selection := SelectionFetcher
-        requestSelection:selectionId
-        type:(self atomIDOf:#'UTF8_STRING')
-        onDevice:self for:drawableId.
+	requestSelection:selectionId
+	type:(self atomIDOf:#'UTF8_STRING')
+	onDevice:self for:drawableId.
 
     selection isNil ifTrue:[
-        selection := SelectionFetcher
-            requestSelection:selectionId
-            type:(self atomIDOf:#STRING)
-            onDevice:self for:drawableId.
+	selection := SelectionFetcher
+	    requestSelection:selectionId
+	    type:(self atomIDOf:#STRING)
+	    onDevice:self for:drawableId.
     ].
 
     ^ selection
@@ -11973,20 +11973,20 @@
     buffer := self perform:bufferGetSelector.
 
     (aTargetAtomID == (self atomIDOf:#'ST_OBJECT')) ifTrue:[
-        "/ 'st-object' printCR.
-        "send the selection in binaryStore format"
-        "require libboss to be loaded"
-        (Smalltalk isClassLibraryLoaded:'libstx_libboss') ifFalse:[
-            Logger error:'cannot use binary store for copy buffer (libboss missing)'.
-            ^ nil -> nil.
-        ].
-
-        [
-            ^ aTargetAtomID -> (buffer binaryStoreBytes).
-        ] on:Error do:[:ex|
-            Logger info:'error on binary store of copy buffer: %1' with: ex description.
-            ^ nil -> nil.
-        ].
+	"/ 'st-object' printCR.
+	"send the selection in binaryStore format"
+	"require libboss to be loaded"
+	(Smalltalk isClassLibraryLoaded:'libstx_libboss') ifFalse:[
+	    Logger error:'cannot use binary store for copy buffer (libboss missing)'.
+	    ^ nil -> nil.
+	].
+
+	[
+	    ^ aTargetAtomID -> (buffer binaryStoreBytes).
+	] on:Error do:[:ex|
+	    Logger info:'error on binary store of copy buffer: %1' with: ex description.
+	    ^ nil -> nil.
+	].
     ].
 
     bufferAsString := self class bufferAsString:buffer.
@@ -11994,25 +11994,25 @@
     (aTargetAtomID == (self atomIDOf:#STRING)
      or:[aTargetAtomID == (self atomIDOf:#'text/plain')]
     ) ifTrue:[
-        "/ 'string' printCR.
-        "the other view wants the selection as string"
-        ^ aTargetAtomID -> (bufferAsString asSingleByteStringReplaceInvalidWith:$#).
+	"/ 'string' printCR.
+	"the other view wants the selection as string"
+	^ aTargetAtomID -> (bufferAsString asSingleByteStringReplaceInvalidWith:$#).
     ].
 
     (aTargetAtomID == (self atomIDOf:#UTF8_STRING)
      or:[aTargetAtomID == (self atomIDOf:#'text/plain;codeset=utf-8')]
     ) ifTrue:[
-        "/ 'utf string' printCR.
-        "the other view wants the selection as utf8 string"
-        ^ aTargetAtomID -> (bufferAsString utf8Encoded).
+	"/ 'utf string' printCR.
+	"the other view wants the selection as utf8 string"
+	^ aTargetAtomID -> (bufferAsString utf8Encoded).
     ].
 
     aTargetAtomID == (self atomIDOf:#LENGTH) ifTrue:[
-        "the other one wants to know the size of our selection.
-         LENGTH is deprecated, since we do not know how the selection is
-         going to be converted. The client must not rely on the length returned"
-
-        ^ (self atomIDOf:#INTEGER) -> (bufferAsString size).
+	"the other one wants to know the size of our selection.
+	 LENGTH is deprecated, since we do not know how the selection is
+	 going to be converted. The client must not rely on the length returned"
+
+	^ (self atomIDOf:#INTEGER) -> (bufferAsString size).
     ].
 
     "we do not support the requestet target type"
@@ -12063,14 +12063,14 @@
 
     "Note: some sender code assumes that ST_OBJECT is first"
     ^ #(
-        ST_OBJECT
-        STRING
-        UTF8_STRING
-        TIMESTAMP
-        TARGETS
-        LENGTH
-        #'text/plain'
-        #'text/plain;codeset=utf-8'
+	ST_OBJECT
+	STRING
+	UTF8_STRING
+	TIMESTAMP
+	TARGETS
+	LENGTH
+	#'text/plain'
+	#'text/plain;codeset=utf-8'
     ) collect:[:eachTargetSymbol| self atomIDOf:eachTargetSymbol] as:IntegerArray.
 
     "Modified (format): / 24-11-2017 / 11:06:23 / cg"
@@ -12087,21 +12087,21 @@
     |selectionAtomID|
 
     selectionAtomSymbolOrID isString ifTrue:[
-        selectionAtomID := self atomIDOf:selectionAtomSymbolOrID create:false.
+	selectionAtomID := self atomIDOf:selectionAtomSymbolOrID create:false.
     ] ifFalse:[
-        selectionAtomID := selectionAtomSymbolOrID.
+	selectionAtomID := selectionAtomSymbolOrID.
     ].
 
 %{
     Window window;
 
     if (__isAtomID(selectionAtomID) && ISCONNECTED) {
-        Display *dpy = myDpy;
-
-        ENTER_XLIB();
-        window = XGetSelectionOwner(dpy, __AtomVal(selectionAtomID));
-        LEAVE_XLIB();
-        RETURN ((window == None) ? nil : __MKEXTERNALADDRESS(window));
+	Display *dpy = myDpy;
+
+	ENTER_XLIB();
+	window = XGetSelectionOwner(dpy, __AtomVal(selectionAtomID));
+	LEAVE_XLIB();
+	RETURN ((window == None) ? nil : __MKEXTERNALADDRESS(window));
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -12125,34 +12125,34 @@
      && __isAtomID(typeID)
      && __isAtomID(propertyID)
      && __isAtomID(selectionID)) {
-        Display *dpy = myDpy;
-        Window w;
-        Time time;
-
-        if (__isExternalAddress(aWindowId)) {
-            w = __WindowVal(aWindowId);
-        } else if (aWindowId == nil) {
-            w = (Window)0;
-        } else
-            goto err;
-
-        if (anIntegerTimestamp == nil) {
-            /*
-             * the ICCCM convention says: you should set the time to the time when
-             * the selection was requested and not to CurrentTime
-             */
-            time = CurrentTime;
-        } else if (__isInteger(anIntegerTimestamp)) {
-            time = __unsignedLongIntVal(anIntegerTimestamp);
-        } else
-            goto err;
-
-        ENTER_XLIB();
-        XConvertSelection(dpy, __AtomVal(selectionID), __AtomVal(typeID),
-                               __AtomVal(propertyID), w, time);
-        LEAVE_XLIB();
-
-        RETURN (true);
+	Display *dpy = myDpy;
+	Window w;
+	Time time;
+
+	if (__isExternalAddress(aWindowId)) {
+	    w = __WindowVal(aWindowId);
+	} else if (aWindowId == nil) {
+	    w = (Window)0;
+	} else
+	    goto err;
+
+	if (anIntegerTimestamp == nil) {
+	    /*
+	     * the ICCCM convention says: you should set the time to the time when
+	     * the selection was requested and not to CurrentTime
+	     */
+	    time = CurrentTime;
+	} else if (__isInteger(anIntegerTimestamp)) {
+	    time = __unsignedLongIntVal(anIntegerTimestamp);
+	} else
+	    goto err;
+
+	ENTER_XLIB();
+	XConvertSelection(dpy, __AtomVal(selectionID), __AtomVal(typeID),
+			       __AtomVal(propertyID), w, time);
+	LEAVE_XLIB();
+
+	RETURN (true);
 err:;
     }
 %}.
@@ -12161,17 +12161,17 @@
 
     "
      Display
-        requestSelection:(Display atomIDOf:'PRIMARY')
-        property:(Display atomIDOf:'VT_SELECTION')
-        type:(Display atomIDOf:'STRING')
-        for:Transcript id
+	requestSelection:(Display atomIDOf:'PRIMARY')
+	property:(Display atomIDOf:'VT_SELECTION')
+	type:(Display atomIDOf:'STRING')
+	for:Transcript id
     "
     "
      Display
-        requestSelection:(Display atomIDOf:'PRIMARY')
-        property:(Display atomIDOf:'VT_SELECTION')
-        type:(Display atomIDOf:'C_STRING')
-        for:Transcript id
+	requestSelection:(Display atomIDOf:'PRIMARY')
+	property:(Display atomIDOf:'VT_SELECTION')
+	type:(Display atomIDOf:'C_STRING')
+	for:Transcript id
     "
 !
 
@@ -12185,72 +12185,72 @@
     <context: #return>
 %{
     if (ISCONNECTED
-        && (__isAtomID(propertyID) || propertyID == nil)
-        && __isAtomID(targetID) && __isAtomID(selectionID)) {
-        Display *dpy = myDpy;
-        XEvent ev;
-        Window requestor;
-        Status result;
-
-        if (__isExternalAddress(requestorID)) {
-            requestor = __WindowVal(requestorID);
-        } else if (__isSmallInteger(requestorID)) {
-            requestor = (Window)__smallIntegerVal(requestorID);
-        } else if (requestorID == nil) {
-            requestor = DefaultRootWindow(dpy);
-        } else {
-            requestor = (Window)__unsignedLongIntVal(requestorID);
-        }
-
-        ev.xselection.type = SelectionNotify;
-        ev.xselection.display = dpy;
-        ev.xselection.selection = __AtomVal(selectionID);
-        ev.xselection.target = __AtomVal(targetID);
-        ev.xselection.requestor = requestor;
-
-        if (__isExternalAddress(aTime)) {
-            ev.xselection.time = (INT)(__externalAddressVal(aTime));
-        } else if (__isSmallInteger(aTime)) {
-            ev.xselection.time = __smallIntegerVal(aTime);
-        } else if (aTime == nil) {
-            ev.xselection.time = CurrentTime;
-        } else {
-            ev.xselection.time = (INT)__unsignedLongIntVal(aTime);
-        }
+	&& (__isAtomID(propertyID) || propertyID == nil)
+	&& __isAtomID(targetID) && __isAtomID(selectionID)) {
+	Display *dpy = myDpy;
+	XEvent ev;
+	Window requestor;
+	Status result;
+
+	if (__isExternalAddress(requestorID)) {
+	    requestor = __WindowVal(requestorID);
+	} else if (__isSmallInteger(requestorID)) {
+	    requestor = (Window)__smallIntegerVal(requestorID);
+	} else if (requestorID == nil) {
+	    requestor = DefaultRootWindow(dpy);
+	} else {
+	    requestor = (Window)__unsignedLongIntVal(requestorID);
+	}
+
+	ev.xselection.type = SelectionNotify;
+	ev.xselection.display = dpy;
+	ev.xselection.selection = __AtomVal(selectionID);
+	ev.xselection.target = __AtomVal(targetID);
+	ev.xselection.requestor = requestor;
+
+	if (__isExternalAddress(aTime)) {
+	    ev.xselection.time = (INT)(__externalAddressVal(aTime));
+	} else if (__isSmallInteger(aTime)) {
+	    ev.xselection.time = __smallIntegerVal(aTime);
+	} else if (aTime == nil) {
+	    ev.xselection.time = CurrentTime;
+	} else {
+	    ev.xselection.time = (INT)__unsignedLongIntVal(aTime);
+	}
 #if 0
-        console_printf("ev.xselection.selection: %x\n", ev.xselection.selection);
-        console_printf("ev.xselection.target: %x\n", ev.xselection.target);
-        console_printf("ev.xselection.requestor: %x\n", ev.xselection.requestor);
-        console_printf("ev.xselection.time: %x\n", ev.xselection.time);
-        console_printf("requestor: %x\n", requestor);
-#endif
-
-        /* send nil property if selection cannot be converted */
-        if (propertyID == nil)
-            ev.xselection.property = None;
-        else
-            ev.xselection.property = __AtomVal(propertyID);
-
-
-        DPRINTF(("sending SelectionNotify sel=%"_lx_" prop=%"_lx_" target=%"_lx_" requestor=%"_lx_" to %"_lx_"\n",
-                (INT)ev.xselection.selection,
-                (INT)ev.xselection.property,
-                (INT)ev.xselection.target,
-                (INT)ev.xselection.requestor,
-                (INT)requestor));
-
-        ENTER_XLIB();
-        result = XSendEvent(dpy, requestor, False, 0 , &ev);
-        LEAVE_XLIB();
-
-        if ((result == BadValue) || (result == BadWindow)) {
-            DPRINTF(("bad status\n"));
-            RETURN (false);
-        }
-        ENTER_XLIB();
-        XFlush(dpy);
-        LEAVE_XLIB();
-        RETURN (true)
+	console_printf("ev.xselection.selection: %x\n", ev.xselection.selection);
+	console_printf("ev.xselection.target: %x\n", ev.xselection.target);
+	console_printf("ev.xselection.requestor: %x\n", ev.xselection.requestor);
+	console_printf("ev.xselection.time: %x\n", ev.xselection.time);
+	console_printf("requestor: %x\n", requestor);
+#endif
+
+	/* send nil property if selection cannot be converted */
+	if (propertyID == nil)
+	    ev.xselection.property = None;
+	else
+	    ev.xselection.property = __AtomVal(propertyID);
+
+
+	DPRINTF(("sending SelectionNotify sel=%"_lx_" prop=%"_lx_" target=%"_lx_" requestor=%"_lx_" to %"_lx_"\n",
+		(INT)ev.xselection.selection,
+		(INT)ev.xselection.property,
+		(INT)ev.xselection.target,
+		(INT)ev.xselection.requestor,
+		(INT)requestor));
+
+	ENTER_XLIB();
+	result = XSendEvent(dpy, requestor, False, 0 , &ev);
+	LEAVE_XLIB();
+
+	if ((result == BadValue) || (result == BadWindow)) {
+	    DPRINTF(("bad status\n"));
+	    RETURN (false);
+	}
+	ENTER_XLIB();
+	XFlush(dpy);
+	LEAVE_XLIB();
+	RETURN (true)
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -12267,9 +12267,9 @@
     |selectionAtomID|
 
     selectionAtomSymbolOrID isString ifTrue:[
-        selectionAtomID := self atomIDOf:selectionAtomSymbolOrID create:false.
+	selectionAtomID := self atomIDOf:selectionAtomSymbolOrID create:false.
     ] ifFalse:[
-        selectionAtomID := selectionAtomSymbolOrID.
+	selectionAtomID := selectionAtomSymbolOrID.
     ].
 
 %{
@@ -12278,27 +12278,27 @@
     if (__isExternalAddress(aWindowId)
      && __isAtomID(selectionAtomID)
      && ISCONNECTED) {
-        Display *dpy = myDpy;
-        Time time;
-
-        win = __WindowVal(aWindowId);
-
-        if (anIntegerTimestamp == nil) {
-            /*
-             * the ICCCM convention says: you should set the time to the time when
-             * the selection was acquired and not to CurrentTime
-             */
-            time = CurrentTime;
-        } else if (__isInteger(anIntegerTimestamp)) {
-            time = __unsignedLongIntVal(anIntegerTimestamp);
-        } else
-            goto err;
-
-        DPRINTF(("setOwner prop=%"_lx_" win=%"_lx_"\n", (INT)__AtomVal(selectionAtomID), (INT)win));
-        ENTER_XLIB();
-        XSetSelectionOwner(dpy, __AtomVal(selectionAtomID), win, time);
-        RETURN (self);
-        LEAVE_XLIB();
+	Display *dpy = myDpy;
+	Time time;
+
+	win = __WindowVal(aWindowId);
+
+	if (anIntegerTimestamp == nil) {
+	    /*
+	     * the ICCCM convention says: you should set the time to the time when
+	     * the selection was acquired and not to CurrentTime
+	     */
+	    time = CurrentTime;
+	} else if (__isInteger(anIntegerTimestamp)) {
+	    time = __unsignedLongIntVal(anIntegerTimestamp);
+	} else
+	    goto err;
+
+	DPRINTF(("setOwner prop=%"_lx_" win=%"_lx_"\n", (INT)__AtomVal(selectionAtomID), (INT)win));
+	ENTER_XLIB();
+	XSetSelectionOwner(dpy, __AtomVal(selectionAtomID), win, time);
+	RETURN (self);
+	LEAVE_XLIB();
     }
 err:;
 %}.
@@ -12318,10 +12318,10 @@
     allChildIDs := OrderedCollection new.
     childIDs := self childIdsOf:aWindowId.
     childIDs notNil ifTrue:[
-        allChildIDs addAll:childIDs.
-        childIDs do:[:eachChildId |
-            allChildIDs addAll:(self allChildIdsOf:eachChildId).
-        ].
+	allChildIDs addAll:childIDs.
+	childIDs do:[:eachChildId |
+	    allChildIDs addAll:(self allChildIdsOf:eachChildId).
+	].
     ].
     ^ allChildIDs
 
@@ -12335,20 +12335,20 @@
      deviceIDAtom := (Display atomIDOf:#'STX_DEVICE_ID').
      uuidAtom     := (Display atomIDOf:#'UUID').
      (Display allChildIdsOf:(Display rootWindowId))
-        select:[:id |
-            |uuid|
-
-            Display
-                getProperty:deviceIDAtom
-                from:id
-                delete:false
-                into:[:type :value |
-                    type == uuidAtom ifTrue:[
-                        uuid := UUID fromBytes:value.
-                    ].
-                ].
-            uuid notNil.
-        ]
+	select:[:id |
+	    |uuid|
+
+	    Display
+		getProperty:deviceIDAtom
+		from:id
+		delete:false
+		into:[:type :value |
+		    type == uuidAtom ifTrue:[
+			uuid := UUID fromBytes:value.
+		    ].
+		].
+	    uuid notNil.
+	]
     "
 !
 
@@ -12364,35 +12364,35 @@
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        Display *dpy = myDpy;
-        Window win = __WindowVal(aWindowId);
-        Window rootReturn, parentReturn;
-        Window* children = (Window *)0;
-        unsigned int numChildren;
-        int i;
-        int rslt;
-
-        ENTER_XLIB();
-        rslt = XQueryTree(dpy, win,
-                       &rootReturn, &parentReturn,
-                       &children, &numChildren);
-        LEAVE_XLIB();
-        if (rslt) {
-            childIdArray = __ARRAY_NEW_INT(numChildren);
-            if (childIdArray != nil) {
-                for (i=0; i < numChildren; i++) {
-                    if (children[i]) {
-                        OBJ childId;
-
-                        childId = __MKEXTERNALADDRESS(children[i]);
-                        __ArrayInstPtr(childIdArray)->a_element[i] = childId;
-                        __STORE(childIdArray, childId);
-                    }
-                }
-                if (children) XFree(children);
-            }
-            RETURN (childIdArray);
-        }
+	Display *dpy = myDpy;
+	Window win = __WindowVal(aWindowId);
+	Window rootReturn, parentReturn;
+	Window* children = (Window *)0;
+	unsigned int numChildren;
+	int i;
+	int rslt;
+
+	ENTER_XLIB();
+	rslt = XQueryTree(dpy, win,
+		       &rootReturn, &parentReturn,
+		       &children, &numChildren);
+	LEAVE_XLIB();
+	if (rslt) {
+	    childIdArray = __ARRAY_NEW_INT(numChildren);
+	    if (childIdArray != nil) {
+		for (i=0; i < numChildren; i++) {
+		    if (children[i]) {
+			OBJ childId;
+
+			childId = __MKEXTERNALADDRESS(children[i]);
+			__ArrayInstPtr(childIdArray)->a_element[i] = childId;
+			__STORE(childIdArray, childId);
+		    }
+		}
+		if (children) XFree(children);
+	    }
+	    RETURN (childIdArray);
+	}
     }
 %}.
     ^ nil.
@@ -12415,17 +12415,17 @@
     OBJ id;
 
     if (__INST(rootId) != nil) {
-        RETURN (__INST(rootId));
+	RETURN (__INST(rootId));
     }
 
     if (ISCONNECTED) {
-        root = RootWindow(myDpy, screen);
-        if (! root) {
-            id = nil;
-        } else {
-            id = __MKEXTERNALADDRESS(root); __INST(rootId) = id; __STORE(self, id);
-        }
-        RETURN (id);
+	root = RootWindow(myDpy, screen);
+	if (! root) {
+	    id = nil;
+	} else {
+	    id = __MKEXTERNALADDRESS(root); __INST(rootId) = id; __STORE(self, id);
+	}
+	RETURN (id);
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -12450,92 +12450,92 @@
     OBJ id;
 
     if (__INST(virtualRootId) != nil) {
-        RETURN (__INST(virtualRootId));
+	RETURN (__INST(virtualRootId));
     }
 
     if (ISCONNECTED) {
-        Display *dpy = myDpy;
-
-        rootWin = RootWindow(dpy, screen);
+	Display *dpy = myDpy;
+
+	rootWin = RootWindow(dpy, screen);
 #ifndef IRIS
 
-        /*
-         * on IRIS, this creates a badwindow error - why ?
-         * children contains a funny window (000034)
-         */
-
-        /*
-         * care for virtual root windows (tvtwm & friends)
-         */
-        {
-            Atom vRootAtom, kwinAtom;
-            int i;
-            Window rootReturn, parentReturn;
-            Window* children = (Window *)0;
-            unsigned int numChildren;
-            int ignoreVRoot = 0;
-
-            /*
-             * Take care of KDE 2.1.
-             * they define _SWM_ROOT but this is not the parent of
-             * the application windows.
-             * Instead it is used for background painting
-             */
-
-            kwinAtom = XInternAtom(dpy, "KWIN_RUNNING", True);
-            if (kwinAtom != None) {
-                Atom actual_type;
-                int actual_format;
-                unsigned long nitems, bytesafter;
-                unsigned char *retVal = 0;
-
-                ignoreVRoot = XGetWindowProperty(dpy, rootWin, kwinAtom,
-                                       0L, 1L, False, kwinAtom,
-                                       &actual_type, &actual_format,
-                                       &nitems, &bytesafter, &retVal) == Success
-                              && actual_type != 0;
-                if (retVal)
-                    XFree(retVal);
-            }
-
-            if (!ignoreVRoot) {
-                vRootAtom = XInternAtom(dpy, "__SWM_VROOT", True);
-                if (vRootAtom != None) {
-                    if (XQueryTree(dpy, rootWin,
-                                       &rootReturn, &parentReturn,
-                                       &children, &numChildren)) {
-                        for (i=0; i < numChildren; i++) {
-                            Atom actual_type;
-                            int actual_format;
-                            unsigned long nitems, bytesafter;
-                            Window* newRoot = (Window*) 0;
-
-                            if (children[i]) {
-                                if (XGetWindowProperty(dpy, children[i], vRootAtom,
-                                                       0L, 1L, False, XA_WINDOW,
-                                                       &actual_type, &actual_format,
-                                                       &nitems, &bytesafter,
-                                                       (unsigned char**) &newRoot
-                                                      ) == Success && newRoot) {
-                                    vRootWin = *newRoot;
-                                    XFree(newRoot); /* XXX */
-                                    break;
-                                }
-                            }
-                        }
-                        if (children) XFree(children);
-                    }
-                }
-             }
-        }
+	/*
+	 * on IRIS, this creates a badwindow error - why ?
+	 * children contains a funny window (000034)
+	 */
+
+	/*
+	 * care for virtual root windows (tvtwm & friends)
+	 */
+	{
+	    Atom vRootAtom, kwinAtom;
+	    int i;
+	    Window rootReturn, parentReturn;
+	    Window* children = (Window *)0;
+	    unsigned int numChildren;
+	    int ignoreVRoot = 0;
+
+	    /*
+	     * Take care of KDE 2.1.
+	     * they define _SWM_ROOT but this is not the parent of
+	     * the application windows.
+	     * Instead it is used for background painting
+	     */
+
+	    kwinAtom = XInternAtom(dpy, "KWIN_RUNNING", True);
+	    if (kwinAtom != None) {
+		Atom actual_type;
+		int actual_format;
+		unsigned long nitems, bytesafter;
+		unsigned char *retVal = 0;
+
+		ignoreVRoot = XGetWindowProperty(dpy, rootWin, kwinAtom,
+				       0L, 1L, False, kwinAtom,
+				       &actual_type, &actual_format,
+				       &nitems, &bytesafter, &retVal) == Success
+			      && actual_type != 0;
+		if (retVal)
+		    XFree(retVal);
+	    }
+
+	    if (!ignoreVRoot) {
+		vRootAtom = XInternAtom(dpy, "__SWM_VROOT", True);
+		if (vRootAtom != None) {
+		    if (XQueryTree(dpy, rootWin,
+				       &rootReturn, &parentReturn,
+				       &children, &numChildren)) {
+			for (i=0; i < numChildren; i++) {
+			    Atom actual_type;
+			    int actual_format;
+			    unsigned long nitems, bytesafter;
+			    Window* newRoot = (Window*) 0;
+
+			    if (children[i]) {
+				if (XGetWindowProperty(dpy, children[i], vRootAtom,
+						       0L, 1L, False, XA_WINDOW,
+						       &actual_type, &actual_format,
+						       &nitems, &bytesafter,
+						       (unsigned char**) &newRoot
+						      ) == Success && newRoot) {
+				    vRootWin = *newRoot;
+				    XFree(newRoot); /* XXX */
+				    break;
+				}
+			    }
+			}
+			if (children) XFree(children);
+		    }
+		}
+	     }
+	}
 #endif
     }
 
     if (! vRootWin) {
-        vRootWin = rootWin;
-        if (! vRootWin) {
-            RETURN ( nil );
-        }
+	vRootWin = rootWin;
+	if (! vRootWin) {
+	    RETURN ( nil );
+	}
     }
     id = __MKEXTERNALADDRESS(rootWin); __INST(rootId) = id; __STORE(self, id);
     id = __MKEXTERNALADDRESS(vRootWin); __INST(virtualRootId) = id; __STORE(self, id);
@@ -12558,21 +12558,21 @@
     int w, h;
 
     if (ISCONNECTED) {
-        if (__isExternalAddress(aWindowId)
-         && __bothSmallInteger(x, y)
-         && __bothSmallInteger(width, height)) {
-            w = __intVal(width);
-            h = __intVal(height);
-            /*
-             * need this check here: some servers simply dump core with bad args
-             */
-            if ((w >= 0) && (h >= 0)) {
-                ENTER_XLIB();
-                XClearArea(myDpy, __WindowVal(aWindowId), __intVal(x), __intVal(y), w, h, 0);
-                LEAVE_XLIB();
-            }
-            RETURN ( self );
-        }
+	if (__isExternalAddress(aWindowId)
+	 && __bothSmallInteger(x, y)
+	 && __bothSmallInteger(width, height)) {
+	    w = __intVal(width);
+	    h = __intVal(height);
+	    /*
+	     * need this check here: some servers simply dump core with bad args
+	     */
+	    if ((w >= 0) && (h >= 0)) {
+		ENTER_XLIB();
+		XClearArea(myDpy, __WindowVal(aWindowId), __intVal(x), __intVal(y), w, h, 0);
+		LEAVE_XLIB();
+	    }
+	    RETURN ( self );
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -12585,12 +12585,12 @@
 %{
 
     if (ISCONNECTED) {
-        if (__isExternalAddress(aWindowId)) {
-            ENTER_XLIB();
-            XClearWindow(myDpy, __WindowVal(aWindowId));
-            LEAVE_XLIB();
-            RETURN ( self );
-        }
+	if (__isExternalAddress(aWindowId)) {
+	    ENTER_XLIB();
+	    XClearWindow(myDpy, __WindowVal(aWindowId));
+	    LEAVE_XLIB();
+	    RETURN ( self );
+	}
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -12606,29 +12606,29 @@
     int mask = CWSibling | CWStackMode;
 
     if (ISCONNECTED) {
-        if (__isExternalAddress(aWindowId)
-         && __isExternalAddress(siblingId)) {
-            if (modeSymbol == @symbol(above)) {
-                chg.stack_mode = Above;
-            } else if (modeSymbol == @symbol(below)) {
-                chg.stack_mode = Below;
-            } else if (modeSymbol == @symbol(topIf)) {
-                chg.stack_mode = TopIf;
-            } else if (modeSymbol == @symbol(bottomIf)) {
-                chg.stack_mode = BottomIf;
-            } else if (modeSymbol == @symbol(opposite)) {
-                chg.stack_mode = Opposite;
-            } else {
-                mask = CWSibling;
-            }
-
-            chg.sibling = __WindowVal(siblingId);
-            ENTER_XLIB();
-            XConfigureWindow(myDpy, __WindowVal(aWindowId),
-                                    mask, &chg);
-            LEAVE_XLIB();
-            RETURN ( self );
-        }
+	if (__isExternalAddress(aWindowId)
+	 && __isExternalAddress(siblingId)) {
+	    if (modeSymbol == @symbol(above)) {
+		chg.stack_mode = Above;
+	    } else if (modeSymbol == @symbol(below)) {
+		chg.stack_mode = Below;
+	    } else if (modeSymbol == @symbol(topIf)) {
+		chg.stack_mode = TopIf;
+	    } else if (modeSymbol == @symbol(bottomIf)) {
+		chg.stack_mode = BottomIf;
+	    } else if (modeSymbol == @symbol(opposite)) {
+		chg.stack_mode = Opposite;
+	    } else {
+		mask = CWSibling;
+	    }
+
+	    chg.sibling = __WindowVal(siblingId);
+	    ENTER_XLIB();
+	    XConfigureWindow(myDpy, __WindowVal(aWindowId),
+				    mask, &chg);
+	    LEAVE_XLIB();
+	    RETURN ( self );
+	}
     }
 bad: ;
 %}.
@@ -12651,30 +12651,30 @@
 %{
     int x_ret, y_ret;
     unsigned int width_ret, height_ret,
-                 border_width_ret, depth_ret;
+		 border_width_ret, depth_ret;
     Window root_ret;
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        ENTER_XLIB();
-        XGetGeometry(myDpy, __WindowVal(aWindowId),
-                     &root_ret,
-                     &x_ret, &y_ret,
-                     &width_ret, &height_ret, &border_width_ret,
-                     &depth_ret);
-        LEAVE_XLIB();
-
-        x = __MKSMALLINT(x_ret);
-        y = __MKSMALLINT(y_ret);
-        width = __MKSMALLINT(width_ret);
-        height = __MKSMALLINT(height_ret);
-        depth = __MKSMALLINT(depth_ret);
-        borderWidth = __MKSMALLINT(border_width_ret);
+	ENTER_XLIB();
+	XGetGeometry(myDpy, __WindowVal(aWindowId),
+		     &root_ret,
+		     &x_ret, &y_ret,
+		     &width_ret, &height_ret, &border_width_ret,
+		     &depth_ret);
+	LEAVE_XLIB();
+
+	x = __MKSMALLINT(x_ret);
+	y = __MKSMALLINT(y_ret);
+	width = __MKSMALLINT(width_ret);
+	height = __MKSMALLINT(height_ret);
+	depth = __MKSMALLINT(depth_ret);
+	borderWidth = __MKSMALLINT(border_width_ret);
     }
 %}.
     borderWidth isNil ifTrue:[
-        self primitiveFailedOrClosedConnection.
-        ^ nil
+	self primitiveFailedOrClosedConnection.
+	^ nil
     ].
     info := Dictionary new.
     info at:#origin put:(x @ y).
@@ -12685,15 +12685,15 @@
 
     "
      Transcript topView device
-        getGeometryOf:(Transcript id)
+	getGeometryOf:(Transcript id)
     "
     "
      Transcript topView device
-        getGeometryOf:(Transcript topView id)
+	getGeometryOf:(Transcript topView id)
     "
     "
      Display
-        getGeometryOf:(Display viewIdFromUser)
+	getGeometryOf:(Display viewIdFromUser)
     "
     "
      |d|
@@ -12720,22 +12720,22 @@
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        char *name = NULL;
-        Status ok;
-        Window root, parent, *children = NULL;
-        unsigned int nChildren;
+	char *name = NULL;
+	Status ok;
+	Window root, parent, *children = NULL;
+	unsigned int nChildren;
 
 /*        ENTER_XLIB(); */
-        ok = XQueryTree(myDpy, __WindowVal(aWindowId),
-                        &root, &parent, &children, &nChildren);
-        if (children) {
-            XFree(children);
-        }
+	ok = XQueryTree(myDpy, __WindowVal(aWindowId),
+			&root, &parent, &children, &nChildren);
+	if (children) {
+	    XFree(children);
+	}
 /*        LEAVE_XLIB();   */
-        if (ok) {
-            RETURN (true);
-        }
-        RETURN (false);
+	if (ok) {
+	    RETURN (true);
+	}
+	RETURN (false);
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -12767,17 +12767,17 @@
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        ENTER_XLIB();
-        XLowerWindow(myDpy, __WindowVal(aWindowId));
-        LEAVE_XLIB();
-        RETURN ( self );
+	ENTER_XLIB();
+	XLowerWindow(myDpy, __WindowVal(aWindowId));
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
 !
 
 mapView:aView id:aWindowId iconified:aBoolean atX:xPos y:yPos
-              width:w height:h minExtent:minExt maxExtent:maxExt
+	      width:w height:h minExtent:minExt maxExtent:maxExt
 
     <context: #return>
 
@@ -12789,26 +12789,26 @@
     |wicon wiconId iconMaskId wiconView wiconViewId wlabel minW minH maxW maxH|
 
     aBoolean ifTrue:[
-        wicon := aView icon.
-        wicon notNil ifTrue:[
-            wiconId := wicon drawableId.
-            wicon mask notNil ifTrue:[
-                iconMaskId := wicon mask drawableId.
-            ].
-        ].
-        wiconView := aView iconView.
-        wiconView notNil ifTrue:[
-            wiconViewId := wiconView drawableId
-        ].
-        wlabel := aView label.
+	wicon := aView icon.
+	wicon notNil ifTrue:[
+	    wiconId := wicon drawableId.
+	    wicon mask notNil ifTrue:[
+		iconMaskId := wicon mask drawableId.
+	    ].
+	].
+	wiconView := aView iconView.
+	wiconView notNil ifTrue:[
+	    wiconViewId := wiconView drawableId
+	].
+	wlabel := aView label.
     ].
     minExt notNil ifTrue:[
-        minW := minExt x.
-        minH := minExt y.
+	minW := minExt x.
+	minH := minExt y.
     ].
     maxExt notNil ifTrue:[
-        maxW := maxExt x.
-        maxH := maxExt y.
+	maxW := maxExt x.
+	maxH := maxExt y.
     ].
 %{
 
@@ -12818,91 +12818,91 @@
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        Display *dpy = myDpy;
-
-        win = __WindowVal(aWindowId);
-
-        szhints.flags = 0;
-        if (__bothSmallInteger(xPos, yPos)) {
-            szhints.x = __intVal(xPos);
-            szhints.y = __intVal(yPos);
-            szhints.flags |= USPosition;
-        }
-        if (__bothSmallInteger(w, h)) {
-            szhints.width = __intVal(w);
-            szhints.height = __intVal(h);
-            szhints.flags |= USSize;
-        }
-        if (__bothSmallInteger(minW, minH)) {
-            szhints.flags |= PMinSize;
-            szhints.min_width = __intVal(minW);
-            szhints.min_height = __intVal(minH);
-        }
-        if (__bothSmallInteger(maxW, maxH)) {
-            szhints.flags |= PMaxSize;
-            szhints.max_width = __intVal(maxW);
-            szhints.max_height = __intVal(maxH);
-        }
-
-        if (aBoolean == true) {
-            char *windowName = "";
-            Pixmap iconBitmap = (Pixmap)0;
-            Pixmap iconMask = (Pixmap)0;
-            Window iconWindow = (Window)0;
-
-            if (__isExternalAddress(wiconId))
-                iconBitmap = __PixmapVal(wiconId);
-
-            if (__isExternalAddress(iconMaskId)) {
-                iconMask = __PixmapVal(iconMaskId);
-            }
-
-            if (__isExternalAddress(wiconViewId))
-                iconWindow = __WindowVal(wiconViewId);
-
-            if (__isStringLike(wlabel))
-                windowName = (char *) __stringVal(wlabel);
-
-            if (iconBitmap || windowName) {
-                ENTER_XLIB();
-                XSetStandardProperties(dpy, win,
-                                        windowName, windowName,
-                                        iconBitmap,
-                                        0, 0, &szhints);
-                LEAVE_XLIB();
-            }
-
-            wmhints.flags = 0;
-            if (iconBitmap) {
-                wmhints.flags |= IconPixmapHint;
-                wmhints.icon_pixmap = iconBitmap;
-            }
-            if (iconMask) {
-                wmhints.flags |= IconMaskHint;
-                wmhints.icon_mask = iconMask;
-            }
-            if (iconWindow) {
-                wmhints.flags |= IconWindowHint;
-                wmhints.icon_window = iconWindow;
-            }
-
-            wmhints.initial_state = IconicState;
-            wmhints.flags |= StateHint;
-            ENTER_XLIB();
-            XSetWMHints(dpy, win, &wmhints);
-            LEAVE_XLIB();
-        }
-
-        if (szhints.flags) {
-            ENTER_XLIB();
-            XSetNormalHints(dpy, win, &szhints);
-            LEAVE_XLIB();
-        }
-
-        ENTER_XLIB();
-        XMapWindow(dpy, win);
-        LEAVE_XLIB();
-        RETURN ( self );
+	Display *dpy = myDpy;
+
+	win = __WindowVal(aWindowId);
+
+	szhints.flags = 0;
+	if (__bothSmallInteger(xPos, yPos)) {
+	    szhints.x = __intVal(xPos);
+	    szhints.y = __intVal(yPos);
+	    szhints.flags |= USPosition;
+	}
+	if (__bothSmallInteger(w, h)) {
+	    szhints.width = __intVal(w);
+	    szhints.height = __intVal(h);
+	    szhints.flags |= USSize;
+	}
+	if (__bothSmallInteger(minW, minH)) {
+	    szhints.flags |= PMinSize;
+	    szhints.min_width = __intVal(minW);
+	    szhints.min_height = __intVal(minH);
+	}
+	if (__bothSmallInteger(maxW, maxH)) {
+	    szhints.flags |= PMaxSize;
+	    szhints.max_width = __intVal(maxW);
+	    szhints.max_height = __intVal(maxH);
+	}
+
+	if (aBoolean == true) {
+	    char *windowName = "";
+	    Pixmap iconBitmap = (Pixmap)0;
+	    Pixmap iconMask = (Pixmap)0;
+	    Window iconWindow = (Window)0;
+
+	    if (__isExternalAddress(wiconId))
+		iconBitmap = __PixmapVal(wiconId);
+
+	    if (__isExternalAddress(iconMaskId)) {
+		iconMask = __PixmapVal(iconMaskId);
+	    }
+
+	    if (__isExternalAddress(wiconViewId))
+		iconWindow = __WindowVal(wiconViewId);
+
+	    if (__isStringLike(wlabel))
+		windowName = (char *) __stringVal(wlabel);
+
+	    if (iconBitmap || windowName) {
+		ENTER_XLIB();
+		XSetStandardProperties(dpy, win,
+					windowName, windowName,
+					iconBitmap,
+					0, 0, &szhints);
+		LEAVE_XLIB();
+	    }
+
+	    wmhints.flags = 0;
+	    if (iconBitmap) {
+		wmhints.flags |= IconPixmapHint;
+		wmhints.icon_pixmap = iconBitmap;
+	    }
+	    if (iconMask) {
+		wmhints.flags |= IconMaskHint;
+		wmhints.icon_mask = iconMask;
+	    }
+	    if (iconWindow) {
+		wmhints.flags |= IconWindowHint;
+		wmhints.icon_window = iconWindow;
+	    }
+
+	    wmhints.initial_state = IconicState;
+	    wmhints.flags |= StateHint;
+	    ENTER_XLIB();
+	    XSetWMHints(dpy, win, &wmhints);
+	    LEAVE_XLIB();
+	}
+
+	if (szhints.flags) {
+	    ENTER_XLIB();
+	    XSetNormalHints(dpy, win, &szhints);
+	    LEAVE_XLIB();
+	}
+
+	ENTER_XLIB();
+	XMapWindow(dpy, win);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -12918,10 +12918,10 @@
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        ENTER_XLIB();
-        XMapWindow(myDpy, __WindowVal(aWindowId));
-        LEAVE_XLIB();
-        RETURN ( self );
+	ENTER_XLIB();
+	XMapWindow(myDpy, __WindowVal(aWindowId));
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -12939,16 +12939,16 @@
      && __isExternalAddress(aWindowId)
      && __bothSmallInteger(w, h)
      && __bothSmallInteger(x, y)) {
-        newWidth = __intVal(w);
-        newHeight = __intVal(h);
-        if (newWidth < 1) newWidth = 1;
-        if (newHeight < 1) newHeight = 1;
-        ENTER_XLIB();
-        XMoveResizeWindow(myDpy, __WindowVal(aWindowId),
-                              __intVal(x), __intVal(y),
-                              newWidth, newHeight);
-        LEAVE_XLIB();
-        RETURN ( self );
+	newWidth = __intVal(w);
+	newHeight = __intVal(h);
+	if (newWidth < 1) newWidth = 1;
+	if (newHeight < 1) newHeight = 1;
+	ENTER_XLIB();
+	XMoveResizeWindow(myDpy, __WindowVal(aWindowId),
+			      __intVal(x), __intVal(y),
+			      newWidth, newHeight);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -12962,10 +12962,10 @@
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId) && __bothSmallInteger(x, y)) {
-        ENTER_XLIB();
-        XMoveWindow(myDpy, __WindowVal(aWindowId), __intVal(x), __intVal(y));
-        LEAVE_XLIB();
-        RETURN ( self );
+	ENTER_XLIB();
+	XMoveWindow(myDpy, __WindowVal(aWindowId), __intVal(x), __intVal(y));
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -12988,21 +12988,21 @@
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        Status ok;
-        Window root, parent, *children = NULL;
-        unsigned int nChildren;
+	Status ok;
+	Window root, parent, *children = NULL;
+	unsigned int nChildren;
 
 /*        ENTER_XLIB(); */
-        ok = XQueryTree(myDpy, __WindowVal(aWindowId),
-                        &root, &parent, &children, &nChildren);
-        if (children) {
-            XFree(children);
-        }
+	ok = XQueryTree(myDpy, __WindowVal(aWindowId),
+			&root, &parent, &children, &nChildren);
+	if (children) {
+	    XFree(children);
+	}
 /*        LEAVE_XLIB();   */
-        if (! ok) {
-            RETURN ( nil );
-        }
-        RETURN ( __MKEXTERNALADDRESS(parent) );
+	if (! ok) {
+	    RETURN ( nil );
+	}
+	RETURN ( __MKEXTERNALADDRESS(parent) );
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -13026,10 +13026,10 @@
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        ENTER_XLIB();
-        XRaiseWindow(myDpy, __WindowVal(aWindowId));
-        LEAVE_XLIB();
-        RETURN ( self );
+	ENTER_XLIB();
+	XRaiseWindow(myDpy, __WindowVal(aWindowId));
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13043,32 +13043,32 @@
     if (ISCONNECTED
      && __isExternalAddress(windowId)
      && __isExternalAddress(newParentWindowId)) {
-        Display *dpy = myDpy;
-        Window _child, _newParent;
-        int i;
-
-        _child = __WindowVal(windowId);
-        _newParent = __WindowVal(newParentWindowId);
-        ENTER_XLIB();
+	Display *dpy = myDpy;
+	Window _child, _newParent;
+	int i;
+
+	_child = __WindowVal(windowId);
+	_newParent = __WindowVal(newParentWindowId);
+	ENTER_XLIB();
 
 #if 0
-        XWithdrawWindow (dpy, _child, DefaultScreen(dpy));
-        XSync (dpy, 0);
-#endif
-        /*
-         * Code 'stolen' from xswallow source ...
-         * ... mhmh - what is this loop for ?
-         */
-        for (i=0; i<5; i++) {
-            XReparentWindow (dpy, _child, _newParent, 0, 0);
-            XSync (dpy, 0);
-        }
+	XWithdrawWindow (dpy, _child, DefaultScreen(dpy));
+	XSync (dpy, 0);
+#endif
+	/*
+	 * Code 'stolen' from xswallow source ...
+	 * ... mhmh - what is this loop for ?
+	 */
+	for (i=0; i<5; i++) {
+	    XReparentWindow (dpy, _child, _newParent, 0, 0);
+	    XSync (dpy, 0);
+	}
 #if 0
-        XMapWindow (dpy, _child);
-        XSync (dpy, 0);
-#endif
-        LEAVE_XLIB();
-        RETURN ( true );
+	XMapWindow (dpy, _child);
+	XSync (dpy, 0);
+#endif
+	LEAVE_XLIB();
+	RETURN ( true );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13084,14 +13084,14 @@
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId) && __bothSmallInteger(w, h)) {
-        newWidth = __intVal(w);
-        newHeight = __intVal(h);
-        if (newWidth < 1) newWidth = 1;
-        if (newHeight < 1) newHeight = 1;
-        ENTER_XLIB();
-        XResizeWindow(myDpy, __WindowVal(aWindowId), newWidth, newHeight);
-        LEAVE_XLIB();
-        RETURN ( self );
+	newWidth = __intVal(w);
+	newHeight = __intVal(h);
+	if (newWidth < 1) newWidth = 1;
+	if (newHeight < 1) newHeight = 1;
+	ENTER_XLIB();
+	XResizeWindow(myDpy, __WindowVal(aWindowId), newWidth, newHeight);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13107,18 +13107,18 @@
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        if (__INST(ignoreBackingStore) != true) {
-            if (how == @symbol(always)) wa.backing_store = Always;
-            else if (how == @symbol(whenMapped)) wa.backing_store = WhenMapped;
-            else if (how == true) wa.backing_store = Always;
-            else wa.backing_store = 0;
-
-            ENTER_XLIB();
-            XChangeWindowAttributes(myDpy, __WindowVal(aWindowId), CWBackingStore, &wa);
-            LEAVE_XLIB();
-
-        }
-        RETURN ( self );
+	if (__INST(ignoreBackingStore) != true) {
+	    if (how == @symbol(always)) wa.backing_store = Always;
+	    else if (how == @symbol(whenMapped)) wa.backing_store = WhenMapped;
+	    else if (how == true) wa.backing_store = Always;
+	    else wa.backing_store = 0;
+
+	    ENTER_XLIB();
+	    XChangeWindowAttributes(myDpy, __WindowVal(aWindowId), CWBackingStore, &wa);
+	    LEAVE_XLIB();
+
+	}
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13134,34 +13134,34 @@
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        if (how == @symbol(NorthWest)) {
-            wa.bit_gravity = NorthWestGravity;
-        } else if (how == @symbol(NorthEast)) {
-            wa.bit_gravity = NorthEastGravity;
-        } else if (how == @symbol(SouthWest)) {
-            wa.bit_gravity = SouthWestGravity;
-        } else if (how == @symbol(SouthEast)) {
-            wa.bit_gravity = SouthEastGravity;
-        } else if (how == @symbol(Center)) {
-            wa.bit_gravity = CenterGravity;
-        } else if (how == @symbol(North)) {
-            wa.bit_gravity = NorthGravity;
-        } else if (how == @symbol(South)) {
-            wa.bit_gravity = SouthGravity;
-        } else if (how == @symbol(West)) {
-            wa.bit_gravity = WestGravity;
-        } else if (how == @symbol(East)) {
-            wa.bit_gravity = EastGravity;
-        } else {
-            wa.bit_gravity = NorthWestGravity;
-        }
-
-
-        ENTER_XLIB();
-        XChangeWindowAttributes(myDpy, __WindowVal(aWindowId), CWBitGravity, &wa);
-        LEAVE_XLIB();
-
-        RETURN ( self );
+	if (how == @symbol(NorthWest)) {
+	    wa.bit_gravity = NorthWestGravity;
+	} else if (how == @symbol(NorthEast)) {
+	    wa.bit_gravity = NorthEastGravity;
+	} else if (how == @symbol(SouthWest)) {
+	    wa.bit_gravity = SouthWestGravity;
+	} else if (how == @symbol(SouthEast)) {
+	    wa.bit_gravity = SouthEastGravity;
+	} else if (how == @symbol(Center)) {
+	    wa.bit_gravity = CenterGravity;
+	} else if (how == @symbol(North)) {
+	    wa.bit_gravity = NorthGravity;
+	} else if (how == @symbol(South)) {
+	    wa.bit_gravity = SouthGravity;
+	} else if (how == @symbol(West)) {
+	    wa.bit_gravity = WestGravity;
+	} else if (how == @symbol(East)) {
+	    wa.bit_gravity = EastGravity;
+	} else {
+	    wa.bit_gravity = NorthWestGravity;
+	}
+
+
+	ENTER_XLIB();
+	XChangeWindowAttributes(myDpy, __WindowVal(aWindowId), CWBitGravity, &wa);
+	LEAVE_XLIB();
+
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13176,16 +13176,16 @@
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)
      && __isExternalAddress(aCursorId)) {
-        Display *dpy = myDpy;
-        Window w = __WindowVal(aWindowId);
-        Cursor c = __CursorVal(aCursorId);
-
-        if (w && c) {
-            ENTER_XLIB();
-            XDefineCursor(dpy, w, c);
-            LEAVE_XLIB();
-        }
-        RETURN ( self );
+	Display *dpy = myDpy;
+	Window w = __WindowVal(aWindowId);
+	Cursor c = __CursorVal(aCursorId);
+
+	if (w && c) {
+	    ENTER_XLIB();
+	    XDefineCursor(dpy, w, c);
+	    LEAVE_XLIB();
+	}
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13201,21 +13201,21 @@
 
     activeWindowAtom := self atomIDOf:#'_NET_ACTIVE_WINDOW' create:false.
     activeWindowAtom notNil ifTrue:[
-        self
-            sendClientEvent:activeWindowAtom
-            format:32
-            to:(self rootWindowId)
-            propagate:false
-            eventMask:((self eventMaskFor:#substructureNotify) bitOr:(self eventMaskFor:#substructureRedirect))
-            window:aWindowId
-            data1:2                 "activate request from pager. This is a trick: kwm ignores requests from applications (1)"
-            data2:nil
-            data3:nil
-            data4:nil
-            data5:nil.
+	self
+	    sendClientEvent:activeWindowAtom
+	    format:32
+	    to:(self rootWindowId)
+	    propagate:false
+	    eventMask:((self eventMaskFor:#substructureNotify) bitOr:(self eventMaskFor:#substructureRedirect))
+	    window:aWindowId
+	    data1:2                 "activate request from pager. This is a trick: kwm ignores requests from applications (1)"
+	    data2:nil
+	    data3:nil
+	    data4:nil
+	    data5:nil.
     ] ifFalse:[
-        "/ fallback
-        self raiseWindowToTop:aWindowId.
+	"/ fallback
+	self raiseWindowToTop:aWindowId.
     ].
 
     "
@@ -13236,10 +13236,10 @@
 
     utf8String := aString utf8Encoded.
     aString isWideString ifTrue:[
-        "/ X does not like 2-byte labels ...
-        simpleString := aString asSingleByteStringReplaceInvalidWith:$?
+	"/ X does not like 2-byte labels ...
+	simpleString := aString asSingleByteStringReplaceInvalidWith:$?
     ] ifFalse:[
-        simpleString := aString.
+	simpleString := aString.
     ].
 
 %{
@@ -13250,17 +13250,17 @@
      && __isStringLike(simpleString)
      && __isExternalAddress(aWindowId)) {
 
-        titleProperty.value =  __stringVal(utf8String);
-        titleProperty.encoding = __smallIntegerVal(utf8StringAtom);
-        titleProperty.format = 8;
-        titleProperty.nitems = __stringSize(utf8String);
-
-        ENTER_XLIB();
-        XSetIconName(myDpy, __WindowVal(aWindowId), (char *) __stringVal(simpleString));
-        /* alternative settings for UTF8-Strings */
-        XSetWMIconName(myDpy, __WindowVal(aWindowId), &titleProperty);
-        LEAVE_XLIB();
-        RETURN ( self );
+	titleProperty.value =  __stringVal(utf8String);
+	titleProperty.encoding = __smallIntegerVal(utf8StringAtom);
+	titleProperty.format = 8;
+	titleProperty.nitems = __stringSize(utf8String);
+
+	ENTER_XLIB();
+	XSetIconName(myDpy, __WindowVal(aWindowId), (char *) __stringVal(simpleString));
+	/* alternative settings for UTF8-Strings */
+	XSetWMIconName(myDpy, __WindowVal(aWindowId), &titleProperty);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13276,13 +13276,13 @@
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        if (__INST(hasSaveUnder) == true) {
-            wa.save_under = (yesOrNo == true) ? 1 : 0;
-            ENTER_XLIB();
-            XChangeWindowAttributes(myDpy, __WindowVal(aWindowId), CWSaveUnder, &wa);
-            LEAVE_XLIB();
-        }
-        RETURN ( self );
+	if (__INST(hasSaveUnder) == true) {
+	    wa.save_under = (yesOrNo == true) ? 1 : 0;
+	    ENTER_XLIB();
+	    XChangeWindowAttributes(myDpy, __WindowVal(aWindowId), CWSaveUnder, &wa);
+	    LEAVE_XLIB();
+	}
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13296,21 +13296,21 @@
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        Window w;
-
-        if ((aMainWindowId == nil) || (aMainWindowId == __MKSMALLINT(0))) {
-            w = (Window) 0;
-        } else {
-            if (__isExternalAddress(aMainWindowId)) {
-                w = __WindowVal(aMainWindowId);
-            } else {
-                goto getOutOfHere;
-            }
-        }
-        ENTER_XLIB();
-        XSetTransientForHint(myDpy, __WindowVal(aWindowId), w);
-        LEAVE_XLIB();
-        RETURN ( self );
+	Window w;
+
+	if ((aMainWindowId == nil) || (aMainWindowId == __MKSMALLINT(0))) {
+	    w = (Window) 0;
+	} else {
+	    if (__isExternalAddress(aMainWindowId)) {
+		w = __WindowVal(aMainWindowId);
+	    } else {
+		goto getOutOfHere;
+	    }
+	}
+	ENTER_XLIB();
+	XSetTransientForHint(myDpy, __WindowVal(aWindowId), w);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
  getOutOfHere: ;
 %}.
@@ -13328,10 +13328,10 @@
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)
      && __isSmallInteger(aColorIndex)) {
-        ENTER_XLIB();
-        XSetWindowBackground(myDpy, __WindowVal(aWindowId), __intVal(aColorIndex));
-        LEAVE_XLIB();
-        RETURN ( self );
+	ENTER_XLIB();
+	XSetWindowBackground(myDpy, __WindowVal(aWindowId), __intVal(aColorIndex));
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13349,10 +13349,10 @@
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)
      && __isExternalAddress(aPixmapId)) {
-        ENTER_XLIB();
-        XSetWindowBackgroundPixmap(myDpy, __WindowVal(aWindowId), __PixmapVal(aPixmapId));
-        LEAVE_XLIB();
-        RETURN ( self );
+	ENTER_XLIB();
+	XSetWindowBackgroundPixmap(myDpy, __WindowVal(aWindowId), __PixmapVal(aPixmapId));
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13367,10 +13367,10 @@
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)
      && __isSmallInteger(aColorIndex)) {
-        ENTER_XLIB();
-        XSetWindowBorder(myDpy, __WindowVal(aWindowId), __intVal(aColorIndex));
-        LEAVE_XLIB();
-        RETURN ( self );
+	ENTER_XLIB();
+	XSetWindowBorder(myDpy, __WindowVal(aWindowId), __intVal(aColorIndex));
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13385,10 +13385,10 @@
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)
      && __isExternalAddress(aPixmapId)) {
-        ENTER_XLIB();
-        XSetWindowBorderPixmap(myDpy, __WindowVal(aWindowId), __PixmapVal(aPixmapId));
-        LEAVE_XLIB();
-        RETURN ( self );
+	ENTER_XLIB();
+	XSetWindowBorderPixmap(myDpy, __WindowVal(aWindowId), __PixmapVal(aPixmapId));
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13407,17 +13407,17 @@
     Pixmap shapeBitmap;
 
     if (__isExternalAddress(aPixmapId))
-        shapeBitmap = __PixmapVal(aPixmapId);
+	shapeBitmap = __PixmapVal(aPixmapId);
     else
-        shapeBitmap = (Pixmap)0;
+	shapeBitmap = (Pixmap)0;
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        ENTER_XLIB();
-        XShapeCombineMask(myDpy, __WindowVal(aWindowId), ShapeBounding,
-                          0, 0, shapeBitmap, ShapeSet);
-        LEAVE_XLIB();
-        RETURN ( self );
+	ENTER_XLIB();
+	XShapeCombineMask(myDpy, __WindowVal(aWindowId), ShapeBounding,
+			  0, 0, shapeBitmap, ShapeSet);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 #endif
 %}.
@@ -13433,10 +13433,10 @@
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)
      && __isSmallInteger(aNumber)) {
-        ENTER_XLIB();
-        XSetWindowBorderWidth(myDpy, __WindowVal(aWindowId), __intVal(aNumber));
-        LEAVE_XLIB();
-        RETURN ( self );
+	ENTER_XLIB();
+	XSetWindowBorderWidth(myDpy, __WindowVal(aWindowId), __intVal(aNumber));
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13451,24 +13451,24 @@
 %{
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        XClassHint classhint;
-
-        classhint.res_class = classhint.res_name = 0;
-
-        if (__isStringLike(wClass)) {
-            classhint.res_class = (char *) __stringVal(wClass);
-        } else if (wClass != nil)
-            goto error;
-
-        if (__isStringLike(wName)) {
-            classhint.res_name = (char *) __stringVal(wName);
-        } else if (wName != nil)
-            goto error;
-
-        ENTER_XLIB();
-        XSetClassHint(myDpy, __WindowVal(aWindowId), &classhint);
-        LEAVE_XLIB();
-        RETURN ( self );
+	XClassHint classhint;
+
+	classhint.res_class = classhint.res_name = 0;
+
+	if (__isStringLike(wClass)) {
+	    classhint.res_class = (char *) __stringVal(wClass);
+	} else if (wClass != nil)
+	    goto error;
+
+	if (__isStringLike(wName)) {
+	    classhint.res_name = (char *) __stringVal(wName);
+	} else if (wName != nil)
+	    goto error;
+
+	ENTER_XLIB();
+	XSetClassHint(myDpy, __WindowVal(aWindowId), &classhint);
+	LEAVE_XLIB();
+	RETURN ( self );
 error:;
     }
 %}.
@@ -13485,34 +13485,34 @@
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        if (how == @symbol(NorthWest)) {
-            wa.win_gravity = NorthWestGravity;
-        } else if (how == @symbol(NorthEast)) {
-            wa.win_gravity = NorthEastGravity;
-        } else if (how == @symbol(SouthWest)) {
-            wa.win_gravity = SouthWestGravity;
-        } else if (how == @symbol(SouthEast)) {
-            wa.win_gravity = SouthEastGravity;
-        } else if (how == @symbol(Center)) {
-            wa.win_gravity = CenterGravity;
-        } else if (how == @symbol(North)) {
-            wa.win_gravity = NorthGravity;
-        } else if (how == @symbol(South)) {
-            wa.win_gravity = SouthGravity;
-        } else if (how == @symbol(West)) {
-            wa.win_gravity = WestGravity;
-        } else if (how == @symbol(East)) {
-            wa.win_gravity = EastGravity;
-        } else {
-            wa.win_gravity = NorthWestGravity;
-        }
-
-
-        ENTER_XLIB();
-        XChangeWindowAttributes(myDpy, __WindowVal(aWindowId), CWWinGravity, &wa);
-        LEAVE_XLIB();
-
-        RETURN ( self );
+	if (how == @symbol(NorthWest)) {
+	    wa.win_gravity = NorthWestGravity;
+	} else if (how == @symbol(NorthEast)) {
+	    wa.win_gravity = NorthEastGravity;
+	} else if (how == @symbol(SouthWest)) {
+	    wa.win_gravity = SouthWestGravity;
+	} else if (how == @symbol(SouthEast)) {
+	    wa.win_gravity = SouthEastGravity;
+	} else if (how == @symbol(Center)) {
+	    wa.win_gravity = CenterGravity;
+	} else if (how == @symbol(North)) {
+	    wa.win_gravity = NorthGravity;
+	} else if (how == @symbol(South)) {
+	    wa.win_gravity = SouthGravity;
+	} else if (how == @symbol(West)) {
+	    wa.win_gravity = WestGravity;
+	} else if (how == @symbol(East)) {
+	    wa.win_gravity = EastGravity;
+	} else {
+	    wa.win_gravity = NorthWestGravity;
+	}
+
+
+	ENTER_XLIB();
+	XChangeWindowAttributes(myDpy, __WindowVal(aWindowId), CWWinGravity, &wa);
+	LEAVE_XLIB();
+
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13526,20 +13526,20 @@
     |iconId|
 
     aForm notNil ifTrue:[
-        iconId := aForm drawableId
+	iconId := aForm drawableId
     ].
 %{
     if (ISCONNECTED
      && __isExternalAddress(iconId)
      && __isExternalAddress(aWindowId)) {
-        XWMHints hints;
-
-        hints.icon_pixmap = __PixmapVal(iconId);
-        hints.flags = IconPixmapHint;
-        ENTER_XLIB();
-        XSetWMHints(myDpy, __WindowVal(aWindowId), &hints);
-        LEAVE_XLIB();
-        RETURN ( self );
+	XWMHints hints;
+
+	hints.icon_pixmap = __PixmapVal(iconId);
+	hints.flags = IconPixmapHint;
+	ENTER_XLIB();
+	XSetWMHints(myDpy, __WindowVal(aWindowId), &hints);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13555,28 +13555,28 @@
     |iconId maskId|
 
     aForm notNil ifTrue:[
-        iconId := aForm drawableId.
+	iconId := aForm drawableId.
     ].
     aMaskForm notNil ifTrue:[
-        maskId := aMaskForm drawableId.
+	maskId := aMaskForm drawableId.
     ].
 %{
     if (ISCONNECTED
      && __isExternalAddress(iconId)
      && __isExternalAddress(aWindowId)) {
-        XWMHints hints;
-
-        hints.icon_pixmap = __PixmapVal(iconId);
-        hints.flags = IconPixmapHint;
-        if ((maskId != nil)
-         && __isExternalAddress(maskId)) {
-            hints.icon_mask = __PixmapVal(maskId);
-            hints.flags |= IconMaskHint;
-        }
-        ENTER_XLIB();
-        XSetWMHints(myDpy, __WindowVal(aWindowId), &hints);
-        LEAVE_XLIB();
-        RETURN ( self );
+	XWMHints hints;
+
+	hints.icon_pixmap = __PixmapVal(iconId);
+	hints.flags = IconPixmapHint;
+	if ((maskId != nil)
+	 && __isExternalAddress(maskId)) {
+	    hints.icon_mask = __PixmapVal(maskId);
+	    hints.flags |= IconMaskHint;
+	}
+	ENTER_XLIB();
+	XSetWMHints(myDpy, __WindowVal(aWindowId), &hints);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13592,20 +13592,20 @@
     |iconWindowId|
 
     aView notNil ifTrue:[
-        iconWindowId := aView drawableId.
+	iconWindowId := aView drawableId.
     ].
 %{
     if (ISCONNECTED
      && __isExternalAddress(iconWindowId)
      && __isExternalAddress(aWindowId)) {
-        XWMHints wmhints;
-
-        wmhints.icon_window = __WindowVal(iconWindowId);
-        wmhints.flags = IconWindowHint;
-        ENTER_XLIB();
-        XSetWMHints(myDpy, __WindowVal(aWindowId), &wmhints);
-        LEAVE_XLIB();
-        RETURN ( self );
+	XWMHints wmhints;
+
+	wmhints.icon_window = __WindowVal(iconWindowId);
+	wmhints.flags = IconWindowHint;
+	ENTER_XLIB();
+	XSetWMHints(myDpy, __WindowVal(aWindowId), &wmhints);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13621,29 +13621,29 @@
 %{
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        Display *dpy = myDpy;
-        XSizeHints szhints;
-        Window win;
-
-        win = __WindowVal(aWindowId);
-
-        szhints.flags = 0;
-        if (__bothSmallInteger(minW, minH)) {
-            szhints.flags |= PMinSize;
-            szhints.min_width = __intVal(minW);
-            szhints.min_height = __intVal(minH);
-        }
-        if (__bothSmallInteger(maxW, maxH)) {
-            szhints.flags |= PMaxSize;
-            szhints.max_width = __intVal(maxW);
-            szhints.max_height = __intVal(maxH);
-        }
-
-        if (szhints.flags) {
-            ENTER_XLIB();
-            XSetNormalHints(dpy, win, &szhints);
-            LEAVE_XLIB();
-        }
+	Display *dpy = myDpy;
+	XSizeHints szhints;
+	Window win;
+
+	win = __WindowVal(aWindowId);
+
+	szhints.flags = 0;
+	if (__bothSmallInteger(minW, minH)) {
+	    szhints.flags |= PMinSize;
+	    szhints.min_width = __intVal(minW);
+	    szhints.min_height = __intVal(minH);
+	}
+	if (__bothSmallInteger(maxW, maxH)) {
+	    szhints.flags |= PMaxSize;
+	    szhints.max_width = __intVal(maxW);
+	    szhints.max_height = __intVal(maxH);
+	}
+
+	if (szhints.flags) {
+	    ENTER_XLIB();
+	    XSetNormalHints(dpy, win, &szhints);
+	    LEAVE_XLIB();
+	}
     }
 %}.
 !
@@ -13659,10 +13659,10 @@
 
     utf8String := aString utf8Encoded.
     aString isWideString ifTrue:[
-        "/ X does not like 2-byte labels ...
-        simpleString := aString asSingleByteStringReplaceInvalidWith:$?
+	"/ X does not like 2-byte labels ...
+	simpleString := aString asSingleByteStringReplaceInvalidWith:$?
     ] ifFalse:[
-        simpleString := aString.
+	simpleString := aString.
     ].
 
 %{
@@ -13674,17 +13674,17 @@
      && __isStringLike(simpleString)
      && __isExternalAddress(aWindowId)) {
 
-        titleProperty.value =  __stringVal(utf8String);
-        titleProperty.encoding = __smallIntegerVal(utf8StringAtom);
-        titleProperty.format = 8;
-        titleProperty.nitems = __stringSize(utf8String);
-
-        ENTER_XLIB();
-        XStoreName(myDpy, __WindowVal(aWindowId), (char *) __stringVal(simpleString));
-        /* alternative settings for UTF8-Strings */
-        XSetWMName(myDpy, __WindowVal(aWindowId), &titleProperty);
-        LEAVE_XLIB();
-        RETURN ( self );
+	titleProperty.value =  __stringVal(utf8String);
+	titleProperty.encoding = __smallIntegerVal(utf8StringAtom);
+	titleProperty.format = 8;
+	titleProperty.nitems = __stringSize(utf8String);
+
+	ENTER_XLIB();
+	XStoreName(myDpy, __WindowVal(aWindowId), (char *) __stringVal(simpleString));
+	/* alternative settings for UTF8-Strings */
+	XSetWMName(myDpy, __WindowVal(aWindowId), &titleProperty);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailedOrClosedConnection
@@ -13699,13 +13699,13 @@
     | pid |
 
     pid := anIntegerOrNil isNil
-                ifTrue:[OperatingSystem getProcessId]
-                ifFalse:[anIntegerOrNil].
+		ifTrue:[OperatingSystem getProcessId]
+		ifFalse:[anIntegerOrNil].
     self
-        setProperty:#'_NET_WM_PID'
-        type:#CARDINAL
-        value:pid
-        for:aWindowId
+	setProperty:#'_NET_WM_PID'
+	type:#CARDINAL
+	value:pid
+	for:aWindowId
 
     "Created: / 04-01-2013 / 16:03:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 26-04-2018 / 10:46:24 / stefan"
@@ -13727,18 +13727,18 @@
     Pixmap shapeBitmap;
 
     if (__isExternalAddress(aPixmapId))
-        shapeBitmap = __PixmapVal(aPixmapId);
+	shapeBitmap = __PixmapVal(aPixmapId);
     else
-        shapeBitmap = (Pixmap)0;
+	shapeBitmap = (Pixmap)0;
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        ENTER_XLIB();
-        XShapeCombineMask(myDpy, __WindowVal(aWindowId), ShapeClip,
-                          0, 0,
-                          shapeBitmap, ShapeSet);
-        LEAVE_XLIB();
-        RETURN ( self );
+	ENTER_XLIB();
+	XShapeCombineMask(myDpy, __WindowVal(aWindowId), ShapeClip,
+			  0, 0,
+			  shapeBitmap, ShapeSet);
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 #endif
 %}.
@@ -13755,18 +13755,18 @@
     stateAtom := self atomIDOf:aSymbol create:false.
 
     (netWmWindowStateAtom notNil and:[stateAtom notNil]) ifTrue:[
-        self
-            sendClientEvent:netWmWindowStateAtom
-            format:32
-            to:(self rootWindowId)
-            propagate:true
-            eventMask:((self eventMaskFor:#substructureNotify) bitOr:(self eventMaskFor:#substructureRedirect))
-            window:aWindowId
-            data1:(self atomIDOf:#'_NET_WM_STATE_ADD' create:false)
-            data2:stateAtom
-            data3:nil
-            data4:1
-            data5:nil.
+	self
+	    sendClientEvent:netWmWindowStateAtom
+	    format:32
+	    to:(self rootWindowId)
+	    propagate:true
+	    eventMask:((self eventMaskFor:#substructureNotify) bitOr:(self eventMaskFor:#substructureRedirect))
+	    window:aWindowId
+	    data1:(self atomIDOf:#'_NET_WM_STATE_ADD' create:false)
+	    data2:stateAtom
+	    data3:nil
+	    data4:1
+	    data5:nil.
     ] ifFalse:[self halt.].
 
     "
@@ -13791,26 +13791,26 @@
     | valueAtom |
 
     self assert:(#(_NET_WM_WINDOW_TYPE_DESKTOP
-                  _NET_WM_WINDOW_TYPE_DOCK
-                  _NET_WM_WINDOW_TYPE_TOOLBAR
-                  _NET_WM_WINDOW_TYPE_MENU
-                  _NET_WM_WINDOW_TYPE_UTILITY
-                  _NET_WM_WINDOW_TYPE_SPLASH
-                  _NET_WM_WINDOW_TYPE_DIALOG
-                  _NET_WM_WINDOW_TYPE_NORMAL) includes: aSymbol).
+		  _NET_WM_WINDOW_TYPE_DOCK
+		  _NET_WM_WINDOW_TYPE_TOOLBAR
+		  _NET_WM_WINDOW_TYPE_MENU
+		  _NET_WM_WINDOW_TYPE_UTILITY
+		  _NET_WM_WINDOW_TYPE_SPLASH
+		  _NET_WM_WINDOW_TYPE_DIALOG
+		  _NET_WM_WINDOW_TYPE_NORMAL) includes: aSymbol).
 
     valueAtom := self atomIDOf:aSymbol create:false.
     valueAtom isNil ifTrue:[
-        "/ Hmm, no such property, not running under EWMH compliant WM?
-        self breakPoint: #jv.
-        ^ self
+	"/ Hmm, no such property, not running under EWMH compliant WM?
+	self breakPoint: #jv.
+	^ self
     ].
 
     self
-        setProperty:#'_NET_WM_WINDOW_TYPE'
-        type:#ATOM
-        value:valueAtom
-        for:aWindowOrWindowId.
+	setProperty:#'_NET_WM_WINDOW_TYPE'
+	type:#ATOM
+	value:valueAtom
+	for:aWindowOrWindowId.
 
     "
       |v|
@@ -13840,14 +13840,14 @@
      * ignore closed connection
      */
     if (! ISCONNECTED) {
-        RETURN ( self );
+	RETURN ( self );
     }
 
     if (__isExternalAddress(aWindowId)) {
-        ENTER_XLIB();
-        XUnmapWindow(myDpy, __WindowVal(aWindowId));
-        LEAVE_XLIB();
-        RETURN ( self );
+	ENTER_XLIB();
+	XUnmapWindow(myDpy, __WindowVal(aWindowId));
+	LEAVE_XLIB();
+	RETURN ( self );
     }
 %}.
     self primitiveFailed
@@ -13862,28 +13862,28 @@
 
     if (ISCONNECTED
      && __isExternalAddress(aWindowId)) {
-        Atom JunkAtom;
-        int JunkInt;
-        unsigned long WinState,JunkLong;
-        unsigned char *Property;
-        Atom WM_STATE_Atom;
-
-        if (__INST(wmStateAtom) != nil) {
-            WM_STATE_Atom = __AtomVal(__INST(wmStateAtom));
-
-            ENTER_XLIB();
-            XGetWindowProperty(myDpy, __WindowVal(aWindowId),
-                               WM_STATE_Atom,
-                               0L, 2L, False, AnyPropertyType,
-                               &JunkAtom,&JunkInt,&WinState,&JunkLong,
-                               &Property);
-            LEAVE_XLIB();
-            WinState=(unsigned long)(*((long*)Property));
-            if (WinState==3) {
-                RETURN (true);
-            }
-        }
-        RETURN (false);
+	Atom JunkAtom;
+	int JunkInt;
+	unsigned long WinState,JunkLong;
+	unsigned char *Property;
+	Atom WM_STATE_Atom;
+
+	if (__INST(wmStateAtom) != nil) {
+	    WM_STATE_Atom = __AtomVal(__INST(wmStateAtom));
+
+	    ENTER_XLIB();
+	    XGetWindowProperty(myDpy, __WindowVal(aWindowId),
+			       WM_STATE_Atom,
+			       0L, 2L, False, AnyPropertyType,
+			       &JunkAtom,&JunkInt,&WinState,&JunkLong,
+			       &Property);
+	    LEAVE_XLIB();
+	    WinState=(unsigned long)(*((long*)Property));
+	    if (WinState==3) {
+		RETURN (true);
+	    }
+	}
+	RETURN (false);
     }
 %}.
     self primitiveFailedOrClosedConnection.
@@ -13903,7 +13903,7 @@
     This should vanish, once the xft drawing works.
 
     [author:]
-        cg
+	cg
 "
 ! !
 
@@ -13941,7 +13941,7 @@
     process that requests the clipboard.
 
     [author:]
-        Stefan Vogel (stefan@zwerg)
+	Stefan Vogel (stefan@zwerg)
 
     [instance variables:]
 
@@ -13970,51 +13970,51 @@
     |selection|
 
     buffer isNil ifTrue:[
-        ^ nil.
+	^ nil.
     ].
 
     targetID == (display atomIDOf:#STRING) ifTrue:[
-        display clipboardEncoding notNil ifTrue:[
-            selection := buffer decodeFrom:display clipboardEncoding
-        ].
-        selection := buffer.
+	display clipboardEncoding notNil ifTrue:[
+	    selection := buffer decodeFrom:display clipboardEncoding
+	].
+	selection := buffer.
     ] ifFalse:[targetID == (display atomIDOf:#'UTF8_STRING') ifTrue:[
-        "/ Transcript show:'UTF8: '; showCR:buffer storeString.
-        [
-            selection := buffer utf8Decoded.
-        ] on:Error do:[
-            selection := buffer asString
-        ]
+	"/ Transcript show:'UTF8: '; showCR:buffer storeString.
+	[
+	    selection := buffer utf8Decoded.
+	] on:Error do:[
+	    selection := buffer asString
+	]
     ] ifFalse:[targetID == (display atomIDOf:#TEXT) ifTrue:[
-        "/ Transcript show:'TEXT: '; showCR:buffer storeString.
-        selection := buffer asString
+	"/ Transcript show:'TEXT: '; showCR:buffer storeString.
+	selection := buffer asString
     ] ifFalse:[targetID == (display atomIDOf:#'COMPOUND_TEXT') ifTrue:[
-        "/ Transcript show:'COMPOUND_TEXT: '; showCR:buffer storeString.
-        selection := buffer asString
+	"/ Transcript show:'COMPOUND_TEXT: '; showCR:buffer storeString.
+	selection := buffer asString
     ]]]].
 
     selection notNil ifTrue:[
-        (selection endsWith:Character cr) ifTrue:[
-            selection := selection asStringCollection copyWith:''
-        ].
-        ^ selection.
+	(selection endsWith:Character cr) ifTrue:[
+	    selection := selection asStringCollection copyWith:''
+	].
+	^ selection.
     ].
 
     targetID == (display atomIDOf:#'TARGETS') ifTrue:[
-        ^ buffer
+	^ buffer
     ].
     targetID == (display atomIDOf:#'ST_OBJECT') ifTrue:[
-        "require libboss to be loaded"
-        (Smalltalk isClassLibraryLoaded:'libstx_libboss') ifFalse:[
-            'SelectionFetch: cannot decode object (libboss library missing)' errorPrintCR.
-            ^ nil
-        ].
-        ^ (Object
-            readBinaryFrom:(ReadStream on:buffer)
-            onError:[:ex |
-                ('SelectionFetch: error while decoding binary object: ',ex description) errorPrintCR.
-                nil
-            ])
+	"require libboss to be loaded"
+	(Smalltalk isClassLibraryLoaded:'libstx_libboss') ifFalse:[
+	    'SelectionFetch: cannot decode object (libboss library missing)' errorPrintCR.
+	    ^ nil
+	].
+	^ (Object
+	    readBinaryFrom:(ReadStream on:buffer)
+	    onError:[:ex |
+		('SelectionFetch: error while decoding binary object: ',ex description) errorPrintCR.
+		nil
+	    ])
     ].
 
     'XWorkstation: unimplemented property targetID: ' infoPrint. (display atomName:targetID) infoPrint.
@@ -14032,16 +14032,16 @@
      Save and wake up waiters"
 
     aMessage selector == #propertyChange:property:state:time: ifTrue:[
-        (aMessage arguments at:2) ~~ propertyID ifTrue:[
-            "I am only interested in changes of the property used to
-             store the selection"
-            ^ self.
-        ].
-        message notNil ifTrue:[
-            "this should not happen - bad selection holder?"
-            'XWorkstation(error): message overflow: ' errorPrint. display errorPrintCR.
-            ^ self.
-        ].
+	(aMessage arguments at:2) ~~ propertyID ifTrue:[
+	    "I am only interested in changes of the property used to
+	     store the selection"
+	    ^ self.
+	].
+	message notNil ifTrue:[
+	    "this should not happen - bad selection holder?"
+	    'XWorkstation(error): message overflow: ' errorPrint. display errorPrintCR.
+	    ^ self.
+	].
     ].
 
     "we get a propertyChange before the selectionNotify.
@@ -14058,26 +14058,26 @@
     |property propertyValue|
 
     incremental ifFalse:[
-        "ignore property changes until we are in incremental mode"
-        ^ self.
+	"ignore property changes until we are in incremental mode"
+	^ self.
     ].
 
     property := display getProperty:propertyID from:drawableID delete:true.
     propertyValue := property value.
 
     propertyValue size == 0 ifTrue:[
-        "property with size 0 signals end of transfer"
-        done := true.
+	"property with size 0 signals end of transfer"
+	done := true.
     ] ifFalse:[
-        buffer isNil ifTrue:[
-            targetID := property key.
-            buffer := propertyValue.
-        ] ifFalse:[
-            targetID ~= property key ifTrue:[
-                'XWorkstation(warning): targetID change in incremental select: ' errorPrint. display errorPrintCR.
-            ].
-            buffer := buffer, propertyValue.
-        ].
+	buffer isNil ifTrue:[
+	    targetID := property key.
+	    buffer := propertyValue.
+	] ifFalse:[
+	    targetID ~= property key ifTrue:[
+		'XWorkstation(warning): targetID change in incremental select: ' errorPrint. display errorPrintCR.
+	    ].
+	    buffer := buffer, propertyValue.
+	].
     ].
 
     "Modified (comment): / 25-01-2018 / 19:01:10 / mawalch"
@@ -14094,39 +14094,39 @@
     |property propertyKey atomName|
 
     aSelectionID ~~ selectionID ifTrue:[
-        "ignore notification that is not for our selection"
-        ^ self.
+	"ignore notification that is not for our selection"
+	^ self.
     ].
 
     aPropertyID == 0 ifTrue:[
-        "the selection owner could not convert the selection to our target type"
-        done := true.
-        ^ self.
+	"the selection owner could not convert the selection to our target type"
+	done := true.
+	^ self.
     ].
 
     property := display getProperty:aPropertyID from:drawableID delete:true.
     property isNil ifTrue:[
-        "the property does not exist in the specified window"
-        done := true.
-        ^ self
+	"the property does not exist in the specified window"
+	done := true.
+	^ self
     ].
 
     propertyKey := property key.
     propertyKey == aTargetID ifTrue:[
-        "good, the property is consistent with our request.
-         The whole selection is in the property"
-        buffer := property value.
-        done := true.
+	"good, the property is consistent with our request.
+	 The whole selection is in the property"
+	buffer := property value.
+	done := true.
     ] ifFalse:[propertyKey == (display atomIDOf:#INCR) ifTrue:[
-        "this is an incremental transfer. Wait for property change"
-        incremental := true.
+	"this is an incremental transfer. Wait for property change"
+	incremental := true.
     ] ifFalse:[
-        atomName := (display atomName:propertyKey) ? propertyKey.
-        'XWorkstation(error): unexpected targetID (' errorPrint.
-        atomName errorPrint.
-        ') in selectionNotify: ' errorPrint.
-        display errorPrintCR.
-        done := true.
+	atomName := (display atomName:propertyKey) ? propertyKey.
+	'XWorkstation(error): unexpected targetID (' errorPrint.
+	atomName errorPrint.
+	') in selectionNotify: ' errorPrint.
+	display errorPrintCR.
+	done := true.
     ]].
 ! !
 
@@ -14147,31 +14147,31 @@
     incremental := false.
 
     [
-        |timeout|
-
-        display registerSelectionFetcher:self.
-
-        display
-            requestSelection:aSelectionId
-            type:aTargetId
-            for:drawableID
-            intoProperty:propertyID.
-
-        timeout := display xlibTimeout.
-        [
-            |currentMessage|
-
-            (sema waitWithTimeout:timeout) isNil ifTrue:[
-                "the selection owner didn't respond within reasonable time"
-                'XWorkstation(error): selection owner does not respond:' infoPrint. display infoPrintCR.
-                ^ nil.
-            ].
-            currentMessage := message.
-            message := nil.
-            currentMessage notNil ifTrue:[currentMessage sendTo:self].
-        ] doUntil:[done].
+	|timeout|
+
+	display registerSelectionFetcher:self.
+
+	display
+	    requestSelection:aSelectionId
+	    type:aTargetId
+	    for:drawableID
+	    intoProperty:propertyID.
+
+	timeout := display xlibTimeout.
+	[
+	    |currentMessage|
+
+	    (sema waitWithTimeout:timeout) isNil ifTrue:[
+		"the selection owner didn't respond within reasonable time"
+		'XWorkstation(error): selection owner does not respond:' infoPrint. display infoPrintCR.
+		^ nil.
+	    ].
+	    currentMessage := message.
+	    message := nil.
+	    currentMessage notNil ifTrue:[currentMessage sendTo:self].
+	] doUntil:[done].
     ] ensure:[
-        display unregisterSelectionFetcher:self.
+	display unregisterSelectionFetcher:self.
     ].
 
     ^ self getSelection
@@ -14195,14 +14195,14 @@
     to define the application window group
 
     [author:]
-        Jan Vrany <jan.vrany@fit.cvut.cz>
+	Jan Vrany <jan.vrany@fit.cvut.cz>
 
     [instance variables:]
 
     [class variables:]
 
     [see also:]
-        Inter-Client Communication Conventions Manual [http://tronche.com/gui/x/icccm/]
+	Inter-Client Communication Conventions Manual [http://tronche.com/gui/x/icccm/]
 
 
 "