Merge jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 03 Oct 2016 12:49:54 +0100
branchjv
changeset 7599 84f6853ec60d
parent 7576 799e0846f5b0 (current diff)
parent 7592 e50263f9750d (diff)
child 7600 8b42a8f0f649
Merge
DeviceGraphicsContext.st
ShadowView.st
SimpleView.st
StandardSystemView.st
XWorkstation.st
XftFontDescription.st
--- a/BitmapFont.st	Tue Sep 20 07:03:14 2016 +0200
+++ b/BitmapFont.st	Mon Oct 03 12:49:54 2016 +0100
@@ -550,8 +550,8 @@
 !
 
 maxAscent
-    "return the maximum ascent; thats the ascent of the highest
-     character"
+    "return the maximum ascent; 
+     that's the ascent of the highest character"
 
     ascent isNil ifTrue:[
         ascent := (self maxHeight - self descent) max:0
@@ -560,8 +560,8 @@
 !
 
 maxDescent
-    "return the maximum descent; thats the descent of the highest
-     character"
+    "return the maximum descent; 
+     that's the descent of the highest character"
 
     descent isNil ifTrue:[
         descent := (self maxHeight - ascent) max:0
@@ -570,8 +570,8 @@
 !
 
 maxHeight
-    "return the maximum height; thats the height of the highest
-     character"
+    "return the maximum height; 
+     that's the height of the highest character"
 
     ^ maxHeight ? 0
 !
--- a/Color.st	Tue Sep 20 07:03:14 2016 +0200
+++ b/Color.st	Mon Oct 03 12:49:54 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1992 by Claus Gittinger
 	      All Rights Reserved
@@ -5387,7 +5389,7 @@
 !
 
 averageColorIn:aRectangle
-    "return the average color - thats myself.
+    "return the average color - that's myself.
      This method has been added for compatibility with the image protocol."
 
     ^ self
--- a/Depth1Image.st	Tue Sep 20 07:03:14 2016 +0200
+++ b/Depth1Image.st	Mon Oct 03 12:49:54 2016 +0100
@@ -186,7 +186,7 @@
 !
 
 greyImageAsMonoFormOn:aDevice
-    "convert to a monochrome form - thats easy"
+    "convert to a monochrome form - that's easy"
 
     ^ self anyImageAsFormOn:aDevice
 !
--- a/DeviceGraphicsContext.st	Tue Sep 20 07:03:14 2016 +0200
+++ b/DeviceGraphicsContext.st	Mon Oct 03 12:49:54 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1992 by Claus Gittinger
 	      All Rights Reserved
@@ -3917,11 +3915,11 @@
 !
 
 bitGravity:gravity
-    "set the bitGravity - thats the direction where the contents will move
-     when the view is resized."
+    "set the bitGravity 
+     - that's the direction where the contents will move when the view is resized."
 
     drawableId notNil ifTrue:[
-	device setBitGravity:gravity in:drawableId
+        device setBitGravity:gravity in:drawableId
     ]
 !
 
@@ -3952,11 +3950,11 @@
 !
 
 viewGravity:gravity
-    "set the viewGravity - thats the direction where the view will move
-     when the superView is resized."
+    "set the viewGravity 
+     - that's the direction where the view will move when the superView is resized."
 
     drawableId notNil ifTrue:[
-	device setWindowGravity:gravity in:drawableId
+        device setWindowGravity:gravity in:drawableId
     ].
 !
 
--- a/DeviceWorkstation.st	Tue Sep 20 07:03:14 2016 +0200
+++ b/DeviceWorkstation.st	Mon Oct 03 12:49:54 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
 COPYRIGHT (c) 1993 by Claus Gittinger
 	      All Rights Reserved
@@ -2211,7 +2209,7 @@
 !
 
 monitorType:aSymbol
-    "set the monitorType - see comment in DeviceWorkstation>>montorType"
+    "set the monitorType - see comment in DeviceWorkstation>>monitorType"
 
     monitorType := aSymbol
 !
@@ -2580,7 +2578,7 @@
     "
      Screen default bounds
     "
-    "/ thats the same as:
+    "/ that's the same as:
     "
      Display bounds
     "
--- a/Font.st	Tue Sep 20 07:03:14 2016 +0200
+++ b/Font.st	Mon Oct 03 12:49:54 2016 +0100
@@ -9,8 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-'From Smalltalk/X, Version:7.1.0.0 on 20-07-2016 at 15:21:49'                   !
-
 "{ Package: 'stx:libview' }"
 
 "{ NameSpace: Smalltalk }"
@@ -60,7 +58,7 @@
 
     For proper operation, each graphics operation working with fonts
     must get a device font before doing the draw.
-    Most draw methods in DeviceDrawable do that automatically for you, 
+    Most draw methods in DeviceDrawable do that automatically for you,
     before doing the draw; so you do not have to care.
 
     However, some operations require explicit conversion to a device font
@@ -74,13 +72,13 @@
 
         myFont := Font family:'courier' ... size:12.
             ...
-        
+
         'want to know its height on the Display'
-        
+
         h := (myFont on:Display) height.
-        
+
         'want to know its height on a printer'
-        
+
         h := (myFont on:aPrinter) height.
 
     there are alternative shortcuts for these operations:
@@ -96,11 +94,11 @@
     likes - a display may return units of pixels, a postscript printer may
     think in (fractions of) inches, a dot matrix printer may think in dots.
     Also, notice that currently only graphic displays are really supported;
-    printer devices are being developped and may or may not be in the current
+    printer devices are being developed and may or may not be in the current
     system.
 
     If a font cannot be represented on a device, a replacement
-    font is chosen and kept in the replacementFont instance variable. 
+    font is chosen and kept in the replacementFont instance variable.
     This is done to preserve the original font information, in case the image
     is restarted later on another display which has that font available.
 
@@ -110,7 +108,7 @@
       family          <String>        the font's family ('courier', 'helvetica' etc)
       face            <String>        the font's face ('bold', 'medium' etc)
       style           <String>        the font's style ('roman', 'italic', 'oblique')
-      size            <String>        the font's size (not in pixels) 
+      size            <String>        the font's size (not in pixels)
       encoding        <Symbol>        the font's encoding (usually #iso8859)
 
       device          <Object>        the device the font is associated to, or nil
@@ -132,7 +130,7 @@
       Replacements    <Dictionary>    replacement fonts
 
     [see also:]
-        DeviceWorkstation 
+        DeviceWorkstation
         DeviceDrawable GraphicsContext
         Cursor Color
         ( introduction to view programming :html: programming/viewintro.html#FONTS )
@@ -307,14 +305,6 @@
     "Created: 28.5.1996 / 18:39:53 / cg"
 ! !
 
-!Font methodsFor:'binary storage'!
-
-readBinaryContentsFrom: stream manager: manager
-    "tell the newly restored Font about restoration"
-
-    super readBinaryContentsFrom: stream manager: manager.
-    self restored
-! !
 
 !Font methodsFor:'converting'!
 
--- a/HostGraphicsDevice.st	Tue Sep 20 07:03:14 2016 +0200
+++ b/HostGraphicsDevice.st	Mon Oct 03 12:49:54 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
 COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger
 	      All Rights Reserved
@@ -172,7 +174,7 @@
         deviceFonts do:[:aFont |
             aFont releaseFromDevice.
         ].
-        deviceFonts := CachingRegistry new cacheSize:10.
+        deviceFonts := CachingRegistry new:20.
     ].
 !
 
--- a/ModalBox.st	Tue Sep 20 07:03:14 2016 +0200
+++ b/ModalBox.st	Mon Oct 03 12:49:54 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1990 by Claus Gittinger
 	      All Rights Reserved
@@ -596,7 +598,7 @@
          We need a short delay here, since at this time, the expose event has
          not yet arrived.
         "
-        device sync.     "/ thats a round trip, to ensure that all expose events are present..."
+        device sync.     "/ that's a round trip, to ensure that all expose events are present..."
         Delay waitForSeconds:0.05.
         masterGroup processExposeEvents
     ].
--- a/ShadowView.st	Tue Sep 20 07:03:14 2016 +0200
+++ b/ShadowView.st	Mon Oct 03 12:49:54 2016 +0100
@@ -180,7 +180,7 @@
             false "graphicsDevice visualType == #TrueColor" ifTrue:[
                 "
                  grey out the image (by darkening the pixels)
-                 (thats expensive ...)
+                 (that's expensive ...)
                 "
                 
                 img := Image fromForm:imageUnderShadow.
--- a/SimpleView.st	Tue Sep 20 07:03:14 2016 +0200
+++ b/SimpleView.st	Mon Oct 03 12:49:54 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -3883,7 +3885,7 @@
 !
 
 topComponent
-    "return the topmost component - thats the one with no superview.
+    "return the topmost component - that's the one with no superview.
      For ST-80 compatibility."
 
     ^ self topView
@@ -3918,7 +3920,7 @@
 !
 
 view
-    "return my view - for real views, thats the receiver.
+    "return my view - for real views, that's the receiver.
      For wrappers, its the real view that contains it"
 
     ^ self
@@ -4175,7 +4177,7 @@
 !
 
 controller:aController
-    "set the controller - thats the one handling user events"
+    "set the controller - that's the one handling user events"
 
     controller := aController.
     controller notNil ifTrue:[
@@ -4311,7 +4313,7 @@
 !
 
 viewOrigin
-    "return the viewOrigin; thats the coordinate of the contents
+    "return the viewOrigin; that's the coordinate of the contents
      which is shown topLeft in the view
      (i.e. the origin of the visible part of the contents)."
 
@@ -7510,7 +7512,7 @@
     "grab the keayboard - that is: report all keyboard events to myself,
      even if the mouse moved out of myself.
      Returns true, if the grab was sucessfull (could fail, if some other
-     application has a grab - but thats very unlikely)."
+     application has a grab - but that's very unlikely)."
 
     ^ device grabKeyboardInView:self.
 !
@@ -7519,7 +7521,7 @@
     "grab the pointer - that is: report all motion events relative to
      myself, even if moved out of myself.
      Returns true, if the grab was sucessfull (could fail, if some other
-     application has a grab - but thats very unlikely)."
+     application has a grab - but that's very unlikely)."
 
     ^ self grabPointerWithCursor:nil
 !
@@ -7529,7 +7531,7 @@
      myself, even if moved out of myself.
      Show aCursor during the grab, if the cursor argument is not nil.
      Returns true, if the grab was sucessfull (could fail, if some other
-     application has a grab - but thats very unlikely)."
+     application has a grab - but that's very unlikely)."
 
 
 "/    (sensor := self sensor) notNil ifTrue:[
@@ -11369,7 +11371,7 @@
 		]
 	    ] ensure:[
 		aWindowGroup notNil ifTrue:[
-		    aWindowGroup graphicsDevice sync.  "thats a round trip - make sure that all drawing has been processed"
+                    aWindowGroup graphicsDevice sync.  "that's a round trip - make sure that all drawing has been processed"
 		    "/ ensure that eventListener runs here ...
                     Delay waitForMilliseconds:50.
 		    aWindowGroup processExposeEvents.
--- a/StandardSystemView.st	Tue Sep 20 07:03:14 2016 +0200
+++ b/StandardSystemView.st	Mon Oct 03 12:49:54 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -52,18 +54,18 @@
     in the past (for example: FileBrowser, ChangesBrowser etc.).
     Although this worked, it may lead to the following
     problems and inconveniences:
-	- applications inherit a big number of methods through the
-	  SimpleView->View->TopView->StandardSystemView hierarchy.
-	  There is quite a danger that by accident, some method gets
-	  redefined which is required by one of those classes.
-	  (typical candidates are: terminate, destroy, open ...)
-	  This may lead to strange effects, which may not be obvious to
-	  non experts ...
+        - applications inherit a big number of methods through the
+          SimpleView->View->TopView->StandardSystemView hierarchy.
+          There is quite a danger that by accident, some method gets
+          redefined which is required by one of those classes.
+          (typical candidates are: terminate, destroy, open ...)
+          This may lead to strange effects, which may not be obvious to
+          non experts ...
 
-	- applications with multiple topViews are difficult to implement
-	  and manage.
+        - applications with multiple topViews are difficult to implement
+          and manage.
 
-	- use of a windowBuilder is difficult.
+        - use of a windowBuilder is difficult.
 
     For all those reasons, we HIGHLY recommend to NOT define applications
     as subclasses of StandardSystemView, but instead base them on
@@ -71,63 +73,62 @@
     if (if at all).
 
     [instance variables:]
-	label                   <String>    the label in the windows title
+        label                   <String>    the label in the windows title
 
-	icon                    <Form>      the icon
-					    [ignored if the display does not
-					     support icons]
+        icon                    <Form>      the icon
+                                            [ignored if the display does not
+                                             support icons]
 
-	iconView                <View>      an optional icon-view (for animated icons)
-					    [ignored if the display does not
-					     supports this]
+        iconView                <View>      an optional icon-view (for animated icons)
+                                            [ignored if the display does not
+                                             supports this]
 
-	iconLabel               <String>    the label in the icon
-					    [ignored if the display does not
-					     support label-tabs with icons]
+        iconLabel               <String>    the label in the icon
+                                            [ignored if the display does not
+                                             support label-tabs with icons]
 
-	minExtent               <Point>     the minimum size
-					    No limit, if nil
-					    [the window manager may have its own
-					     limit; typically some small area]
+        minExtent               <Point>     the minimum size
+                                            No limit, if nil
+                                            [the window manager may have its own
+                                             limit; typically some small area]
 
-	maxExtent               <Point>     the maximum size
-					    No limit, if nil.
-					    [the window manager may have its own
-					     limit; typically the screen size]
+        maxExtent               <Point>     the maximum size
+                                            No limit, if nil.
+                                            [the window manager may have its own
+                                             limit; typically the screen size]
 
-	sizeFixed               <Boolean>   prevents the view from resizing itself
-					    (especially to freeze a dialogs size)
+        sizeFixed               <Boolean>   prevents the view from resizing itself
+                                            (especially to freeze a dialogs size)
 
-	application             <AppModel>  if nonNil, thats the application
-					    Many requests (such as open/close etc.
-					    are forwarded to it, if present.
+        application             <AppModel>  if nonNil, that's the application
+                                            Many requests (such as open/close etc.
+                                            are forwarded to it, if present.
 
 
 
      [class variables:]
 
-	DefaultIcon             <Form>      cached default icon
+        DefaultIcon             <Form>      cached default icon
 
-	TakeFocusWhenMapped     <Boolean>   if true, views grab the keyboard
-					    focus (convenient with some stupid
-					    windowManagers)
+        TakeFocusWhenMapped     <Boolean>   if true, views grab the keyboard
+                                            focus (convenient with some stupid
+                                            windowManagers)
 
-	IncludeHostNameInLabel  <Boolean>   if true, the windows title shall
-					    include the hostname.
-					    (convenient if you have many remote
-					    views open simultaneously)
+        IncludeHostNameInLabel  <Boolean>   if true, the windows title shall
+                                            include the hostname.
+                                            (convenient if you have many remote
+                                            views open simultaneously)
 
-	WindowLabelFormat       <Boolean>   specifies the format for windowLabels
+        WindowLabelFormat       <Boolean>   specifies the format for windowLabels
 
 
     [author:]
-	Claus Gittinger
+        Claus Gittinger
 
     [see also:]
-	WindowGroup
-	ApplicationModel
+        WindowGroup
+        ApplicationModel
 "
-
 !
 
 examples
--- a/WindowGroup.st	Tue Sep 20 07:03:14 2016 +0200
+++ b/WindowGroup.st	Mon Oct 03 12:49:54 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1993 by Claus Gittinger
 	      All Rights Reserved
@@ -945,6 +943,16 @@
     "Modified: / 6.5.1999 / 09:47:18 / cg"
 !
 
+hideTopViews
+    "unmap all topViews associated to this windowGroup."
+
+    topViews notNil ifTrue:[
+        topViews do:[:aView |
+            aView hide.
+        ].
+    ].
+!
+
 modalDialogFinished
     "invoked, when a modal dialog is closed"
 
@@ -1215,6 +1223,23 @@
     "Modified: / 13-12-1995 / 14:04:53 / stefan"
     "Created: / 24-07-1997 / 12:52:04 / cg"
     "Modified: / 17-09-2007 / 10:59:34 / cg"
+!
+
+unhideTopViews
+    "map all topViews associated to this windowGroup."
+
+    |first|
+
+    topViews notNil ifTrue:[
+        first := true.
+        topViews do:[:aView |
+            aView map.
+            first ifTrue:[
+                aView activate.
+                first := false.
+            ].
+        ].
+    ].
 ! !
 
 !WindowGroup methodsFor:'enumerating'!
--- a/XWorkstation.st	Tue Sep 20 07:03:14 2016 +0200
+++ b/XWorkstation.st	Mon Oct 03 12:49:54 2016 +0100
@@ -1921,9 +1921,7 @@
      and the display we are connected to must support it,
      to return true here."
 
-     ^ XftFontDescription notNil
-	and:[self class hasXftLibrary
-	and:[self hasRenderExtension]]
+     ^ XftFontDescription notNil and:[hasXftLibrary].
 
     "
      Display supportsXftFonts
@@ -9461,17 +9459,17 @@
 
     super initializeScreenProperties.
 
-    hasShapeExtension := self queryShapeExtension.
-    hasShmExtension := self querySHMExtension.
-    hasDPSExtension := self queryDPSExtension.
-    hasXVideoExtension := self queryXVideoExtension.
-    hasMbufExtension := self queryMBUFExtension.
-    hasPEXExtension := self queryPEXExtension.
-    hasImageExtension := self queryXIEExtension.
-    hasInputExtension := self queryXIExtension.
-    hasXineramaExtension := self queryXineramaExtension.
-    hasRenderExtension := self queryRenderExtension.
-    hasXftLibrary := self queryXftLibrary.
+    hasShapeExtension := self hasExtension:#SHAPE.
+    hasShmExtension := self hasExtension:#MIT_SHM.
+    hasDPSExtension := self hasExtension:#DPS.
+    hasXVideoExtension := self hasExtension:#XVideo.
+    hasMbufExtension := self hasExtension:#'Multi-Buffering'.
+    hasPEXExtension := self hasExtension:#'X3D-PEX'.
+    hasImageExtension := self hasExtension:#XIE.
+    hasInputExtension := self hasExtension:#XInputExtension.
+    hasXineramaExtension := self hasExtension:#XINERAMA.
+    hasRenderExtension := self hasExtension:#RENDER.
+    hasXftLibrary := hasRenderExtension and:[self class hasXftLibrary].
 
     primaryAtom := self atomIDOf:#PRIMARY.
     stringAtom := self atomIDOf:#STRING.
@@ -9495,12 +9493,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.
@@ -9510,13 +9508,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.
     ].
 
 %{
@@ -9535,52 +9533,52 @@
     int dummy;
 
     if (ISCONNECTED) {
-	dpy = myDpy;
-
-	/*
-	 * look for RGB visual with the highest depth
-	 */
-	nvi = 0;
-	viproto.screen = scr;
-	vip = XGetVisualInfo (dpy, VisualScreenMask, &viproto, &nvi);
-	maxRGBDepth = maxRGBADepth = 0;
-	for (i = 0; i < nvi; i++) {
-	    int thisDepth = vip[i].depth;
-
-	    switch (vip[i].class) {
-		case TrueColor:
-		    if (thisDepth > maxRGBDepth) {
-			if (thisDepth <= 24) {
-			    maxRGBDepth = thisDepth;
-			    rgbRedMask = vip[i].red_mask;
-			    rgbGreenMask = vip[i].green_mask;
-			    rgbBlueMask = vip[i].blue_mask;
-			    rgbVisualID = vip[i].visualid;
-			} else {
-			    if (thisDepth > maxRGBADepth) {
-				// printf("found rgba visual!\n");
-				maxRGBADepth = thisDepth;
-				rgbaRedMask = vip[i].red_mask;
-				rgbaGreenMask = vip[i].green_mask;
-				rgbaBlueMask = vip[i].blue_mask;
-				rgbaVisualID = vip[i].visualid;
-			    }
-			}
-		    }
-		    break;
-	    }
-	}
-	if (vip) XFree ((char *) vip);
-
-	if (maxRGBDepth) {
-	    __INST(rgbVisual) = __MKEXTERNALADDRESS(rgbVisualID); __STORESELF(rgbVisual);
-	}
-	if (maxRGBADepth) {
-	    __INST(rgbaVisual) = __MKEXTERNALADDRESS(rgbaVisualID); __STORESELF(rgbaVisual);
-	    if (!maxRGBDepth) {
-		__INST(rgbVisual) = __INST(rgbaVisual); __STORESELF(rgbVisual);
-	    }
-	}
+        dpy = myDpy;
+
+        /*
+         * look for RGB visual with the highest depth
+         */
+        nvi = 0;
+        viproto.screen = scr;
+        vip = XGetVisualInfo (dpy, VisualScreenMask, &viproto, &nvi);
+        maxRGBDepth = maxRGBADepth = 0;
+        for (i = 0; i < nvi; i++) {
+            int thisDepth = vip[i].depth;
+
+            switch (vip[i].class) {
+                case TrueColor:
+                    if (thisDepth > maxRGBDepth) {
+                        if (thisDepth <= 24) {
+                            maxRGBDepth = thisDepth;
+                            rgbRedMask = vip[i].red_mask;
+                            rgbGreenMask = vip[i].green_mask;
+                            rgbBlueMask = vip[i].blue_mask;
+                            rgbVisualID = vip[i].visualid;
+                        } else {
+                            if (thisDepth > maxRGBADepth) {
+                                // printf("found rgba visual!\n");
+                                maxRGBADepth = thisDepth;
+                                rgbaRedMask = vip[i].red_mask;
+                                rgbaGreenMask = vip[i].green_mask;
+                                rgbaBlueMask = vip[i].blue_mask;
+                                rgbaVisualID = vip[i].visualid;
+                            }
+                        }
+                    }
+                    break;
+            }
+        }
+        if (vip) XFree ((char *) vip);
+
+        if (maxRGBDepth) {
+            __INST(rgbVisual) = __MKEXTERNALADDRESS(rgbVisualID); __STORESELF(rgbVisual);
+        }
+        if (maxRGBADepth) {
+            __INST(rgbaVisual) = __MKEXTERNALADDRESS(rgbaVisualID); __STORESELF(rgbaVisual);
+            if (!maxRGBDepth) {
+                __INST(rgbVisual) = __INST(rgbaVisual); __STORESELF(rgbVisual);
+            }
+        }
 
     }
 #ifdef SHM
@@ -9694,29 +9692,6 @@
     "
 !
 
-queryDPSExtension
-%{  /* NOCONTEXT */
-
-#ifdef DPS
-    if (ISCONNECTED) {
-	Display *dpy;
-	int dummy;
-
-	dpy = myDpy;
-
-	if (XQueryExtension(dpy, "DPSExtension", &dummy, &dummy, &dummy)) {
-	    RETURN ( true );
-	}
-    }
-#endif
-%}.
-    ^ false
-
-    "
-     Display queryDPSExtension
-    "
-!
-
 queryDefaultScreen
 %{  /* NOCONTEXT */
 
@@ -9844,52 +9819,6 @@
     "
 !
 
-queryMBUFExtension
-%{  /* NOCONTEXT */
-
-#ifdef MBUF
-    if (ISCONNECTED) {
-	Display *dpy;
-	int dummy;
-
-	dpy = myDpy;
-
-	if (XQueryExtension(dpy, "Multi-Buffering", &dummy, &dummy, &dummy)) {
-	    RETURN ( true );
-	}
-    }
-#endif
-%}.
-    ^ false
-
-    "
-     Display queryMBUFExtension
-    "
-!
-
-queryPEXExtension
-%{  /* NOCONTEXT */
-
-#ifdef PEX5
-    if (ISCONNECTED) {
-	Display *dpy;
-	int dummy;
-
-	dpy = myDpy;
-
-	if (XQueryExtension(dpy, PEX_NAME_STRING, &dummy, &dummy, &dummy)) {
-	    RETURN ( true );
-	}
-    }
-#endif
-%}.
-    ^ false
-
-    "
-     Display queryPEXExtension
-    "
-!
-
 queryRGBMasks
 %{  /* NOCONTEXT */
 
@@ -9914,75 +9843,6 @@
     "
 !
 
-queryRenderExtension
-%{  /* NOCONTEXT */
-
-#ifdef XRENDER
-    if (ISCONNECTED) {
-	Display *dpy;
-	int dummy;
-
-	dpy = myDpy;
-
-	if (XRenderQueryExtension (dpy, &dummy, &dummy)) {
-	    RETURN ( true );
-	}
-    }
-#endif
-%}.
-    ^ false
-
-    "
-     Display queryRenderExtension
-    "
-!
-
-querySHMExtension
-%{  /* NOCONTEXT */
-
-#ifdef SHM
-    if (ISCONNECTED) {
-	Display *dpy;
-	int dummy;
-
-	dpy = myDpy;
-
-	if (XQueryExtension(dpy, "MIT-SHM", &dummy, &dummy, &dummy)) {
-	    RETURN ( true );
-	}
-    }
-#endif
-%}.
-    ^ false
-
-    "
-     Display querySHMExtension
-    "
-!
-
-queryShapeExtension
-%{  /* NOCONTEXT */
-
-#ifdef SHAPE
-    if (ISCONNECTED) {
-	Display *dpy;
-	int dummy;
-
-	dpy = myDpy;
-
-	if (XShapeQueryExtension(dpy, &dummy, &dummy)) {
-	    RETURN ( true );
-	}
-    }
-#endif
-%}.
-    ^ false
-
-    "
-     Display queryShapeExtension
-    "
-!
-
 queryWhitePixel
 %{  /* NOCONTEXT */
 
@@ -10040,107 +9900,6 @@
     "
 !
 
-queryXIEExtension
-%{  /* NOCONTEXT */
-
-#ifdef XIE
-    if (ISCONNECTED) {
-	Display *dpy;
-	int dummy;
-
-	dpy = myDpy;
-
-	if (XQueryExtension(dpy, xieExtName, &dummy, &dummy, &dummy)) {
-	    RETURN ( true );
-	}
-    }
-#endif
-%}.
-    ^ false
-
-    "
-     Display queryXIEExtension
-    "
-!
-
-queryXIExtension
-%{  /* NOCONTEXT */
-
-#ifdef XI
-    if (ISCONNECTED) {
-	Display *dpy;
-	int dummy;
-
-	dpy = myDpy;
-
-	if (XQueryExtension(dpy, "XInputExtension", &dummy, &dummy, &dummy)) {
-	    RETURN ( true );
-	}
-    }
-#endif
-%}.
-    ^ false
-
-    "
-     Display queryXIExtension
-    "
-!
-
-queryXVideoExtension
-%{  /* NOCONTEXT */
-
-#ifdef XVIDEO
-    if (ISCONNECTED) {
-	Display *dpy;
-	int dummy;
-
-	dpy = myDpy;
-
-	if (XQueryExtension(dpy, "XVideo", &dummy, &dummy, &dummy)) {
-	    RETURN ( true );
-	}
-    }
-#endif
-%}.
-    ^ false
-
-    "
-     Display queryXVideoExtension
-    "
-!
-
-queryXftLibrary
-%{
-#ifndef XFT
-    RETURN (false);
-#endif
-%}.
-    ^ self queryRenderExtension
-!
-
-queryXineramaExtension
-%{  /* NOCONTEXT */
-
-#ifdef XINERAMA
-    if (ISCONNECTED) {
-	Display *dpy;
-	int dummy;
-
-	dpy = myDpy;
-
-	if (XineramaQueryExtension (dpy, &dummy, &dummy)) {
-	    RETURN ( true );
-	}
-    }
-#endif
-%}.
-    ^ false
-
-    "
-     Display queryXineramaExtension
-    "
-!
-
 reinitialize
     preWaitAction notNil ifTrue:[
 	Processor removePreWaitAction:preWaitAction.