summaryrefslogtreecommitdiff
path: root/mail/faces/patches/patch-at
blob: 75ce7992ddf67b7a7b1559b5514d14778ac8f641 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
$NetBSD: patch-at,v 1.2 1999/10/01 07:49:21 simonb Exp $

diff -ur ../faces-DIST/x11.c ./x11.c
--- ../faces-DIST/x11.c	Tue Nov 19 15:00:50 1991
+++ ./x11.c	Fri Oct  1 14:32:03 1999
@@ -18,10 +18,10 @@
  
 #include <stdio.h>
 #include <ctype.h>
-#if ( !defined(mips) && !defined(TOPIX) ) || defined(ultrix)
+#include <sys/param.h>
+#if ( !defined(mips) && !defined(TOPIX) ) || defined(ultrix) || (defined(BSD) && BSD >= 199306)
 #include <sys/types.h>
 #include <sys/time.h>
-#include <sys/param.h>
 #else
 #ifdef SYSTYPE_BSD43
 #include <sys/types.h>
@@ -30,15 +30,16 @@
 #ifndef TOPIX
 #include <bsd/sys/types.h>
 #include <bsd/sys/time.h>
-#include <sys/param.h>
 #else
 #include <sys/bsd_time.h>
 #endif /*TOPIX*/
 #endif /*SYSTYPE_BSD43*/
-#endif /*( !defined(mips) && !defined(TOPIX) ) || defined(ultrix)*/
+#endif /*( !defined(mips) && !defined(TOPIX) ) || defined(ultrix) || (defined(BSD) && BSD >= 199306) */
 #include "faces.h"
 #include "extern.h"
 
+#include <sys/param.h>
+
 #ifdef HASPOLL
 #include <poll.h>
 #endif /*HASPOLL*/
@@ -58,7 +59,6 @@
 
 #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
@@ -364,11 +364,13 @@
   init_font() ;
   gc_mask = GCFont | GCForeground | GCBackground | GCGraphicsExposures ;
   gc_val.font = sfont->fid ;
-  gc_val.foreground = foregnd ;
-  gc_val.background = backgnd ;
+  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,7 +461,11 @@
 
   home = getenv("HOME") ;
   XrmInitialize() ;
+#if (defined(BSD) && BSD >= 199306)
+  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,14 +582,14 @@
   winattrs.event_mask = FRAME_MASK ;
 
   frame[F_WINDOW] = XCreateWindow(dpy, root, size.x, size.y,
-                        size.width, size.height, FACES_BORDER_WIDTH,
+                        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, FACES_BORDER_WIDTH,
+                        ix, iy, imagewidth, imageheight, border_width,
                         CopyFromParent, InputOutput, CopyFromParent, 
                         CWBackPixel | CWBorderPixel | CWEventMask, &winattrs) ;
 
@@ -856,6 +862,7 @@
   XFillRectangle(dpy, pr[(int) dtype], gc, x, y-9,
                  (unsigned int) textwidth+2, 13) ;
   XSetFunction(dpy, gc, GXxor) ;
+  XSetForeground(dpy, gc, WhitePixel(dpy, screen));
   XDrawImageString(dpy, pr[(int) dtype], gc, x, y, str, len) ;
   XSetFunction(dpy, gc, GXcopy) ;
 }