[hackers] [wmii] Fix compile error caused by last commit. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Tue, 4 Aug 2009 15:58:59 +0000 (UTC)

changeset: 2477:9f76be0c1854
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Tue Aug 04 11:58:52 2009 -0400
files: cmd/menu/event.c cmd/wmii/x11.c cmd/wmii/xext.c cmd/wmii9menu.c include/x11.h
description:
Fix compile error caused by last commit.

diff -r 61414254ec59 -r 9f76be0c1854 cmd/menu/event.c
--- a/cmd/menu/event.c Mon Aug 03 20:04:05 2009 -0400
+++ b/cmd/menu/event.c Tue Aug 04 11:58:52 2009 -0400
@@ -24,7 +24,7 @@
         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 @@
 
         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 @@
 
         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 @@
                 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 @@
 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 -r 61414254ec59 -r 9f76be0c1854 cmd/wmii/x11.c
--- a/cmd/wmii/x11.c Mon Aug 03 20:04:05 2009 -0400
+++ b/cmd/wmii/x11.c Tue Aug 04 11:58:52 2009 -0400
@@ -165,6 +165,7 @@
         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 @@
         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 -r 61414254ec59 -r 9f76be0c1854 cmd/wmii/xext.c
--- a/cmd/wmii/xext.c Mon Aug 03 20:04:05 2009 -0400
+++ b/cmd/wmii/xext.c Tue Aug 04 11:58:52 2009 -0400
@@ -102,6 +102,7 @@
         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 -r 61414254ec59 -r 9f76be0c1854 cmd/wmii9menu.c
--- a/cmd/wmii9menu.c Mon Aug 03 20:04:05 2009 -0400
+++ b/cmd/wmii9menu.c Tue Aug 04 11:58:52 2009 -0400
@@ -239,7 +239,7 @@
         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 @@
 
         reshapewin(menuwin, rectaddpt(r, p));
 
- //XSetWindowBackground(display, menuwin->w, cnorm.bg);
+ //XSetWindowBackground(display, menuwin->xid, cnorm.bg);
         setborder(menuwin, 1, cnorm.border);
 }
 
diff -r 61414254ec59 -r 9f76be0c1854 include/x11.h
--- a/include/x11.h Mon Aug 03 20:04:05 2009 -0400
+++ b/include/x11.h Tue Aug 04 11:58:52 2009 -0400
@@ -159,6 +159,7 @@
         GC gc;
         Colormap colormap;
         Visual* visual;
+ Visual* visual32;
         Rectangle rect;
         int depth;
         int fd;
Received on Tue Aug 04 2009 - 15:58:59 UTC

This archive was generated by hypermail 2.2.0 : Sun Aug 16 2009 - 14:18:55 UTC