freebsd-ports/mail/faces/files/patch-ag
Lars Koeller b24ad43f2c - Respect PREFIX and X11BASE which wasn't done in some binaries and scripts
- Fix problem with gcc 2.95 (add -fwritable-strings)
  - Fix problem with display depth when printing username below icon
    (white text on white background ;-)
  - Add some documentation (READMEs) with respect to NOPORTDOCS
  - Define of USE_NAS environment variable builds faces with
    NAS (auplay) support (default is rplay)
  - Correct pkg-plist
  - Shorten pkg-desc below 24 lines
  - Bump PORTREVISION to 1

Changes were stimulated by:  Mike Meyer <mwm@mired.org>
2001-02-26 20:49:01 +00:00

123 lines
4.5 KiB
Text

*** x11.c.orig Tue Nov 19 05:00:50 1991
--- x11.c Mon Feb 26 21:29:24 2001
***************
*** 58,64 ****
#define F_ICON 0 /* Icon index to frame array. */
#define F_WINDOW 1 /* Window index to frame array. */
- #define FACES_BORDER_WIDTH 2
#define FRAME_MASK (ButtonPressMask | ExposureMask | \
ButtonMotionMask | KeyPressMask)
#define ICON_MASK ExposureMask
--- 58,63 ----
***************
*** 364,374 ****
init_font() ;
gc_mask = GCFont | GCForeground | GCBackground | GCGraphicsExposures ;
gc_val.font = sfont->fid ;
! gc_val.foreground = foregnd ;
! 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) ;
--- 363,375 ----
init_font() ;
gc_mask = GCFont | GCForeground | GCBackground | GCGraphicsExposures ;
gc_val.font = sfont->fid ;
! gc_val.foreground = BlackPixel(dpy, screen) ;
! gc_val.background = WhitePixel(dpy, screen) ;
gc_val.graphics_exposures = False ;
gc = XCreateGC(dpy, root, gc_mask, &gc_val) ;
+ gc_val.foreground = foregnd ;
+ gc_val.background = backgnd ;
tilegc = XCreateGC(dpy, root, gc_mask, &gc_val) ;
if (depth == 1) XSetFillStyle(dpy, tilegc, FillOpaqueStippled) ;
else XSetFillStyle(dpy, tilegc, FillTiled) ;
***************
*** 459,465 ****
--- 460,470 ----
home = getenv("HOME") ;
XrmInitialize() ;
+ #ifdef __FreeBSD__
+ STRCPY(name, "/usr/X11R6/lib/X11/app-defaults/Faces") ;
+ #else
STRCPY(name, "/usr/lib/X11/app-defaults/Faces") ;
+ #endif
/* Get applications defaults file, if any. */
***************
*** 576,589 ****
winattrs.event_mask = FRAME_MASK ;
frame[F_WINDOW] = XCreateWindow(dpy, root, size.x, size.y,
! size.width, size.height, FACES_BORDER_WIDTH,
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,
CWBackPixel | CWBorderPixel | CWEventMask, &winattrs) ;
--- 581,594 ----
winattrs.event_mask = FRAME_MASK ;
frame[F_WINDOW] = XCreateWindow(dpy, root, size.x, size.y,
! size.width, size.height, border_width,
CopyFromParent, InputOutput, CopyFromParent,
CWBackPixel | CWBorderPixel | CWEventMask, &winattrs) ;
winattrs.event_mask = ICON_MASK ;
frame[F_ICON] = XCreateWindow(dpy, root,
! ix, iy, imagewidth, imageheight, border_width,
CopyFromParent, InputOutput, CopyFromParent,
CWBackPixel | CWBorderPixel | CWEventMask, &winattrs) ;
***************
*** 818,823 ****
--- 823,830 ----
int c, r ; /* Column and row position for this face. */
int x, y ; /* Position of start of this text string. */
int textwidth ;
+ Colormap cmap ;
+ XColor selcolor ;
c = column ;
r = row ;
***************
*** 852,861 ****
case RIGHT : x = (c + 1) * imagewidth - textwidth - 2 ;
y = (r + 1) * imageheight - 5 ;
}
! XSetFunction(dpy, gc, GXandInverted) ;
XFillRectangle(dpy, pr[(int) dtype], gc, x, y-9,
(unsigned int) textwidth+2, 13) ;
! XSetFunction(dpy, gc, GXxor) ;
XDrawImageString(dpy, pr[(int) dtype], gc, x, y, str, len) ;
XSetFunction(dpy, gc, GXcopy) ;
}
--- 859,873 ----
case RIGHT : x = (c + 1) * imagewidth - textwidth - 2 ;
y = (r + 1) * imageheight - 5 ;
}
! XSetForeground(dpy, gc, WhitePixel(dpy, screen));
! XSetFunction(dpy, gc, GXcopy) ;
XFillRectangle(dpy, pr[(int) dtype], gc, x, y-9,
(unsigned int) textwidth+2, 13) ;
! XSetFunction(dpy, gc, GXcopy) ;
! cmap = DefaultColormap(dpy, screen);
! XParseColor(dpy, cmap, "red", &selcolor);
! XAllocColor(dpy, cmap, &selcolor) ;
! XSetForeground(dpy, gc, selcolor.pixel );
XDrawImageString(dpy, pr[(int) dtype], gc, x, y, str, len) ;
XSetFunction(dpy, gc, GXcopy) ;
}