Fix compile error caused by last commit.

This commit is contained in:
Kris Maglione 2009-08-04 11:58:52 -04:00
parent bad686d92e
commit 1a7e3b2cd4
5 changed files with 11 additions and 8 deletions

View File

@ -24,7 +24,7 @@ findtime(Display *d, XEvent *e, XPointer v) {
Window *w;
w = (Window*)v;
if(e->type == PropertyNotify && e->xproperty.window == w->w) {
if(e->type == PropertyNotify && e->xproperty.window == w->xid) {
xtime = e->xproperty.time;
return true;
}
@ -164,7 +164,7 @@ enternotify(XCrossingEvent *ev) {
if((w = findwin(ev->window)))
handle(w, enter, ev);
else if(ev->window == scr.root.w)
else if(ev->window == scr.root.xid)
sel_screen = true;
}
@ -173,7 +173,7 @@ leavenotify(XCrossingEvent *ev) {
xtime = ev->time;
#if 0
if((ev->window == scr.root.w) && !ev->same_screen)
if((ev->window == scr.root.xid) && !ev->same_screen)
sel_screen = true;
#endif
}
@ -201,7 +201,7 @@ focusin(XFocusChangeEvent *ev) {
handle(w, focusin, ev);
#if 0
else if(ev->mode == NotifyGrab) {
if(ev->window == scr.root.w)
if(ev->window == scr.root.xid)
screen->hasgrab = &c_root;
/* Some unmanaged window has grabbed focus */
else if((c = screen->focus)) {
@ -295,7 +295,7 @@ static void
unmapnotify(XUnmapEvent *ev) {
Window *w;
if((w = findwin(ev->window)) && (ev->event == w->parent->w)) {
if((w = findwin(ev->window)) && (ev->event == w->parent->xid)) {
w->mapped = false;
if(ev->send_event || w->unmapped-- == 0)
handle(w, unmap, ev);

View File

@ -165,6 +165,7 @@ initdisplay(void) {
scr.screen = DefaultScreen(display);
scr.colormap = DefaultColormap(display, scr.screen);
scr.visual = DefaultVisual(display, scr.screen);
scr.visual32 = DefaultVisual(display, scr.screen);
scr.gc = DefaultGC(display, scr.screen);
scr.depth = DefaultDepth(display, scr.screen);
@ -242,7 +243,7 @@ allocimage(int w, int h, int depth) {
img->colormap = scr.colormap;
img->visual = scr.visual;
if(depth == 32)
img->visual = render_visual;
img->visual = scr.visual32;
img->depth = depth;
img->r = Rect(0, 0, w, h);
return img;

View File

@ -102,6 +102,7 @@ render_init(void) {
for(i=0; i < n; i++)
if(render_argb_p(vip[i].visual)) {
render_visual = vip[i].visual;
scr.visual32 = render_visual;
break;
}
XFree(vip);

View File

@ -239,7 +239,7 @@ create_window(void)
XMaskEvent(display, StructureNotifyMask, &e);
if(!grabpointer(menuwin, nil, 0, MouseMask))
fatal("Failed to grab the mouse\n");
XSetCommand(display, menuwin->w, g_argv, g_argc);
XSetCommand(display, menuwin->xid, g_argv, g_argc);
}
void
@ -267,7 +267,7 @@ size_window(int wide, int high)
reshapewin(menuwin, rectaddpt(r, p));
//XSetWindowBackground(display, menuwin->w, cnorm.bg);
//XSetWindowBackground(display, menuwin->xid, cnorm.bg);
setborder(menuwin, 1, cnorm.border);
}

View File

@ -159,6 +159,7 @@ struct Screen {
GC gc;
Colormap colormap;
Visual* visual;
Visual* visual32;
Rectangle rect;
int depth;
int fd;