wmii

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

commit 86d4f9ebf09b0139345df0b24801cc3d61a28756
parent 3cb6d8a7d169f153f9b1a541d7efde42bf36c407
Author: Kris Maglione <jg@suckless.org>
Date:   Mon,  5 Mar 2007 01:11:12 -0500

Some changes already in snap.

Diffstat:
Makefile | 9+++++----
column.c | 2+-
event.c | 11+++++++++++
mouse.c | 34++++++++++++++++------------------
view.c | 7++-----
5 files changed, 35 insertions(+), 28 deletions(-)

diff --git a/Makefile b/Makefile @@ -50,10 +50,11 @@ clean: dist: clean @echo creating dist tarball @mkdir -p wmii-${VERSION} - @cp -R LICENSE Makefile README wmii wmiir config.mk rc \ - wmii.1 wmiir.1 wmiiwm.1 wmii.h ${SRC} 9menu.c wmii-${VERSION} - @tar -cf wmii-${VERSION}.tar wmii-${VERSION} - @gzip wmii-${VERSION}.tar + @ln LICENSE Makefile config.mk README rc/ \ + wmii.eps wmii.mp \ + ${MAN1:=.1} ${SRC} ${SCRIPTS} wmii.h 9menu.c \ + wmii-${VERSION}/ + @tar -zcf wmii-${VERSION}.tgz wmii-${VERSION} @rm -rf wmii-${VERSION} install: all diff --git a/column.c b/column.c @@ -305,7 +305,7 @@ AfterHorizontal: resize_frame(south, &south->rect); } AfterVertical: - //relax_column(a); + arrange_column(a, False); focus_view(screen, v); } diff --git a/event.c b/event.c @@ -388,6 +388,16 @@ propertynotify(XEvent *e) { } static void +mapnotify(XEvent *e) { + Client *c; + XMapEvent *ev = &e->xmap; + + if((c = client_of_win(ev->window))) + if(c == sel_client()) + focus_client(c); +} + +static void unmapnotify(XEvent *e) { Client *c; XUnmapEvent *ev = &e->xunmap; @@ -408,6 +418,7 @@ void (*handler[LASTEvent]) (XEvent *) = { [FocusOut] = focusout, [KeyPress] = keypress, [LeaveNotify] = leavenotify, + [MapNotify] = mapnotify, [MapRequest] = maprequest, [MappingNotify] = mappingnotify, [MotionNotify] = motionnotify, diff --git a/mouse.c b/mouse.c @@ -236,15 +236,8 @@ find_droppoint(Frame *frame, int x, int y, XRectangle *rect, Bool do_move) { rect->y = r_south(&f_close->rect); rect->height = f->rect.y - rect->y; } - if(do_move) { - if(frame == f) - return; - if(a != frame->area) - send_to_area(a, frame); - remove_frame(frame); - insert_frame(f, frame, True); - focus(frame->client, True); - } + if(do_move) + goto do_move; return; } if(y > r_south(&f->rect) - labelh(&def.font)) { @@ -252,22 +245,27 @@ find_droppoint(Frame *frame, int x, int y, XRectangle *rect, Bool do_move) { rect->height = (screen->rect.height - labelh(&def.font) - rect->y); if(f->anext) rect->height = (f->anext->rect.y - rect->y); - if(do_move) { - if(frame == f) - return; - if(a != frame->area) - send_to_area(a, frame); - remove_frame(frame); - insert_frame(f, frame, False); - focus(frame->client, True); - } + if(do_move) + goto do_move; return; } + *rect = f->rect; if(do_move) { swap_frames(frame, f); focus(frame->client, False); } + return; + +do_move: + if(frame == f) + return; + if(a != frame->area) + send_to_area(a, frame); + remove_frame(frame); + insert_frame(f, frame, False); + arrange_column(f->area, False); + focus(frame->client, True); } static void diff --git a/view.c b/view.c @@ -115,7 +115,6 @@ focus_view(WMScreen *s, View *v) { XGrabServer(blz.dpy); assign_sel_view(v); update_frame_selectors(v); - /* gives all(!) clients proper geometry (for use of different tags) */ for(c=client; c; c=c->next) if((f = c->sel)) { if(f->view == v) { @@ -130,8 +129,7 @@ focus_view(WMScreen *s, View *v) { draw_frames(); XSync(blz.dpy, False); XUngrabServer(blz.dpy); - if(v != old) - flush_masked_events(EnterWindowMask); + flush_masked_events(EnterWindowMask); } void @@ -153,8 +151,7 @@ attach_to_view(View *v, Frame *f) { Client *c = f->client; c->revert = nil; - if(c->trans || c->floating || c->fixedsize - || (c->rect.width == screen->rect.width && c->rect.height == screen->rect.height)) + if(c->trans || c->floating || c->fixedsize || c->fullscreen) v->sel = v->area; else if(starting && v->sel->floating) v->sel = v->area->next;