--- a/XWorkstation.st Tue May 10 09:30:46 2005 +0200
+++ b/XWorkstation.st Tue May 31 20:50:08 2005 +0200
@@ -1910,22 +1910,22 @@
* ignore closed connection
*/
if (! ISCONNECTED) {
- RETURN ( self );
+ RETURN ( self );
}
if (__isExternalAddress(aGCId)) {
- GC gc = __GCVal(aGCId);
-
- if (gc) {
-
- ENTER_XLIB();
- XFreeGC(myDpy, gc);
- LEAVE_XLIB();
+ GC gc = __GCVal(aGCId);
+
+ if (gc) {
+
+ ENTER_XLIB();
+ XFreeGC(myDpy, gc);
+ LEAVE_XLIB();
#ifdef COUNT_RESOURCES
- __cnt_gc--;
-#endif
- }
- RETURN ( self );
+ __cnt_gc--;
+#endif
+ }
+ RETURN ( self );
}
%}.
self primitiveFailed
@@ -1939,23 +1939,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
@@ -2186,7 +2186,7 @@
if (! root) {
id = nil;
} else {
- __INST(rootId) = id = __MKEXTERNALADDRESS(root); __STORE(self, id);
+ id = __MKEXTERNALADDRESS(root); __INST(rootId) = id; __STORE(self, id);
}
RETURN (id);
}
@@ -2295,8 +2295,8 @@
RETURN ( nil );
}
}
- __INST(rootId) = id = __MKEXTERNALADDRESS(rootWin); __STORE(self, id);
- __INST(virtualRootId) = id = __MKEXTERNALADDRESS(vRootWin); __STORE(self, id);
+ id = __MKEXTERNALADDRESS(rootWin); __INST(rootId) = id; __STORE(self, id);
+ id = __MKEXTERNALADDRESS(vRootWin); __INST(virtualRootId) = id; __STORE(self, id);
RETURN ( id );
%}
@@ -2457,8 +2457,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
@@ -2466,21 +2466,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
@@ -2779,22 +2779,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
@@ -4798,9 +4798,9 @@
lastEventTime := time.
selectionHandlers notNil ifTrue:[
- selectionHandlers do:[:eachHandler |
- eachHandler selectionClear:selectionID
- ]
+ selectionHandlers do:[:eachHandler |
+ eachHandler selectionClear:selectionID
+ ]
].
!
@@ -4848,27 +4848,27 @@
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.
+ property := nil.
] ifFalse:[
- property == 0 ifTrue:[
- "Support old (obsolete) clients requesting a None property.
- Set the propertyID to the targetID"
- property := targetID.
- ].
- self setProperty:property
- type:targetID
- value:selection
- for:requestorID.
+ property == 0 ifTrue:[
+ "Support old (obsolete) clients requesting a None property.
+ Set the propertyID to the targetID"
+ property := targetID.
+ ].
+ self setProperty:property
+ type:targetID
+ value:selection
+ for:requestorID.
].
self sendNotifySelection:selectionID
- property:property
- target:targetID
- time:time
- to:requestorID.
+ property:property
+ target:targetID
+ time:time
+ to:requestorID.
!
visibilityNotify:aView state:how
@@ -5429,13 +5429,13 @@
__ArrayInstPtr(anEventArray)->a_element[2] = sym;
__ArrayInstPtr(anEventArray)->a_element[3] = arg; __STORE(anEventArray, arg);
- __ArrayInstPtr(anEventArray)->a_element[4] = t = __MKUINT(ke->keycode); __STORE(anEventArray, t);
+ 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);
- __ArrayInstPtr(anEventArray)->a_element[10] = t = __MKUINT(ke->time); __STORE(anEventArray, t);
+ t = __MKUINT(ke->time); __ArrayInstPtr(anEventArray)->a_element[10] = t; __STORE(anEventArray, t);
break;
case ButtonPress:
@@ -5454,7 +5454,7 @@
__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);
- __ArrayInstPtr(anEventArray)->a_element[9] = t = __MKUINT(be->time); __STORE(anEventArray, t);
+ t = __MKUINT(be->time); __ArrayInstPtr(anEventArray)->a_element[9] = t; __STORE(anEventArray, t);
break;
case MotionNotify:
@@ -5465,7 +5465,7 @@
__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);
- __ArrayInstPtr(anEventArray)->a_element[8] = t = __MKUINT(me->time); __STORE(anEventArray, t);
+ t = __MKUINT(me->time); __ArrayInstPtr(anEventArray)->a_element[8] = t; __STORE(anEventArray, t);
break;
case FocusIn:
@@ -5497,7 +5497,7 @@
__ArrayInstPtr(anEventArray)->a_element[7] = __mkSmallInteger(ele->state);
__ArrayInstPtr(anEventArray)->a_element[8] = __mkSmallInteger(ele->mode);
__ArrayInstPtr(anEventArray)->a_element[9] = __mkSmallInteger(ele->detail);
- __ArrayInstPtr(anEventArray)->a_element[10] = t = __MKUINT(ele->time); __STORE(anEventArray, t);
+ t = __MKUINT(ele->time); __ArrayInstPtr(anEventArray)->a_element[10] = t; __STORE(anEventArray, t);
break;
case Expose:
@@ -5566,7 +5566,7 @@
__ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(ce->height);
__ArrayInstPtr(anEventArray)->a_element[7] = nil;
if (ce->above != None) {
- __ArrayInstPtr(anEventArray)->a_element[7] = t = __MKEXTERNALADDRESS(ce->above); __STORE(anEventArray, t);
+ t = __MKEXTERNALADDRESS(ce->above); __ArrayInstPtr(anEventArray)->a_element[7] = t; __STORE(anEventArray, t);
}
break;
@@ -5590,7 +5590,7 @@
__ArrayInstPtr(anEventArray)->a_element[6] = __mkSmallInteger(cr->height);
__ArrayInstPtr(anEventArray)->a_element[7] = nil;
if (cr->above != None) {
- __ArrayInstPtr(anEventArray)->a_element[7] = t = __MKEXTERNALADDRESS(cr->above); __STORE(anEventArray, t);
+ t = __MKEXTERNALADDRESS(cr->above); __ArrayInstPtr(anEventArray)->a_element[7] = t; __STORE(anEventArray, t);
}
switch (cr->detail) {
case Above:
@@ -5649,13 +5649,13 @@
__ArrayInstPtr(anEventArray)->a_element[4] = __MKSMALLINT(pe->state);
break;
}
- __ArrayInstPtr(anEventArray)->a_element[5] = t = __MKUINT(pe->time); __STORE(anEventArray, t);
+ 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);
- __ArrayInstPtr(anEventArray)->a_element[4] = t = __MKUINT(sce->time); __STORE(anEventArray, t);
+ t = __MKUINT(sce->time); __ArrayInstPtr(anEventArray)->a_element[4] = t; __STORE(anEventArray, t);
break;
case SelectionRequest:
@@ -5663,11 +5663,11 @@
* someone wants the selection
*/
__ArrayInstPtr(anEventArray)->a_element[2] = @symbol(selectionRequest:requestor:selection:target:property:time:);
- __ArrayInstPtr(anEventArray)->a_element[3] = t = __MKEXTERNALADDRESS(ev.xselectionrequest.requestor); __STORE(anEventArray, t);
+ 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);
- __ArrayInstPtr(anEventArray)->a_element[7] = t = __MKUINT(ev.xselectionrequest.time); __STORE(anEventArray, t);
+ t = __MKUINT(ev.xselectionrequest.time); __ArrayInstPtr(anEventArray)->a_element[7] = t; __STORE(anEventArray, t);
break;
case SelectionNotify:
@@ -5678,8 +5678,8 @@
__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);
- __ArrayInstPtr(anEventArray)->a_element[6] = t = __MKEXTERNALADDRESS(ev.xselection.requestor); __STORE(anEventArray, t);
- __ArrayInstPtr(anEventArray)->a_element[7] = t = __MKUINT(ev.xselection.time); __STORE(anEventArray, t);
+ 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:
@@ -5705,7 +5705,7 @@
__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);
- __ArrayInstPtr(anEventArray)->a_element[5] = t = __MKBYTEARRAY(ev.xclient.data, sizeof(ev.xclient.data)); __STORE(anEventArray, t);
+ t = __MKBYTEARRAY(ev.xclient.data, sizeof(ev.xclient.data)); __ArrayInstPtr(anEventArray)->a_element[5] = t; __STORE(anEventArray, t);
break;
case MappingNotify:
@@ -5725,7 +5725,7 @@
break;
}
__ArrayInstPtr(anEventArray)->a_element[3] = arg;
- __ArrayInstPtr(anEventArray)->a_element[4] = t = __MKBYTEARRAY(&ev, sizeof(*mape));
+ t = __MKBYTEARRAY(&ev, sizeof(*mape)); __ArrayInstPtr(anEventArray)->a_element[4] = t;
__STORE(anEventArray, t);
break;
@@ -6423,8 +6423,8 @@
n = f->n_properties;
propsArray = __ARRAY_NEW_INT(n*2);
for (i = 0; n; n--, prop++) {
- __ArrayInstPtr(propsArray)->a_element[i++] = x = __MKUINT(prop->name); __STORE(propsArray, x);
- __ArrayInstPtr(propsArray)->a_element[i++] = x = __MKUINT(prop->card32); __STORE(propsArray, x);
+ 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);
}
}
}
@@ -6818,21 +6818,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
@@ -8892,14 +8892,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();
}
%}
!
@@ -10015,25 +10015,25 @@
selectionOwnerWindowId := self getSelectionOwnerOf:clipboardAtom.
selectionOwnerWindowId isNil ifTrue:[
- "no selection. There is the possibilty that one of our (modal)
- views has been closed. Get the selection from the copyBuffer"
- ^ copyBuffer.
+ "no selection. There is the possibilty that one of our (modal)
+ views has been closed. Get the selection from the copyBuffer"
+ ^ copyBuffer.
].
selectionOwnerWindowId = selectionOwner ifTrue:[
- "I still hold the selection, so return my locally buffered data"
- ^ copyBuffer
+ "I still hold the selection, so return my locally buffered data"
+ ^ copyBuffer
].
selection := SelectionFetcher
- requestSelection:clipboardAtom
- type:(self atomIDOf:#'ST_OBJECT')
- onDevice:self for:drawableId.
+ requestSelection:clipboardAtom
+ type:(self atomIDOf:#'ST_OBJECT')
+ onDevice:self for:drawableId.
selection isNil ifTrue:[
- selection := SelectionFetcher
- requestSelection:clipboardAtom
- type:(self atomIDOf:#'UTF8_STRING')
- onDevice:self for:drawableId.
+ selection := SelectionFetcher
+ requestSelection:clipboardAtom
+ type:(self atomIDOf:#'UTF8_STRING')
+ onDevice:self for:drawableId.
].
^ selection.
@@ -10050,33 +10050,33 @@
|selectionId selectionOwnerWindowId selection|
selectionBufferSymbol == #selection ifTrue:[
- selectionId := primaryAtom.
+ selectionId := primaryAtom.
] ifFalse:[
- selectionId := clipboardAtom.
+ selectionId := clipboardAtom.
].
selectionOwnerWindowId := self getSelectionOwnerOf:selectionId.
selectionOwnerWindowId isNil ifTrue:[
- "no selection. There is the possibilty that one of our (modal)
- views has been closed. Get the selection from the copyBuffer"
- ^ self copyBufferAsString.
+ "no selection. There is the possibilty that one of our (modal)
+ views has been closed. Get the selection from the copyBuffer"
+ ^ self copyBufferAsString.
].
selectionOwnerWindowId = selectionOwner ifTrue:[
- "I still hold the selection, so return my locally buffered data"
- ^ self copyBufferAsString.
+ "I still hold the selection, so return my locally buffered data"
+ ^ self copyBufferAsString.
].
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
@@ -10105,36 +10105,36 @@
Answer the converted selection"
(aTargetAtom == (self atomIDOf:#STRING)) ifTrue:[
- "the other view wants the selection as string"
- ^ self copyBufferAsString.
+ "the other view wants the selection as string"
+ ^ self copyBufferAsString.
].
(aTargetAtom == (self atomIDOf:#UTF8_STRING)) ifTrue:[
- "the other view wants the selection as utf8 string"
- ^ self copyBufferAsString utf8Encoded.
+ "the other view wants the selection as utf8 string"
+ ^ self copyBufferAsString utf8Encoded.
].
(aTargetAtom == (self atomIDOf:#TIMESTAMP)) ifTrue:[
- "the other view wants to know when we acquired ownership of the selection"
- ^ selectionTime.
+ "the other view wants to know when we acquired ownership of the selection"
+ ^ selectionTime.
].
(aTargetAtom == (self atomIDOf:#TARGETS)) ifTrue:[
- "the other view wants to know which targets we support"
- ^ self supportedTargetAtoms.
+ "the other view wants to know which targets we support"
+ ^ self supportedTargetAtoms.
].
(aTargetAtom == (self atomIDOf:#'ST_OBJECT')) ifTrue:[
- "send the selection in binaryStore format"
- ^ self getCopyBuffer binaryStoreBytes.
+ "send the selection in binaryStore format"
+ ^ self getCopyBuffer binaryStoreBytes.
].
aTargetAtom == (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 copyBufferAsString 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 copyBufferAsString size
].
"we do not support the requestet target type"
@@ -11507,14 +11507,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
@@ -11594,37 +11594,37 @@
|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 := CharacterArray fromUTF8Bytes:buffer
+ selection := CharacterArray fromUTF8Bytes:buffer
] ifFalse:[targetID == (display atomIDOf:#TEXT) ifTrue:[
"/ Transcript show:'TEXT: '; showCR:buffer storeString.
- selection := buffer asString
+ selection := buffer asString
] ifFalse:[targetID == (display atomIDOf:#'COMPOUND_TEXT') ifTrue:[
"/ Transcript show:'COMPOUND_TEXT: '; showCR:buffer storeString.
- selection := buffer asString
+ 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:[
- ^ (Object readBinaryFrom:(ReadStream on:buffer) onError:[nil])
+ ^ (Object readBinaryFrom:(ReadStream on:buffer) onError:[nil])
].
'XWorkstation: unimplemented property targetID: ' infoPrint. (display atomName:targetID) infoPrint.
@@ -11738,31 +11738,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
@@ -11779,7 +11779,7 @@
!XWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.471 2004-12-29 13:05:12 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.472 2005-05-31 18:50:08 cg Exp $'
! !
XWorkstation initialize!