From 25295081227d2ba79b02cd804efb8da7f75349d0 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Tue, 26 Jun 2007 14:16:22 -0400 Subject: [PATCH] Fix for 64bit archs again. --- cmd/wmii/client.c | 4 ++-- cmd/wmii/x11.h | 5 +++-- debian/rules | 2 +- rc/sh.wmii | 7 +++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/wmii/client.c b/cmd/wmii/client.c index 175d7f1d..85dbf4bf 100644 --- a/cmd/wmii/client.c +++ b/cmd/wmii/client.c @@ -268,7 +268,7 @@ frame_hints(Frame *f, Rectangle r, Align sticky) { static void set_client_state(Client * c, int state) { - Atom data[] = { state, None }; + long data[] = { state, None }; changeprop(&c->w, "WM_STATE", "WM_STATE", data, nelem(data)); } @@ -866,7 +866,7 @@ apply_tags(Client *c, const char *tags) { cur = nil; if(!strcmp(buf+n, "~")) c->floating = add; - else if(!strcmp(buf+n, "!")) + else if(!strcmp(buf+n, "!") || strcmp(buf+n, "sel")) cur = screen->sel->name; else if(!Mbsearch(buf+n, badtags, bsstrcmp)) cur = buf+n; diff --git a/cmd/wmii/x11.h b/cmd/wmii/x11.h index 59580e16..2682d049 100644 --- a/cmd/wmii/x11.h +++ b/cmd/wmii/x11.h @@ -113,5 +113,6 @@ XRectangle XRect(Rectangle r); #define Pt(x, y) ((Point){(x), (y)}) #define Rpt(p, q) ((Rectangle){p, q}) #define Rect(x0, y0, x1, y1) ((Rectangle){Pt(x0, y0), Pt(x1, y1)}) -#define changeprop(w, prop, type, data, n) changeproperty(w, prop, type, (sizeof(*(data))*8), \ - (uchar*)(data), n) +#define changeprop(w, prop, type, data, n) changeproperty(w, prop, type, ((sizeof(*(data)) == 8 ? 4 : sizeof(*(data))) \ + * 8), \ + (uchar*)(data), n) diff --git a/debian/rules b/debian/rules index fc15a224..910281dd 100755 --- a/debian/rules +++ b/debian/rules @@ -12,7 +12,7 @@ UNPATCH=debian/unpatch.ed CFLAGS = -g -O0 ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - # wmii is IO, not CPU bound. Please do not use -O2 here. + # wmii is IO, not CPU, bound. Please do not use -O2 here. CFLAGS += -O endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) diff --git a/rc/sh.wmii b/rc/sh.wmii index 4ab97edf..931d36b6 100755 --- a/rc/sh.wmii +++ b/rc/sh.wmii @@ -209,9 +209,7 @@ fn proglist { } fn getfuns { - ls -p /env | grep '^fn-' ^ $1 ^ '-' | getlines { - echo ${re s '^fn-[^-]+-' '' $line} - } + ls -p /env | sed -n 's/^fn-' ^ $1 ^ '-//p' } fn actionlist { @@ -254,7 +252,7 @@ progs_file=/tmp/proglist.${pid} Action rehash & # Tag Bar Setup -{ifs:="{echo}; seltag=`{sed 1q /tag/sel/ctl}} +seltag=${lines sed 1q /tag/sel/ctl} comm -13 ${pipe from {read_tags}} ${pipe from {ls -p /lbar/*}} | getlines { rm /lbar/$line } read_tags | getlines { @@ -281,3 +279,4 @@ getlines { }