5 |
|
/* Copyright (c) 1989 Regents of the University of California */ |
6 |
|
|
7 |
|
/* |
8 |
< |
* x11.c - driver for X-windows version 11R4 |
8 |
> |
* x11.c - driver for X-windows version 10.4 |
9 |
|
* |
10 |
|
* 1989 |
11 |
|
*/ |
17 |
|
#include <X11/Xlib.h> |
18 |
|
#include <X11/cursorfont.h> |
19 |
|
#include <X11/Xutil.h> |
20 |
– |
#ifdef notdef |
21 |
– |
#include "bcross.cursor" |
22 |
– |
#include "bcross_mask.cu" |
23 |
– |
#endif |
20 |
|
|
21 |
|
#include "color.h" |
26 |
– |
|
22 |
|
#include "driver.h" |
28 |
– |
|
23 |
|
#include "x11twind.h" |
24 |
|
|
25 |
|
#define GAMMA 2.2 /* exponent for color correction */ |
26 |
|
|
27 |
|
#define BORWIDTH 5 /* border width */ |
34 |
– |
#define BARHEIGHT 25 /* menu bar size */ |
28 |
|
#define COMHEIGHT (COMLH*COMCH) /* command line height (pixels) */ |
29 |
|
|
30 |
|
#define COMFN "8x13" /* command line font name */ |
73 |
|
|
74 |
|
static struct driver x11_driver = { |
75 |
|
x11_close, x11_clear, x11_paintr, x11_getcur, |
76 |
< |
x11_comout, x11_comin, |
84 |
< |
MAXRES, MAXRES |
76 |
> |
x11_comout, x11_comin, 1.0 |
77 |
|
}; |
78 |
|
|
79 |
|
|
116 |
|
pickcursor = XCreateFontCursor (ourdisplay, XC_diamond_cross); |
117 |
|
/* new */ |
118 |
|
clientname = id; |
119 |
+ |
x11_driver.xsiz = DisplayWidth(ourdisplay,DefaultScreen(ourdisplay)) |
120 |
+ |
- 2*BORWIDTH; |
121 |
+ |
x11_driver.ysiz = DisplayHeight(ourdisplay,DefaultScreen(ourdisplay)) |
122 |
+ |
- (COMHEIGHT + 2*BORWIDTH); |
123 |
|
x11_driver.inpready = 0; |
124 |
|
cmdvec = x11_comout; /* set error vectors */ |
125 |
|
if (wrnvec != NULL) |
196 |
|
goto fail; |
197 |
|
gwidth = xres; |
198 |
|
gheight = yres; |
203 |
– |
XFlush(ourdisplay); |
204 |
– |
sleep(10); |
199 |
|
} else /* just clear */ |
200 |
|
XClearWindow(ourdisplay, gwind); |
201 |
|
/* reinitialize color table */ |