--- a/XWorkstation.st Fri Sep 01 14:42:27 2017 +0200
+++ b/XWorkstation.st Mon Sep 04 12:39:17 2017 +0200
@@ -1690,7 +1690,7 @@
Redefined to return a special value on SGI servers."
self serverVendor = 'Silicon Graphics' ifTrue:[
- ^ 86@68
+ ^ 86@68
].
^ super preferredIconSize
@@ -4924,11 +4924,12 @@
self primitiveFailedOrClosedConnection
!
-primDrawBits:imageBits bitsPerPixel:bitsPerPixel depth:imageDepth msb:msb masks:maskArray padding:bitPadding
- extent:imageExtent sourceOrigin:srcOrg
- into:aDrawableId
- destinationOrigin:dstOrg extent:dstExtent
- with:aGCId
+primDrawBits:imageBits bitsPerPixel:bitsPerPixel depth:imageDepth
+ msb:msb masks:maskArray padding:bitPadding
+ extent:imageExtent sourceOrigin:srcOrg
+ into:aDrawableId
+ destinationOrigin:dstOrg extent:dstExtent
+ with:aGCId
<context: #return>
@@ -5048,13 +5049,14 @@
"Modified: / 08-08-2017 / 14:16:05 / cg"
!
-primDrawBits:imageBits bitsPerPixel:bitsPerPixel depth:imageDepth msb:msb padding:bitPadding
- width:imageWidth height:imageHeight
- x:srcx y:srcy
- into:aDrawableId
- x:dstx y:dsty
- width:w height:h
- with:aGCId
+primDrawBits:imageBits bitsPerPixel:bitsPerPixel depth:imageDepth
+ msb:msb padding:bitPadding
+ width:imageWidth height:imageHeight
+ x:srcx y:srcy
+ into:aDrawableId
+ x:dstx y:dsty
+ width:w height:h
+ with:aGCId
<context: #return>
@@ -7566,11 +7568,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
@@ -10626,15 +10628,15 @@
|val typeID propertyID windowID|
propertySymbolOrAtomID isString ifTrue:[
- propertyID := self atomIDOf:propertySymbolOrAtomID create:false.
- propertyID isNil ifTrue:[^ nil].
+ propertyID := self atomIDOf:propertySymbolOrAtomID create:false.
+ propertyID isNil ifTrue:[^ nil].
] ifFalse:[
- propertyID := propertySymbolOrAtomID.
+ propertyID := propertySymbolOrAtomID.
].
aWindowOrWindowIDOrNil isView ifTrue:[
- windowID := aWindowOrWindowIDOrNil id.
+ windowID := aWindowOrWindowIDOrNil id.
] ifFalse:[
- windowID := aWindowOrWindowIDOrNil.
+ windowID := aWindowOrWindowIDOrNil.
].
%{
@@ -10649,115 +10651,115 @@
# define PROP_SIZE 2048
if (ISCONNECTED) {
- Display *dpy = myDpy;
-
- if (__isAtomID(propertyID)) {
- property = __AtomVal(propertyID);
-
- if (__isExternalAddress(windowID)) {
- window = __WindowVal(windowID);
- } else if (windowID == nil) {
- window = DefaultRootWindow(dpy);
- } else
- goto fail;
-
- nread = 0;
- cp = 0;
+ Display *dpy = myDpy;
+
+ if (__isAtomID(propertyID)) {
+ property = __AtomVal(propertyID);
+
+ if (__isExternalAddress(windowID)) {
+ window = __WindowVal(windowID);
+ } else if (windowID == nil) {
+ window = DefaultRootWindow(dpy);
+ } else
+ goto fail;
+
+ nread = 0;
+ cp = 0;
#ifdef PROPERTY_DEBUG
- console_fprintf(stderr, "getProperty %x\n", property);
-#endif
-
- do {
- int retVal;
-
- 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;
+
+ 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\n", actual_type);
-#endif
- nitems *= (actual_format / 8);
- typeID = __MKATOMOBJ(actual_type);
- if (! cp) {
- cp = cp2 = (char *)malloc(nitems+bytes_after);
- } else {
- cp2 = cp + nread;
- }
- if (! cp) {
- XFree(data);
- goto fail;
- }
-
- nread += nitems;
- bcopy(data, cp2, nitems);
- XFree(data);
+ console_fprintf(stderr, "- type:%x\n", actual_type);
+#endif
+ nitems *= (actual_format / 8);
+ typeID = __MKATOMOBJ(actual_type);
+ if (! cp) {
+ cp = cp2 = (char *)malloc(nitems+bytes_after);
+ } else {
+ cp2 = cp + nread;
+ }
+ if (! cp) {
+ XFree(data);
+ goto fail;
+ }
+
+ nread += nitems;
+ bcopy(data, cp2, nitems);
+ XFree(data);
#ifdef PROPERTY_DEBUG
- console_fprintf(stderr, "- <nitems:%d bytes_after:%d>\n", nitems, bytes_after);
-#endif
- } 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);
- }
+ console_fprintf(stderr, "- <nitems:%d bytes_after:%d>\n", nitems, bytes_after);
+#endif
+ } 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);
+ }
}
fail: ;
%}.
(typeID isNil or:[typeID == 0]) ifTrue:[
- "typeID == 0 (None): The property does not exist in the specified window"
- ^ nil
+ "typeID == 0 (None): The property does not exist in the specified window"
+ ^ nil
].
^ typeID->val
"
Display
- getProperty:#'_NET_WM_ICON_GEOMETRY'
- from:nil
- delete:false
+ getProperty:#'_NET_WM_ICON_GEOMETRY'
+ from:nil
+ delete:false
Display
- getProperty:#'_NET_SUPPORTED'
- from:nil
- delete:false
-
- Transcript showCR:(
- (Display
- getProperty:#'_NET_SUPPORTED'
- from:nil
- delete:false)
- value
- collect:[:eachID | Display atomName:eachID])
-
+ getProperty:#'_NET_SUPPORTED'
+ from:nil
+ delete:false
+
+ Transcript showCR:(
+ (Display
+ getProperty:#'_NET_SUPPORTED'
+ from:nil
+ delete:false)
+ value
+ collect:[:eachID | Display atomName:eachID])
+
"
"Modified: / 31-08-2017 / 22:01:44 / cg"