minor fixes; hide some routines

This commit is contained in:
rsc 2005-01-04 22:20:14 +00:00
parent ba3de38060
commit 1818ce0f28
6 changed files with 10 additions and 10 deletions

View file

@ -13,8 +13,6 @@
#define NHASH (1<<5) #define NHASH (1<<5)
#define HASHMASK (NHASH-1) #define HASHMASK (NHASH-1)
extern void flushmemscreen(Rectangle);
typedef struct Client Client; typedef struct Client Client;
typedef struct Draw Draw; typedef struct Draw Draw;
typedef struct DImage DImage; typedef struct DImage DImage;
@ -257,7 +255,7 @@ addflush(Rectangle r)
} }
/* emit current state */ /* emit current state */
if(flushrect.min.x < flushrect.max.x) if(flushrect.min.x < flushrect.max.x)
flushmemscreen(flushrect); _flushmemscreen(flushrect);
flushrect = r; flushrect = r;
waste = 0; waste = 0;
} }
@ -294,7 +292,7 @@ void
drawflush(void) drawflush(void)
{ {
if(flushrect.min.x < flushrect.max.x) if(flushrect.min.x < flushrect.max.x)
flushmemscreen(flushrect); _flushmemscreen(flushrect);
flushrect = Rect(10000, 10000, -10000, -10000); flushrect = Rect(10000, 10000, -10000, -10000);
} }

View file

@ -53,6 +53,8 @@ eread(ulong keys, Event *e)
} }
} }
xmask |= EnterWindowMask|LeaveWindowMask;
XSelectInput(_x.display, _x.drawable, xmask); XSelectInput(_x.display, _x.drawable, xmask);
again: again:
XWindowEvent(_x.display, _x.drawable, xmask, &xevent); XWindowEvent(_x.display, _x.drawable, xmask, &xevent);

View file

@ -359,7 +359,7 @@ xattach(char *label)
geom = smprint("%s.geometry", label); geom = smprint("%s.geometry", label);
if(geom && XrmGetResource(database, geom, nil, &geomrestype, &geomres)) if(geom && XrmGetResource(database, geom, nil, &geomrestype, &geomres))
mask = XParseGeometry(geomres.addr, &x, &y, &width, &height); mask = XParseGeometry(geomres.addr, &x, &y, (uint*)&width, (uint*)&height);
free(geom); free(geom);
if((mask & WidthValue) && (mask & HeightValue)){ if((mask & WidthValue) && (mask & HeightValue)){
@ -552,7 +552,7 @@ fprint(2, "%r\n");
} }
int int
drawsetlabel(Display *d, char *label) drawsetlabel(char *label)
{ {
char *argv[2]; char *argv[2];
XClassHint classhint; XClassHint classhint;
@ -775,7 +775,7 @@ setupcmap(XWindow w)
} }
void void
flushmemscreen(Rectangle r) _flushmemscreen(Rectangle r)
{ {
if(_x.nextscreenpm != _x.screenpm){ if(_x.nextscreenpm != _x.screenpm){
qlock(&_x.screenlock); qlock(&_x.screenlock);

View file

@ -103,7 +103,7 @@ __xtoplan9kbd(XEvent *e)
break; break;
default: /* not ISO-1 or tty control */ default: /* not ISO-1 or tty control */
if(k>0xff) { if(k>0xff) {
k = keysym2ucs(k); k = _p9keysym2ucs(k);
if(k==-1) return -1; if(k==-1) return -1;
} }
} }

View file

@ -824,7 +824,7 @@ static struct codepair {
}; };
VISIBLE VISIBLE
long keysym2ucs(KeySym keysym) long _p9keysym2ucs(KeySym keysym)
{ {
int min = 0; int min = 0;
int max = sizeof(keysymtab) / sizeof(struct codepair) - 1; int max = sizeof(keysymtab) / sizeof(struct codepair) - 1;

View file

@ -6,4 +6,4 @@
#include <X11/X.h> #include <X11/X.h>
long keysym2ucs(KeySym keysym); long _p9keysym2ucs(KeySym keysym);