v14i093: Official patch #8 for faces v1.4; please apply it.
Rich Burridge
rburridge at Sun.COM
Sun Sep 16 11:05:31 AEST 1990
Posting-number: Volume 14, Issue 93
Submitted-by: rburridge at Sun.COM (Rich Burridge)
Archive-name: faces-1.4.5/patch04
[Brandon, could you post this to comp.sources.misc when you get a chance
please?]
Faces is a visual monitor for mail, jobs on a printer or users on a machine.
There are graphical interfaces for X11, XView, NeWS and SunView.
This is official patch #8 for faces v1.4.
It makes the following changes:
* From Mike Khaw <khaw at parcplace.com>
From Rod Whitby <rwhitby at austek.oz.au>
From John Pritchard <john at latcs1.lat.oz.au>
faces v1.4.7 dumps core in make_iconname(). It's doing an strlen
on facepath[i] when it could be NULL. This is probably caused
when your FACEDIR directory doesn't have a misc./unknown subtree.
* From Ian Darwin <ian at sq.com>
The x11 driver does not set XA_WM_CLASS, so things that depend
on CLASS to operate won't operate properly.
* From Greg Rose <greg at softway.sw.oz.au>
From Ken Wood <adl.austek.oz.au>
faces with both the -MH and -a options together didn't work
correctly.
* The -v command line option now displays the usage message and exit.
The new -? command line option is similar. The usage message is now
upto date and also lists the keyboard accelerators.
* From John Pritchard <john at latcs1.lat.oz.au>
The file netdb.h was included twice if DNSLOOKUP is defined.
* From Chris Maltby <chris at softway.sw.oz.au>
The window attributes structure with the X11 driver is now zeroised
before being used.
* From Chris Maltby <chris at softway.sw.oz.au>
With the X11 driver, if the icon position hasn't been specified
with the -WP option, then the position defaults to the where the
right end of the open window would appear.
* From Steven M. Miller <miller at SCTC.COM>
Under X, when faces is started up in iconic mode nothing is displayed
in the icon until the icon is clicked on and opened and then closed
again.
* From Michael Schmidt <michael at uni-paderborn.de>
Perhaps my configuration (SparcStation, SunOS4.0.3, X11R4, twm with
ForceIcons, IconManager and IconRegion) is wierd, but... The icon is
not placed in the IconRegion, but just at 0x0 (or 1x1, or so). Then I
cannot deiconify the icon by a mouse click (all other icons deiconify
on a left button click).
* From Steven M. Miller <miller at SCTC.COM>
faces now recognises -iconic (as well as -Wi) to specify iconic mode.
Inverse mode is still -i. The manual page has been updated.
* From Ian Darwin <ian at sq.com>
faces uses -s <spoolfile> to indicate a different spool file to
monitor. How about a -S <spooldir> to indicate a different spool
directory? The manual page has been updated.
* From Lindsay F. Marshall <Lindsay.Marshall%newcastle.ac.uk at munnari.oz>
faces works incorrectly when either the -h <height> or the -w <width>
options are given. The image area is not being cleared first.
Apply this patch with Larry Walls' patch program, recompile and reinstall.
See the README file for more details on how to install faces.
faces v1.4 was posted to comp.sources.misc on 29th June 1990 at patchlevel 5.
Patch 6 and 7 have been posted to comp.sources.[bugs,misc], but if you missed
them then they can be obtained from the automatic mail archive server, by
sending a message to rb-archive-server at Aus.Sun.COM containing the line:
send faces patchn
where n is the patch number you want.
You can also include a path line in these requests to indicate the mail
path that the archive server should use to send the files to you. Such a
path line could be:
path uunet.uu.net!hostname!user
Note that this is uunet.uu.net and not just uunet. Sun.COM doesn't recognise
just uunet.
*IMPORTANT NOTE* I've received several more bug reports and enhancements. If
I didn't include a fix in this patch or add it to the TODO
file, it's simply because I ran out of time. Hopefully the
fix or the enhancement will be included in the next patch.
Rich Burridge, DOMAIN: richb at Aus.Sun.COM
Sun Microsystems. ACSNET: richb at sunaus.sun.oz
PHONE: +61 2 413 2666 UUCP: {uunet,mcvax,ukc}!munnari!sunaus.oz!richb
------CUT HERE------patch.8------CUT HERE------
------- get.c -------
*** /tmp/da15167 Thu Sep 13 17:10:30 1990
--- get.c Thu Sep 13 14:28:57 1990
***************
*** 166,171 ****
--- 166,175 ----
INC ;
getparam(printer, argv, "-P needs printer name") ;
break ;
+ case 'S' : INC ; /* Alternative spoolfile. */
+ getparam(next, argv, "-s needs spool directory") ;
+ SPRINTF(spoolfile, "%s/%s", next, username) ;
+ break ;
case 'U' : update++ ; /* Update faces database. */
break ;
case 'a' : mtype = MONALL ; /* Monitor all of the spoolfile. */
***************
*** 173,179 ****
case 'b' : if (argv[0][2] == 'g')
{
INC ; /* Background color. */
! getparam(bgcolor, argv, "-bg specifies background color") ;
break ;
}
INC ; /* Alternate background pattern. */
--- 177,184 ----
case 'b' : if (argv[0][2] == 'g')
{
INC ; /* Background color. */
! getparam(bgcolor, argv,
! "-bg specifies background color") ;
break ;
}
INC ; /* Alternate background pattern. */
***************
*** 217,223 ****
imageheight = ICONHEIGHT ;
}
break ;
! case 'i' : invert = 1 ; /* Reverse video. */
break ;
case 'n' : dontshowno = 1 ; /* Don't show number of messages. */
break ;
--- 222,229 ----
imageheight = ICONHEIGHT ;
}
break ;
! case 'i' : if (!strncmp(&argv[0][1], "iconic", 6)) iconic = 1 ;
! else if (argv[0][2] == '\0') invert = 1 ;
break ;
case 'n' : dontshowno = 1 ; /* Don't show number of messages. */
break ;
***************
*** 226,240 ****
period = atoi(next) ;
break ;
case 's' : INC ; /* Alternative spoolfile. */
! getparam(spoolfile, argv, "-s needs spool directory") ;
break ;
case 't' : dontshowtime = 1 ; /* Do not show timestamps. */
break ;
case 'u' : dontshowuser = 1 ; /* Do not show usernames. */
break ;
! case 'v' : FPRINTF(stderr, "%s version 1.4.%1d\n",
! progname, PATCHLEVEL) ;
! exit(1) ;
case 'w' : INC ; /* Face image width. */
getparam(next, argv, "-w needs width value") ;
imagewidth = atoi(next) ;
--- 232,245 ----
period = atoi(next) ;
break ;
case 's' : INC ; /* Alternative spoolfile. */
! getparam(spoolfile, argv, "-s needs spool file") ;
break ;
case 't' : dontshowtime = 1 ; /* Do not show timestamps. */
break ;
case 'u' : dontshowuser = 1 ; /* Do not show usernames. */
break ;
! case '?' :
! case 'v' : usage() ;
case 'w' : INC ; /* Face image width. */
getparam(next, argv, "-w needs width value") ;
imagewidth = atoi(next) ;
***************
*** 282,287 ****
--- 287,293 ----
getparam(next, argv,
"-WP needs y coordinate") ;
iy = atoi(next) ;
+ iconpos = 1 ;
break ;
case 's' : INC ; INC ; /* -Ws xnum ynum */
break ;
***************
*** 534,542 ****
usage() /* Print faces usage message. */
{
! FPRINTF(stderr, "Usage: %s [-MH] [-P printer] [-Wi] [-Wp x y] ", progname) ;
! FPRINTF(stderr, "[-WP x y] [-b background] [-bg background_color] ") ;
! FPRINTF(stderr, "[-d display] [-f facepath] [-fg foreground_color] ") ;
! FPRINTF(stderr, "[-g geometry] [-i] [-n] [-p period] [-s spoolfile] [-u] ") ;
! FPRINTF(stderr, "[-t] [-v]\n") ;
}
--- 540,556 ----
usage() /* Print faces usage message. */
{
! FPRINTF(stderr, "%s version 1.4.%1d\n\n", progname, PATCHLEVEL) ;
! FPRINTF(stderr, "Usage: %s [-H hostname] [-MH] [-P printer]\n", progname) ;
! FPRINTF(stderr, "\t[-S spooldir] [-U] [-Wi] [-Wp x y] [-WP x y] [-a]\n") ;
! FPRINTF(stderr, "\t[-b background] [-bg background_color] [-c columns]\n") ;
! FPRINTF(stderr, "\t[-d display] [-e progname] [-f facepath]\n") ;
! FPRINTF(stderr, "\t[-fg foreground_color] [-g geometry] [-h height]\n") ;
! FPRINTF(stderr, "\t[-i] [-iconic] [-n] [-p period] [-s spoolfile] [-t]\n") ;
! FPRINTF(stderr, "\t[-u] [-v] [-w width] [-?]\n\n") ;
! FPRINTF(stderr, "Keyboard accelerators:\n") ;
! FPRINTF(stderr, "\t^L - clear faces display.\n") ;
! FPRINTF(stderr, "\tdel - refresh faces display.\n") ;
! FPRINTF(stderr, "\tq - terminate faces display.\n") ;
! exit(1) ;
}
------- main.c -------
*** /tmp/da15170 Thu Sep 13 17:10:31 1990
--- main.c Thu Sep 13 12:40:11 1990
***************
*** 29,35 ****
#ifdef DNSLOOKUP
#include <sys/socket.h>
- #include <netdb.h>
#endif /*DNSLOOKUP*/
#ifdef NISLOOKUP
--- 29,34 ----
***************
*** 130,135 ****
--- 129,135 ----
int height ; /* Height in pixels of faces display. */
int iconheight = ICONHEIGHT ; /* Height of an individual icon. */
+ int iconpos = 0 ; /* Set if icon position given (-WP option). */
int iconwidth = ICONWIDTH ; /* Width of an individual icon. */
int iconic = 0 ; /* Faces window is closed if set. */
int imageheight = ICONHEIGHT ; /* Height of an individual face image. */
***************
*** 314,320 ****
int i ;
facepath[0] = FACEDIR ; /* Default path is single built-in directory. */
! for (i = 1; i <= MAXPATHS; i++) facepath[i] = (char *) NULL ;
STRCPY(display, "") ; /* X11 display type. */
STRCPY(geometry, "") ; /* X11 geometry information. */
--- 314,320 ----
int i ;
facepath[0] = FACEDIR ; /* Default path is single built-in directory. */
! for (i = 1; i <= MAXPATHS; i++) facepath[i] = "" ;
STRCPY(display, "") ; /* X11 display type. */
STRCPY(geometry, "") ; /* X11 geometry information. */
***************
*** 505,511 ****
IF_DEBUG( FPRINTF(stderr, "make_iconname: %s[%s] ", community, user) ; )
! for (id = 0; strlen(facepath[id]) != 0; id++)
for (iu = 0; strlen(iuser[iu]) != 0; iu++)
for (ic = 0; strlen(icomm[ic]) != 0; ic++)
for (cptr = icomm[ic]; cptr != NULL; cptr = index(cptr, '.'))
--- 505,511 ----
IF_DEBUG( FPRINTF(stderr, "make_iconname: %s[%s] ", community, user) ; )
! for (id = 0; facepath[id] && (strlen(facepath[id]) != 0); id++)
for (iu = 0; strlen(iuser[iu]) != 0; iu++)
for (ic = 0; strlen(icomm[ic]) != 0; ic++)
for (cptr = icomm[ic]; cptr != NULL; cptr = index(cptr, '.'))
------- mon.c -------
*** /tmp/da15173 Thu Sep 13 17:10:33 1990
--- mon.c Thu Sep 13 11:11:06 1990
***************
*** 169,175 ****
else make_display() ; /* Output icons and tidyup chain of records. */
return ;
}
! if (buf.st_size > lastsize) newmail = 1 ; /* New mail found. */
if (!buf.st_size) add_face(DISP_ICON, NOMAIL, "") ;
ubuf[0] = buf.st_atime ; /* Save for possible reset. */
--- 169,180 ----
else make_display() ; /* Output icons and tidyup chain of records. */
return ;
}
! if (buf.st_size > lastsize ||
! mhflag && buf.st_size < lastsize && buf.st_size != 0)
! {
! if (buf.st_size < lastsize) lastsize = 0 ;
! newmail = 1 ; /* New mail found. */
! }
if (!buf.st_size) add_face(DISP_ICON, NOMAIL, "") ;
ubuf[0] = buf.st_atime ; /* Save for possible reset. */
***************
*** 177,193 ****
if (mtype == MONNEW)
if (buf.st_size <= lastsize) /* Is the size of mail folder bigger? */
! if (mhflag && (buf.st_size < lastsize) && (buf.st_size != 0))
! {
! lastsize = 0 ; /* User uses MH. Any shrinkage means new mail. */
! newmail = 1 ;
! }
! else
! {
! lastsize = buf.st_size ; /* No: save new size and exit. */
! show_display() ;
! return ;
! }
if ((fp = fopen(spoolfile, "r")) == NULL) /* Open spoolfile. */
{
--- 182,192 ----
if (mtype == MONNEW)
if (buf.st_size <= lastsize) /* Is the size of mail folder bigger? */
! {
! lastsize = buf.st_size ; /* No: save new size and return. */
! show_display() ;
! return ;
! }
if ((fp = fopen(spoolfile, "r")) == NULL) /* Open spoolfile. */
{
------- sunview.c -------
*** /tmp/da15176 Thu Sep 13 17:10:34 1990
--- sunview.c Thu Sep 13 17:03:11 1990
***************
*** 69,75 ****
imageheight, PIX_SRC, pr[(int) dtype], 0, 0) ;
PR_ROP(pr[(int) dtype], column*imagewidth, row*imageheight,
! imagewidth, imageheight, PIX_SRC, images[(int) itype], 0, 0) ;
}
--- 69,78 ----
imageheight, PIX_SRC, pr[(int) dtype], 0, 0) ;
PR_ROP(pr[(int) dtype], column*imagewidth, row*imageheight,
! imagewidth, imageheight, PIX_CLR,
! pr[(int) dtype], column*imagewidth, row*imageheight) ;
! PR_ROP(pr[(int) dtype], column*imagewidth, row*imageheight,
! iconwidth, iconheight, PIX_SRC, images[(int) itype], 0, 0) ;
}
***************
*** 233,238 ****
--- 236,242 ----
enum disp_type dtype ;
{
pr[(int) dtype] = mem_create(width, height, 1) ;
+ PR_ROP(pr[(int) dtype], 0, 0, width, height, PIX_CLR, pr[(int) dtype], 0, 0) ;
}
------- extern.h -------
*** /tmp/da15179 Thu Sep 13 17:10:35 1990
--- extern.h Thu Sep 13 14:26:58 1990
***************
*** 60,65 ****
--- 60,66 ----
extern char revtable[] ; /* Table for reversing the bits in a byte. */
extern char spoolfile[] ; /* Full pathname of users current mail. */
extern char update_alias[] ; /* Name of mail alias for database updates. */
+ extern char *username ; /* This users name. */
extern char userprog[] ; /* User supplied program to run. */
extern int beeps ; /* Number of beeps for arrival of new mail. */
***************
*** 76,81 ****
--- 77,83 ----
extern int froms_found ; /* Set if "From " line found during processing. */
extern int height ; /* Height in pixels of faces display. */
extern int iconheight ; /* Height of an individual icon. */
+ extern int iconpos ; /* Set if icon position given (-WP option). */
extern int iconwidth ; /* Width of an individual icon. */
extern int iconic ; /* Start as an icon if set. */
extern int imageheight ; /* Height of an individual face image. */
------- patchlevel.h -------
*** /tmp/da15182 Thu Sep 13 17:10:35 1990
--- patchlevel.h Thu Sep 13 09:47:49 1990
***************
*** 14,17 ****
* reported to me then an attempt will be made to fix them.
*/
! #define PATCHLEVEL 7
--- 14,17 ----
* reported to me then an attempt will be made to fix them.
*/
! #define PATCHLEVEL 8
------- README -------
*** /tmp/da15185 Thu Sep 13 17:10:36 1990
--- README Thu Sep 13 17:00:13 1990
***************
*** 300,307 ****
Mullender, Cameron Humphries, Rick Gunderson, Rich McAllister, Hakon Lie,
John Fong, Chris Maltby, Darryl K. Ramm, Steve Piette, Tony Landells, Pat
Lashley, Dave Glowacki, Chris Steinbroner, Steven M. Miller, Bob Posert,
! Hugues Leroy, Graham Dumpleton, Michael Schmidt, Robert Adams and Rod
! Whitby for various bug reports, fixes and suggestions for improvement.
----------------------------------------------------------------------------
--- 300,308 ----
Mullender, Cameron Humphries, Rick Gunderson, Rich McAllister, Hakon Lie,
John Fong, Chris Maltby, Darryl K. Ramm, Steve Piette, Tony Landells, Pat
Lashley, Dave Glowacki, Chris Steinbroner, Steven M. Miller, Bob Posert,
! Hugues Leroy, Graham Dumpleton, Michael Schmidt, Robert Adams, Rod Whitby,
! Greg Rose, Mike Khaw, Ian Darwin, Ken Wood and Lindsay F. Marshall for
! various bug reports, fixes and suggestions for improvement.
----------------------------------------------------------------------------
------- faces.1 -------
*** /tmp/da15188 Thu Sep 13 17:10:37 1990
--- faces.1 Thu Sep 13 14:34:29 1990
***************
*** 17,22 ****
--- 17,26 ----
.I printer
]
[
+ .B \-S
+ .I spooldir
+ ]
+ [
.B \-U
]
[
***************
*** 51,56 ****
--- 55,63 ----
.I height
]
[
+ .B \-iconic
+ ]
+ [
.B \-i
]
[
***************
*** 161,166 ****
--- 168,181 ----
.B faces
will monitor the print queue.
.TP
+ .BI \-S " spooldir"
+ Specify an alternate mail spool directory. The folder that will be monitored
+ will then be
+ .BI spooldir/ username
+ where
+ .I username
+ is the name of the user currently logged in.
+ .TP
.B \-U
Automatically send mail to a special mail alias, to update the
.I faces
***************
*** 217,222 ****
--- 232,242 ----
The height of each face image in pixels. Note that this is the height of
the area allocated to each image, and not necessarily the height of the
displayed image inside.
+ .TP
+ .B \-iconic
+ Start the
+ .B faces
+ program up in iconic form.
.TP
.B \-i
Invert the faces images before displaying them. For use by people who
------- x11.c -------
*** /tmp/da15194 Thu Sep 13 17:10:39 1990
--- x11.c Thu Sep 13 16:49:19 1990
***************
*** 31,36 ****
--- 31,37 ----
#define FONT "times-roman-10"
#define FRAME_MASK (ButtonPressMask | ExposureMask | \
ButtonMotionMask | KeyPressMask)
+ #define ICON_MASK ExposureMask
Atom protocol_atom, kill_atom ;
Display *dpy ;
***************
*** 47,52 ****
--- 48,54 ----
Pixmap old_pr[2] = { NULL, NULL } ; /* Previous memory Pixmaps. */
Window frame[2] ;
Window root ;
+ XClassHint class_hint = { "faces", "Faces" } ;
XFontStruct *sfont ;
XGCValues gc_val ;
XSizeHints size ;
***************
*** 76,83 ****
XCopyArea(dpy, pr[(int) dtype], pr[(int) dtype], gc, 0, 0,
(maxcols-1)*imagewidth, imageheight, imagewidth, 0) ;
XCopyArea(dpy, images[(int) itype], pr[(int) dtype], gc, 0, 0,
! imagewidth, imageheight, column*imagewidth, row*imageheight) ;
}
--- 78,90 ----
XCopyArea(dpy, pr[(int) dtype], pr[(int) dtype], gc, 0, 0,
(maxcols-1)*imagewidth, imageheight, imagewidth, 0) ;
+ XSetFunction(dpy, gc, GXclear) ;
+ XCopyArea(dpy, pr[(int) dtype], pr[(int) dtype], gc,
+ column*imagewidth, row*imagewidth, imagewidth, imageheight,
+ column*imagewidth, row*imagewidth) ;
+ XSetFunction(dpy, gc, GXcopy) ;
XCopyArea(dpy, images[(int) itype], pr[(int) dtype], gc, 0, 0,
! iconwidth, iconwidth, column*imagewidth, row*imageheight) ;
}
***************
*** 158,164 ****
XCopyArea(dpy, pr[(int) wdtype], frame[F_WINDOW], gc, 0, 0,
(unsigned int) width, (unsigned int) height, 0, 0) ;
XCopyArea(dpy, pr[(int) DISP_ICON], frame[F_ICON], gc, 0, 0,
! (unsigned int) width, (unsigned int) height, 0, 0) ;
}
--- 165,171 ----
XCopyArea(dpy, pr[(int) wdtype], frame[F_WINDOW], gc, 0, 0,
(unsigned int) width, (unsigned int) height, 0, 0) ;
XCopyArea(dpy, pr[(int) DISP_ICON], frame[F_ICON], gc, 0, 0,
! (unsigned int) imagewidth, (unsigned int) imageheight, 0, 0) ;
}
***************
*** 225,231 ****
depth = DefaultDepth(dpy, screen) ;
init_font() ;
-
gc_mask = GCFont | GCForeground | GCBackground | GCGraphicsExposures ;
gc_val.font = sfont->fid ;
gc_val.foreground = foregnd ;
--- 232,237 ----
***************
*** 232,238 ****
gc_val.background = backgnd ;
gc_val.graphics_exposures = False ;
gc = XCreateGC(dpy, root, gc_mask, &gc_val) ;
!
tilegc = XCreateGC(dpy, root, gc_mask, &gc_val) ;
if (depth == 1) XSetFillStyle(dpy, tilegc, FillOpaqueStippled) ;
else XSetFillStyle(dpy, tilegc, FillTiled) ;
--- 238,244 ----
gc_val.background = backgnd ;
gc_val.graphics_exposures = False ;
gc = XCreateGC(dpy, root, gc_mask, &gc_val) ;
!
tilegc = XCreateGC(dpy, root, gc_mask, &gc_val) ;
if (depth == 1) XSetFillStyle(dpy, tilegc, FillOpaqueStippled) ;
else XSetFillStyle(dpy, tilegc, FillTiled) ;
***************
*** 260,278 ****
/*ARGSUSED*/
- static Bool
- is_exposed(dpy, ev, window) /* Return True if window is being exposed */
- Display *dpy ;
- XEvent *ev ;
- char *window ;
- {
- if (ev->type == Expose && *((Window *) window) == ev->xkey.window)
- return True ;
- return False ;
- }
-
-
- /*ARGSUSED*/
load_icon(itype, sbuf, not_flipped)
enum icon_type itype ;
unsigned short sbuf[256] ;
--- 266,271 ----
***************
*** 298,305 ****
{
pr[(int) dtype] = XCreatePixmap(dpy, root,
(unsigned int) width, (unsigned int) height, depth) ;
! XSetFunction(dpy, gc, GXandInverted) ;
! XFillRectangle(dpy, pr[(int) dtype], gc, 0, 0, width, height) ;
XSetFunction(dpy, gc, GXcopy) ;
}
--- 291,300 ----
{
pr[(int) dtype] = XCreatePixmap(dpy, root,
(unsigned int) width, (unsigned int) height, depth) ;
! XSetFunction(dpy, gc, GXclear) ;
! XCopyArea(dpy, pr[(int) dtype], pr[(int) dtype], gc,
! column*imagewidth, row*imagewidth, imagewidth, imageheight,
! column*imagewidth, row*imagewidth) ;
XSetFunction(dpy, gc, GXcopy) ;
}
***************
*** 346,361 ****
}
}
! #ifdef WANTED
! frame[F_WINDOW] = XCreateSimpleWindow(dpy, root,
! size.x, size.y, size.width, size.height,
! FACES_BORDER_WIDTH, foregnd, backgnd) ;
! frame[F_ICON] = XCreateSimpleWindow(dpy, root,
! ix, iy, imagewidth, imageheight,
! FACES_BORDER_WIDTH, foregnd, backgnd) ;
! #endif /*WANTED*/
!
winattrs.background_pixel = backgnd ;
winattrs.border_pixel = foregnd ;
winattrs.event_mask = FRAME_MASK ;
--- 341,353 ----
}
}
! if (!iconpos)
! {
! ix = size.x + size.width - imagewidth ;
! iy = size.y ;
! }
! bzero((char *) &winattrs, sizeof(winattrs)) ;
winattrs.background_pixel = backgnd ;
winattrs.border_pixel = foregnd ;
winattrs.event_mask = FRAME_MASK ;
***************
*** 365,370 ****
--- 357,364 ----
CopyFromParent, InputOutput, CopyFromParent,
CWBackPixel | CWBorderPixel | CWEventMask, &winattrs) ;
+ winattrs.event_mask = ICON_MASK ;
+
frame[F_ICON] = XCreateWindow(dpy, root,
ix, iy, imagewidth, imageheight, FACES_BORDER_WIDTH,
CopyFromParent, InputOutput, CopyFromParent,
***************
*** 388,395 ****
wm_hints.flags |= StateHint ;
}
XSetWMHints(dpy, frame[F_WINDOW], &wm_hints) ;
- /** XSetWMHints(dpy, frame[F_ICON], &wm_hints) ; **/
/* Equivalent of make_icon. */
if (mtype == MONPRINTER) adjust_image(DISP_ICON, NOPRINT, 0, 0) ;
--- 382,392 ----
wm_hints.flags |= StateHint ;
}
XSetWMHints(dpy, frame[F_WINDOW], &wm_hints) ;
+ /* Set XA_WM_CLASS so things that depend on NAME work. */
+
+ XSetClassHint(dpy, frame[F_WINDOW], &class_hint) ;
+
/* Equivalent of make_icon. */
if (mtype == MONPRINTER) adjust_image(DISP_ICON, NOPRINT, 0, 0) ;
***************
*** 401,406 ****
--- 398,424 ----
{}
+ process_expose(event)
+ XExposeEvent *event ;
+ {
+ int doframe, doicon ;
+
+ doframe = doicon = 0 ;
+ do
+ {
+ if (event->count == 0)
+ {
+ if (event->window == frame[F_WINDOW]) doframe++ ;
+ else if (event->window == frame[F_ICON]) doicon++ ;
+ }
+ }
+ while (XCheckMaskEvent(dpy, ExposureMask, event)) ;
+
+ if (doframe) draw_screen(wdtype) ;
+ if (doicon) draw_screen(wdtype) ;
+ }
+
+
repl_image(dtype, dest, width, height)
enum disp_type dtype ;
enum image_type dest ;
***************
*** 433,440 ****
{
XSelectInput(dpy, frame[F_WINDOW], FRAME_MASK) ;
XMapWindow(dpy, frame[F_WINDOW]) ;
- XSync(dpy, 0) ;
- XPeekIfEvent(dpy, &ev, is_exposed, (char *) &frame[F_WINDOW]) ;
first_time = 0 ;
}
--- 451,456 ----
***************
*** 488,494 ****
#endif /*SYSV32*/
do
{
! XNextEvent(dpy, &event) ;
/* ClientMessage: (catch ICCCM kill from WM). */
--- 504,511 ----
#endif /*SYSV32*/
do
{
! if (!XCheckMaskEvent(dpy, ExposureMask, &event))
! XNextEvent(dpy, &event) ;
/* ClientMessage: (catch ICCCM kill from WM). */
***************
*** 502,512 ****
/* Expose. */
! else if (event.type == Expose && event.xexpose.count == 0)
! {
! while (XCheckTypedEvent(dpy, Expose, &event)) /* do nothing. */ ;
! draw_screen(wdtype) ;
! }
/* ButtonPress. */
--- 519,525 ----
/* Expose. */
! else if (event.type == Expose) process_expose(&event) ;
/* ButtonPress. */
------- TODO -------
*** /tmp/da15197 Thu Sep 13 17:10:40 1990
--- TODO Thu Sep 13 17:09:39 1990
***************
*** 106,146 ****
determine at run-time whether the NeWS operations are available, or
whether to stick to XView/X11 mechanisms.
! 21/ From Steven M. Miller <miller at SCTC.COM>
! I would like to use -iconic to specify iconic mode for X. This would
! require change -i to -I for inverse in get.c and having -i to set iconic=1.
!
! 22/ From Steven M. Miller <miller at SCTC.COM>
! Under X, when faces is started up in iconic mode nothing is displayed in
! the icon until the icon is clicked on and opened and then closed again.
!
! 23/ From Kee Hinckley <nazgul at alphalpha.com>
Any possibility of changing that header to an RFC1154 (I think that's
the number) conformant form? Namely an encoding field in the
header (presumbably with a new name for the faces format, or using
one of the existing ones (G3Fax uuencode would probably be good)).
! 24/ From Michael Schmidt <michael at uni-paderborn.de>
! Perhaps my configuration (SparcStation, SunOS4.0.3, X11R4, twm with
! ForceIcons, IconManager and IconRegion) is wierd, but... The icon is
! not placed in the IconRegion, but just at 0x0 (or 1x1, or so). Then I
! cannot deiconify the icon by a mouse click (all other icons deiconify
! on a left button click).
!
! 25/ Get the SunView, XView and NeWS drivers to use the -bg and -fg color
options.
! 26/ From Ken Wood <kwood at adl.austek.oz.au>
! Sometimes the display gets stuck while changing from "No mail" to a
! single face or vice-versa. xfaces just displays a plain grey window.
!
! 27/ From Ken Wood <kwood at adl.austek.oz.au>
! Quite often, users who don't have a face file are shown as "unknown"
! with the unknown face, rather than putting the username with the unknown
! face.
!
! 28/ From Ken Wood <kwood at adl.austek.oz.au>
Do you have any plans to get xfaces to read geometry etc from the
database ?
! 29/ Optimise.
--- 106,125 ----
determine at run-time whether the NeWS operations are available, or
whether to stick to XView/X11 mechanisms.
! 21/ From Kee Hinckley <nazgul at alphalpha.com>
Any possibility of changing that header to an RFC1154 (I think that's
the number) conformant form? Namely an encoding field in the
header (presumbably with a new name for the faces format, or using
one of the existing ones (G3Fax uuencode would probably be good)).
! 22/ Get the SunView, XView and NeWS drivers to use the -bg and -fg color
options.
! 23/ From Ken Wood <kwood at adl.austek.oz.au>
Do you have any plans to get xfaces to read geometry etc from the
database ?
! 24/ When the -w and/or -h options are used with the SunView version, the
! size of the icon created is incorrect.
!
! 25/ Optimise.
------- xview.c -------
*** /tmp/da15200 Thu Sep 13 17:10:40 1990
--- xview.c Thu Sep 13 16:31:27 1990
***************
*** 73,78 ****
--- 73,83 ----
XCopyArea(dpy, pr[(int) dtype], pr[(int) dtype], gc, 0, 0,
(maxcols-1)*imagewidth, imageheight, imagewidth, 0) ;
+ XSetFunction(dpy, gc, GXclear) ;
+ XCopyArea(dpy, pr[(int) dtype], pr[(int) dtype], gc,
+ column*imagewidth, row*imagewidth, imagewidth, imageheight,
+ column*imagewidth, row*imagewidth) ;
+ XSetFunction(dpy, gc, GXcopy) ;
XCopyArea(dpy, images[(int) itype], pr[(int) dtype], gc, 0, 0,
imagewidth, imageheight, column*imagewidth, row*imageheight) ;
}
***************
*** 276,283 ****
{
pr[(int) dtype] = XCreatePixmap(dpy, root, (unsigned int) width,
(unsigned int) height, depth) ;
! XSetFunction(dpy, gc, GXandInverted) ;
! XFillRectangle(dpy, pr[(int) dtype], gc, 0, 0, width, height) ;
XSetFunction(dpy, gc, GXcopy) ;
}
--- 281,290 ----
{
pr[(int) dtype] = XCreatePixmap(dpy, root, (unsigned int) width,
(unsigned int) height, depth) ;
! XSetFunction(dpy, gc, GXclear) ;
! XCopyArea(dpy, pr[(int) dtype], pr[(int) dtype], gc,
! column*imagewidth, row*imagewidth, imagewidth, imageheight,
! column*imagewidth, row*imagewidth) ;
XSetFunction(dpy, gc, GXcopy) ;
}
------- CHANGES -------
*** /tmp/da15203 Thu Sep 13 17:10:41 1990
--- CHANGES Thu Sep 13 14:41:35 1990
***************
*** 288,290 ****
--- 288,349 ----
being followed by a line starting with the word "X-Face ". Faces now
searches for "X-Face:" rather than "X-Face". This really needs to be
tightened up some more.
+
+ v1.4 - patchlevel 8 - 13th September 1990.
+
+ * From Mike Khaw <khaw at parcplace.com>
+ From Rod Whitby <rwhitby at austek.oz.au>
+ From John Pritchard <john at latcs1.lat.oz.au>
+ faces v1.4.7 dumps core in make_iconname(). It's doing an strlen
+ on facepath[i] when it could be NULL. This is probably caused
+ when your FACEDIR directory doesn't have a misc./unknown subtree.
+
+ * From Ian Darwin <ian at sq.com>
+ The x11 driver does not set XA_WM_CLASS, so things that depend
+ on CLASS to operate won't operate properly.
+
+ * From Greg Rose <greg at softway.sw.oz.au>
+ From Ken Wood <adl.austek.oz.au>
+ faces with both the -MH and -a options together didn't work
+ correctly.
+
+ * The -v command line option now displays the usage message and exit.
+ The new -? command line option is similar. The usage message is now
+ upto date and also lists the keyboard accelerators.
+
+ * From John Pritchard <john at latcs1.lat.oz.au>
+ The file netdb.h was included twice if DNSLOOKUP is defined.
+
+ * From Chris Maltby <chris at softway.sw.oz.au>
+ The window attributes structure with the X11 driver is now zeroised
+ before being used.
+
+ * From Chris Maltby <chris at softway.sw.oz.au>
+ With the X11 driver, if the icon position hasn't been specified
+ with the -WP option, then the position defaults to the where the
+ right end of the open window would appear.
+
+ * From Steven M. Miller <miller at SCTC.COM>
+ Under X, when faces is started up in iconic mode nothing is displayed
+ in the icon until the icon is clicked on and opened and then closed
+ again.
+
+ * From Michael Schmidt <michael at uni-paderborn.de>
+ Perhaps my configuration (SparcStation, SunOS4.0.3, X11R4, twm with
+ ForceIcons, IconManager and IconRegion) is wierd, but... The icon is
+ not placed in the IconRegion, but just at 0x0 (or 1x1, or so). Then I
+ cannot deiconify the icon by a mouse click (all other icons deiconify
+ on a left button click).
+
+ * From Steven M. Miller <miller at SCTC.COM>
+ faces now recognises -iconic (as well as -Wi) to specify iconic mode.
+ Inverse mode is still -i. The manual page has been updated.
+
+ * From Ian Darwin <ian at sq.com>
+ faces uses -s <spoolfile> to indicate a different spool file to
+ monitor. How about a -S <spooldir> to indicate a different spool
+ directory? The manual page has been updated.
+
+ * From Lindsay F. Marshall <Lindsay.Marshall%newcastle.ac.uk at munnari.oz>
+ faces works incorrectly when either the -h <height> or the -w <width>
+ options are given. The image area is not being cleared first.
More information about the Comp.sources.misc
mailing list