wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 1a7e3b2cd4bede3423ef08741f7035cdf462ce01
parent bad686d92e2eb10559846ce9040d0a82b12b644d
Author: Kris Maglione <jg@suckless.org>
Date:   Tue,  4 Aug 2009 11:58:52 -0400

Fix compile error caused by last commit.

Diffstat:
cmd/menu/event.c | 10+++++-----
cmd/wmii/x11.c | 3++-
cmd/wmii/xext.c | 1+
cmd/wmii9menu.c | 4++--
include/x11.h | 1+
5 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/cmd/menu/event.c b/cmd/menu/event.c @@ -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); diff --git a/cmd/wmii/x11.c b/cmd/wmii/x11.c @@ -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; diff --git a/cmd/wmii/xext.c b/cmd/wmii/xext.c @@ -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); diff --git a/cmd/wmii9menu.c b/cmd/wmii9menu.c @@ -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); } diff --git a/include/x11.h b/include/x11.h @@ -159,6 +159,7 @@ struct Screen { GC gc; Colormap colormap; Visual* visual; + Visual* visual32; Rectangle rect; int depth; int fd;