Do not signal closedConnection in methods where a closed connection is ignored.
--- a/XWorkstation.st Mon Sep 27 16:08:22 2004 +0200
+++ b/XWorkstation.st Mon Sep 27 16:11:50 2004 +0200
@@ -1906,56 +1906,59 @@
<context: #return>
%{
-
+ /*
+ * 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 );
- }
-%}.
- self primitiveFailedOrClosedConnection
+ __cnt_gc--;
+#endif
+ }
+ RETURN ( self );
+ }
+%}.
+ self primitiveFailed
!
destroyPixmap:aDrawableId
<context: #return>
%{
-
+ /*
+ * 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 );
- }
-%}.
- self primitiveFailedOrClosedConnection
+ __cnt_bitmap--;
+#endif
+
+ }
+ RETURN ( self );
+ }
+%}.
+ self primitiveFailed
!
destroyView:aView withId:aWindowId
@@ -2454,30 +2457,33 @@
#ifdef QUICK_TRUE_COLORS
if (__INST(visualType) == @symbol(TrueColor)) {
- /* no need to do anything on TrueColor displays ... */
- RETURN (self);
- }
-#endif
-
+ /* no need to do anything on TrueColor displays ... */
+ RETURN (self);
+ }
+#endif
+
+ /*
+ * 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 );
- }
-%}.
- self primitiveFailedOrClosedConnection
+ __cnt_color--;
+#endif
+
+ RETURN ( self );
+ }
+%}.
+ self primitiveFailed
!
getScaledRGBFrom:index
@@ -2769,28 +2775,29 @@
<context: #return>
%{
-
+ /*
+ * 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 );
- }
-%}.
- self primitiveFailedOrClosedConnection
+ __cnt_cursor--;
+#endif
+ }
+ RETURN ( self );
+ }
+%}.
+ self primitiveFailed
!
needDeviceFormsForCursor
@@ -6805,26 +6812,27 @@
<context: #return>
%{
-
XFontStruct *f;
+ /*
+ * 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
@@ -8884,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();
}
%}
!
@@ -11495,19 +11503,21 @@
<context: #return>
%{
-
- if (!ISCONNECTED) {
- RETURN ( self );
+ /*
+ * ignore closed connection
+ */
+ if (! ISCONNECTED) {
+ RETURN ( self );
}
if (__isExternalAddress(aWindowId)) {
- ENTER_XLIB();
- XUnmapWindow(myDpy, __WindowVal(aWindowId));
- LEAVE_XLIB();
- RETURN ( self );
- }
-%}.
- self primitiveFailedOrClosedConnection
+ ENTER_XLIB();
+ XUnmapWindow(myDpy, __WindowVal(aWindowId));
+ LEAVE_XLIB();
+ RETURN ( self );
+ }
+%}.
+ self primitiveFailed
!
windowIsIconified:aWindowId
@@ -11769,7 +11779,7 @@
!XWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.469 2004-09-23 17:37:25 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.470 2004-09-27 14:11:50 stefan Exp $'
! !
XWorkstation initialize!