--- a/XWorkstation.st Tue May 10 09:40:58 2016 +0200
+++ b/XWorkstation.st Tue May 10 10:11:56 2016 +0200
@@ -726,6 +726,19 @@
!XWorkstation class methodsFor:'accessing-display capabilities'!
+hasXCursorLibrary
+%{
+#ifdef XCURSOR
+ RETURN(true);
+#else
+ RETURN(false);
+#endif
+%}
+ "
+ Display hasXCursorLibrary
+ "
+!
+
hasXftLibrary
%{
#ifdef XFT
@@ -1293,6 +1306,17 @@
^ 0@0
!
+hasCursorExtension
+ "return true, if this workstation supports the X cursor extension.
+ This extension allows for deep cursors (depth > 1)"
+
+ ^ self hasExtension:'CURSOR'
+
+ "
+ Display hasCursorExtension
+ "
+!
+
hasDPS
"return true, if this workstation supports display postscript.
Both the server must support it, and the feature must have been
@@ -1757,7 +1781,8 @@
supportsMaskedDrawingWithOffset:aForm
"return true, if the device allows the given form pixmap
to be used as paint color with a mask offset.
- True returned here - X has no trouble with any mask,except for XQuartz, which has."
+ True returned here - X has no trouble with any mask,
+ except for XQuartz, which has."
"XQuartz seems to have a bug here..."
OperatingSystem isOSXlike ifTrue:[^ false].
@@ -1772,7 +1797,8 @@
"XQuartz seems to have a bug here...
...but only on XQuartz servers.
- Blame: cannot ask via server vendor, if its a Quartz display"
+ Blame: I cannot ask via server vendor, if its a Quartz display, because
+ it does not return a valid server vendor string"
OperatingSystem isOSXlike ifTrue:[
^ false
].
@@ -1797,9 +1823,9 @@
!
supportsViewBackgroundPixmap:aForm
- "return true, if the device allows the given pixmap as
- viewBackground.
- True returned here - X support any size."
+ "return true, if the device allows the given pixmap as viewBackground.
+ True returned here - X supports any size.
+ Other device types (windows) may restrict this to certain sizes."
^ true
@@ -1810,13 +1836,38 @@
supportsViewGravity
"return true, if this device supports gravity attributes.
We do not depend on it being implemented, but some resizing operations
- are faster, it is is."
+ are faster, if they are."
^ true
!
+supportsXCursor
+ "return true, if the XCursor extension (deep cursors ) are supported
+ on this display.
+ Both Smalltalk has to be compiled to support it (as client),
+ and the display we are connected to must support it,
+ to return true here."
+
+ ^ self class hasXCursorLibrary
+ and:[self hasCursorExtension]
+
+ "
+ Display supportsXCursor
+ Display hasCursorExtension
+ Display class hasXCursorLibrary
+ "
+!
+
supportsXftFonts
- ^ XftFontDescription notNil and:[self class hasXftLibrary and:[self hasRenderExtension]]
+ "return true, if XftFonts (nice looking truetype fonts)
+ are supported on this display.
+ Both Smalltalk has to be compiled to support it (as client),
+ and the display we are connected to must support it,
+ to return true here."
+
+ ^ XftFontDescription notNil
+ and:[self class hasXftLibrary
+ and:[self hasRenderExtension]]
"
Display supportsXftFonts
@@ -1829,10 +1880,10 @@
"return true, if this device wants to suppress shadow views
(i.e. shadows under popups and modalBoxes).
Some (slow) devices may want to return true here.
- Also, XQuartz does not work..."
+ Also, with XQuartz, it does not work, because we cannot readout the screen..."
OperatingSystem isOSXlike ifTrue:[
- ^ true
+ ^ true
].
^ super suppressShadowViews
!