wmii

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

commit d56bb672f8198ac4f99b714a7617e9a40b3858d8
parent e63c6590db796e2848d20ce35790a2cf2fe54703
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Mon,  6 Mar 2006 23:15:57 +0100

removed NetWM stuff, the new tagging mechanism is completely different and cannot be handled by NetWM stuff in a sane way


Diffstat:
cmd/wm/event.c | 20--------------------
cmd/wm/tag.c | 8--------
cmd/wm/wm.c | 5-----
cmd/wm/wm.h | 9---------
4 files changed, 0 insertions(+), 42 deletions(-)

diff --git a/cmd/wm/event.c b/cmd/wm/event.c @@ -21,7 +21,6 @@ static void handle_maprequest(XEvent * e); static void handle_motionnotify(XEvent * e); static void handle_propertynotify(XEvent * e); static void handle_unmapnotify(XEvent * e); -static void handle_clientmessage(XEvent * e); void (*handler[LASTEvent]) (XEvent *); @@ -43,7 +42,6 @@ init_x_event_handler() handler[MotionNotify] = handle_motionnotify; handler[PropertyNotify] = handle_propertynotify; handler[UnmapNotify] = handle_unmapnotify; - handler[ClientMessage] = handle_clientmessage; } void @@ -276,21 +274,3 @@ handle_unmapnotify(XEvent *e) if((c = win2client(ev->window))) detach_client(c, True); } - -static void handle_clientmessage(XEvent *e) -{ - XClientMessageEvent *ev = &e->xclient; - Client *c; - - if (ev->message_type == net_atom[NetNumWS] && ev->format == 32) - return; /* ignore */ - else if (ev->message_type == net_atom[NetSelWS] && ev->format == 32) { - int i = ev->data.l[0]; - if(i < ntag) { - Tag *p = tag[i]; - focus_tag(p); - if((c = sel_client_of_tag(p))) - focus_client(c); - } - } -} diff --git a/cmd/wm/tag.c b/cmd/wm/tag.c @@ -23,8 +23,6 @@ alloc_tag(char *name) tag = (Tag **)cext_array_attach((void **)tag, t, sizeof(Tag *), &tagsz); ntag++; focus_tag(t); - XChangeProperty(dpy, root, net_atom[NetNumWS], XA_CARDINAL, - 32, PropModeReplace, (unsigned char *) &ntag, 1); return t; } @@ -45,10 +43,6 @@ destroy_tag(Tag *t) if(sel >= ntag) sel = 0; - for(i = 0; i < ntag; i++) - XChangeProperty(dpy, root, net_atom[NetNumWS], XA_CARDINAL, - 32, PropModeReplace, (unsigned char *) &i, 1); - free(t); return nil; } @@ -86,8 +80,6 @@ focus_tag(Tag *t) } snprintf(buf, sizeof(buf), "WS %s\n", t->name); write_event(buf); - XChangeProperty(dpy, root, net_atom[NetSelWS], XA_CARDINAL, - 32, PropModeReplace, (unsigned char *) &sel, 1); XSync(dpy, False); } diff --git a/cmd/wm/wm.c b/cmd/wm/wm.c @@ -138,11 +138,6 @@ init_atoms() wm_atom[WMState] = XInternAtom(dpy, "WM_STATE", False); wm_atom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False); wm_atom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False); - net_atom[NetNumWS] = XInternAtom(dpy, "_NET_NUMBER_OF_DESKTOPS", False); - net_atom[NetSelWS] = XInternAtom(dpy, "_NET_CURRENT_DESKTOP", False); - net_atom[NetWS] = XInternAtom(dpy, "_NET_WM_DESKTOP", False); - XChangeProperty(dpy, root, XInternAtom(dpy, "_NET_SUPPORTED", False), XA_ATOM, 32, - PropModeReplace, (unsigned char *) net_atom, NetLast); } static void diff --git a/cmd/wm/wm.h b/cmd/wm/wm.h @@ -18,14 +18,6 @@ enum { WMLast }; -/* NET atoms */ -enum { - NetNumWS, - NetSelWS, - NetWS, - NetLast -}; - /* Column modes */ enum { Colequal, @@ -198,7 +190,6 @@ Qid root_qid; Default def; Atom wm_atom[WMLast]; -Atom net_atom[NetLast]; Cursor cursor[CurLast]; unsigned int valid_mask, num_lock_mask;