rcs@cci632.cci.com (Richard Schrieber) (04/18/91)
I'm trying to specify a different icon with escape sequences in openlook shelltool. It doesn't work. Here is the command: echo "]I$/fsn25/accts/xxx/icon.icon\\" 'icon.icon' is a valid icon file. Here is the response: XView error: Number of attributes(-1073782381) exceeds max(250) Any ideas? -- Rick Schreiber
guy@auspex.auspex.com (Guy Harris) (04/21/91)
>Here is the response: > >XView error: Number of attributes(-1073782381) exceeds max(250) > >Any ideas? XView bug? Here's some patches to XView 2.0, as distributed in source form by Sun. Your mileage may differ if you have the OW 2.0 source rather than the XView 2.0 source, or it may not. The fix to "shelltool.man" removes the "move/stretch with interactive feedback" from the man page - SunView supports that, but XView doesn't. The fix to "xv_init.c" keeps XView applications from dropping core if you fire them up when X isn't running. The fix to "sel_agent.c" makes it ICCCM-compliant; i.e., the type of the TARGETS target should be ATOM, not TARGETS (yes, there *are* toolkits that check this; the Andrew toolkit checks for this, although the latest patch level to ATK includes a workaround to this XView bug). The fix to "icon_load.c" fixes a memory leak. And the fix to "ttytl.c", as I remember, fixes a bug that might cause the symptoms you saw (the fix to the call to "icon_create()" - the call left out the terminating 0 in the attribute/value list), and also fixes another bug that may cause the new icon image not to be handled properly. Now, not all window managers may cope properly with icon windows; "twm", as it showed up in the X11R4 distribution, didn't, but a later patch from MIT fixed that. "olwm" may not cope properly with them either.... *** clients/cmdtool/shelltool.man.dist Thu Aug 9 20:38:43 1990 --- clients/cmdtool/shelltool.man Sat Aug 18 15:58:07 1990 *************** *** 202,217 **** .B \eE[2t \- close (become iconic) .TP - .B \eE[3t - \- move, with interactive feedback - .TP .B \eE[3;\s-1TOP\s0;\s-1LEFT\s0t \- move, to .B \s-1TOP LEFT\s0 (pixel coordinates) - .TP - .B \eE[4t - \- stretch, with interactive feedback .TP .B \eE[4;\s-1HT\s0;\s-1WIDTH\s0t \- stretch, to --- 202,211 ---- *** lib/libxvin/base/xv_init.c.dist Thu Aug 9 20:45:57 1990 --- lib/libxvin/base/xv_init.c Tue Mar 26 19:40:36 1991 *************** *** 220,225 **** --- 220,227 ---- (char *) defaults_get_string("server.name", "Server.Name", getenv("DISPLAY")); + if (server_name == NULL) + server_name = ":0"; /* do as "server_init()" does */ error_string =malloc(strlen(ERROR_MSG) + strlen(server_name) + 2); strcpy(error_string, ERROR_MSG); *** lib/libxvin/sel/sel_agent.c.dist Thu Aug 9 20:48:48 1990 --- lib/libxvin/sel/sel_agent.c Sat Aug 18 15:52:49 1990 *************** *** 832,838 **** * 32 */ XChangeProperty(display, req_event->requestor, ! property, req_event->target, 32, PropModeReplace, (unsigned char *) targets, NUM_OF_TARGETS); send_SelectionNotify(display, req_event->requestor, req_event->selection, --- 832,838 ---- * 32 */ XChangeProperty(display, req_event->requestor, ! property, XA_ATOM, 32, PropModeReplace, (unsigned char *) targets, NUM_OF_TARGETS); send_SelectionNotify(display, req_event->requestor, req_event->selection, *** lib/libxvol/icon/icon_load.c.dist Thu Aug 9 20:50:50 1990 --- lib/libxvol/icon/icon_load.c Sat Aug 18 15:50:38 1990 *************** *** 296,301 **** --- 296,303 ---- * By default, the icon has no text or associated area. */ icon->ic_textrect = rect_null; + if (icon->ic_text != NULL) + free(icon->ic_text); icon->ic_text = NULL; /* * Also, by default, the icon has no background pattern. *** lib/libxvol/ttysw/ttytl.c.dist Thu Aug 9 20:54:13 1990 --- lib/libxvol/ttysw/ttytl.c Sun Aug 19 11:40:40 1990 *************** *** 240,249 **** ERROR_PKG, TTY, 0); } else { ! icon = icon_create(); (void) xv_set(icon, ICON_IMAGE, mpr, 0); (void) xv_set(xv_get(TTY_PUBLIC(ttysw), WIN_FRAME), ! FRAME_ICON, mpr, 0); } break; } --- 240,249 ---- ERROR_PKG, TTY, 0); } else { ! icon = icon_create(0); (void) xv_set(icon, ICON_IMAGE, mpr, 0); (void) xv_set(xv_get(TTY_PUBLIC(ttysw), WIN_FRAME), ! FRAME_ICON, icon, 0); } break; }