about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* moved transient_for tag inheritance to settagsAnselm R. Garbe2006-09-063-10/+10
|
* no, reodering floating clients definately breaks the manage() policy which ↵Anselm R. Garbe2006-09-063-16/+18
| | | | attaches all clients zoomed (otherwise higher-weight clients couldn't be attached zoomed, which sucks)
* no, ordering floating clients at the end seems betterAnselm R. Garbe2006-09-053-19/+17
|
* fixAnselm R. Garbe2006-09-051-1/+1
|
* this makes sure the issue mentioned by sanderAnselm R. Garbe2006-09-051-2/+8
|
* fixing zoomAnselm R. Garbe2006-09-051-3/+4
|
* fixing two off-by-onesAnselm R. Garbe2006-09-051-2/+2
|
* ach ich will auch Alt-sAnselm R. Garbe2006-09-051-0/+1
|
* applied checking existance of >2 tiles patch (proposed by sander) to zoom ↵Anselm R. Garbe2006-09-051-5/+14
| | | | and resizecol
* renamed resizetile into resizecolAnselm R. Garbe2006-09-054-5/+5
|
* well ok, added Mod-s to default bindings (however, I don't need it)Anselm R. Garbe2006-09-052-0/+7
|
* s/growcol/resizetile/gAnselm R. Garbe2006-09-054-15/+15
|
* right, multihead issue is not involved with growcolAnselm R. Garbe2006-09-051-1/+1
|
* hotfixAnselm R. Garbe2006-09-051-1/+3
|
* applied a fix related to Sanders remark to growcolAnselm R. Garbe2006-09-051-1/+1
|
* sanders toggletag patch is much more elegantAnselm R. Garbe2006-09-051-1/+1
|
* I really need column growing, now pushing upstreamAnselm R. Garbe2006-09-055-0/+27
|
* don't access sel in restack without checking for NULL (multihead crashing bug)Anselm R. Garbe2006-09-051-7/+9
|
* fixing c->weight handlingAnselm R. Garbe2006-09-051-2/+3
|
* removed some useless tagsAnselm R. Garbe2006-09-041-2/+0
|
* after 1.3Anselm R. Garbe2006-09-041-1/+1
|
* Added tag 1.3 for changeset f5f5cbf016a94b48a8fe9c47f0736e96d166d5d4Anselm R. Garbe2006-09-041-0/+1
|
* retagged 1.3Anselm R. Garbe2006-09-041-1/+1
|
* simplified manageAnselm R. Garbe2006-09-041-5/+2
|
* removed html crapAnselm R. Garbe2006-09-043-128/+1
|
* Added tag 1.3 for changeset dd44dc937e8b0a46abf1a15a333dba5304e4fe89Anselm R. Garbe2006-09-041-0/+1
|
* hotfixing with sanders hintAnselm R. Garbe2006-09-041-1/+3
|
* Added tag 1.3 for changeset 6413ea66b1c2496cfc2173fe58df67cb965eb1daAnselm R. Garbe2006-09-041-0/+1
|
* fixing the issue that new clients appear loweredAnselm R. Garbe2006-09-041-0/+2
|
* removed unused varsAnselm R. Garbe2006-09-041-2/+2
|
* reducing focus calls (sanders patch)Anselm R. Garbe2006-09-041-6/+4
|
* applied Sanders max_and_focus.patchAnselm R. Garbe2006-09-045-44/+48
|
* simplified buttonpressAnselm R. Garbe2006-09-011-23/+12
|
* applied sanders patchAnselm R. Garbe2006-09-012-11/+20
|
* reorder was misssing in Ross version of viewallAnselm R. Garbe2006-08-311-0/+1
|
* changed shortcut into Mod1-0Anselm R. Garbe2006-08-313-7/+7
|
* added viewall to mainstream (only Ross Mohns version, not the toggle)Anselm R. Garbe2006-08-315-0/+17
|
* implemented Button2 press on tags for toggletag on the focused clientAnselm R. Garbe2006-08-312-2/+15
|
* applied sanders patch to remove unnecessary commit()Anselm R. Garbe2006-08-313-16/+9
|
* small fix in config.arg.hAnselm R. Garbe2006-08-301-3/+3
|
* Added tag 1.2 for changeset e3179ce2b90451d2807cd53b589d768412b8666bAnselm R. Garbe2006-08-301-0/+1
|
* prepared 1.2 1.2Anselm R. Garbe2006-08-301-1/+1
|
* now using Salmi's menu commandAnselm R. Garbe2006-08-301-2/+3
|
* removed a warning reported by JukkaAnselm R. Garbe2006-08-301-1/+0
|
* simplified configurerequestAnselm R. Garbe2006-08-291-25/+22
|
* now dwm enforces max screen size also in tiled mode on non-floating clients ↵Anselm R. Garbe2006-08-291-13/+14
| | | | which are maximized
* fixedAnselm R. Garbe2006-08-291-1/+3
|
* configurenotify remembers max geom now, and restores this if necessary, ↵Anselm R. Garbe2006-08-292-4/+14
| | | | however it accepts to touch the max size on configurerequest, this shouldn't break fillscreen apps (tested with mplayer)
* applied patch similiar proposed by dave tweedAnselm R. Garbe2006-08-291-10/+13
|
* improved selection policyAnselm R. Garbe2006-08-291-20/+24
|
pan class="n">ty, c->tw, c->th); } static int xerrordummy(Display *dsply, XErrorEvent *ee) { return 0; } /* extern functions */ void ban(Client *c) { XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); XMoveWindow(dpy, c->title, c->tx + 2 * sw, c->ty); } void focus(Client *c) { Client *old = sel; XEvent ev; sel = c; if(old && old != c) drawtitle(old); drawtitle(c); XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); XSync(dpy, False); while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); } void focusnext(Arg *arg) { Client *c; if(!sel) return; if(sel->ismax) togglemax(NULL); if(!(c = getnext(sel->next))) c = getnext(clients); if(c) { higher(c); focus(c); } } void focusprev(Arg *arg) { Client *c; if(!sel) return; if(sel->ismax) togglemax(NULL); if(!(c = getprev(sel->prev))) { for(c = clients; c && c->next; c = c->next); c = getprev(c); } if(c) { higher(c); focus(c); } } Client * getclient(Window w) { Client *c; for(c = clients; c; c = c->next) if(c->win == w) return c; return NULL; } Client * getctitle(Window w) { Client *c; for(c = clients; c; c = c->next) if(c->title == w) return c; return NULL; } void gravitate(Client *c, Bool invert) { int dx = 0, dy = 0; switch(c->grav) { default: break; case StaticGravity: case NorthWestGravity: case NorthGravity: case NorthEastGravity: dy = c->border; break; case EastGravity: case CenterGravity: case WestGravity: dy = -(c->h / 2) + c->border; break; case SouthEastGravity: case SouthGravity: case SouthWestGravity: dy = -(c->h); break; } switch (c->grav) { default: break; case StaticGravity: case NorthWestGravity: case WestGravity: case SouthWestGravity: dx = c->border; break; case NorthGravity: case CenterGravity: case SouthGravity: dx = -(c->w / 2) + c->border; break; case NorthEastGravity: case EastGravity: case SouthEastGravity: dx = -(c->w + c->border); break; } if(invert) { dx = -dx; dy = -dy; } c->x += dx; c->y += dy; } void higher(Client *c) { XRaiseWindow(dpy, c->win); XRaiseWindow(dpy, c->title); } void killclient(Arg *arg) { if(!sel) return; if(sel->proto & PROTODELWIN) sendevent(sel->win, wmatom[WMProtocols], wmatom[WMDelete]); else XKillClient(dpy, sel->win); } void lower(Client *c) { XLowerWindow(dpy, c->title); XLowerWindow(dpy, c->win); } void manage(Window w, XWindowAttributes *wa) { Client *c; Window trans; XSetWindowAttributes twa; c = emallocz(sizeof(Client)); c->tags = emallocz(ntags * sizeof(Bool)); c->win = w; c->x = c->tx = wa->x; c->y = c->ty = wa->y; c->w = c->tw = wa->width; c->h = wa->height; c->th = bh; c->border = 0; setsize(c); if(c->h != sh && c->y < bh) c->y = c->ty = bh; c->proto = getproto(c->win); XSelectInput(dpy, c->win, StructureNotifyMask | PropertyChangeMask | EnterWindowMask); XGetTransientForHint(dpy, c->win, &trans); twa.override_redirect = 1; twa.background_pixmap = ParentRelative; twa.event_mask = ExposureMask | EnterWindowMask; c->title = XCreateWindow(dpy, root, c->tx, c->ty, c->tw, c->th, 0, DefaultDepth(dpy, screen), CopyFromParent, DefaultVisual(dpy, screen), CWOverrideRedirect | CWBackPixmap | CWEventMask, &twa); if(clients) clients->prev = c; c->next = clients; clients = c; XGrabButton(dpy, Button1, MODKEY, c->win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); XGrabButton(dpy, Button1, MODKEY | LockMask, c->win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); XGrabButton(dpy, Button1, MODKEY | NUMLOCKMASK, c->win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); XGrabButton(dpy, Button1, MODKEY | NUMLOCKMASK | LockMask, c->win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); XGrabButton(dpy, Button2, MODKEY, c->win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); XGrabButton(dpy, Button2, MODKEY | LockMask, c->win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); XGrabButton(dpy, Button2, MODKEY | NUMLOCKMASK, c->win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); XGrabButton(dpy, Button2, MODKEY | NUMLOCKMASK | LockMask, c->win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); XGrabButton(dpy, Button3, MODKEY, c->win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); XGrabButton(dpy, Button3, MODKEY | LockMask, c->win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); XGrabButton(dpy, Button3, MODKEY | NUMLOCKMASK, c->win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); XGrabButton(dpy, Button3, MODKEY | NUMLOCKMASK | LockMask, c->win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); settags(c); if(!c->isfloat) c->isfloat = trans || (c->maxw && c->minw && c->maxw == c->minw && c->maxh == c->minh); settitle(c); arrange(NULL); /* mapping the window now prevents flicker */ XMapRaised(dpy, c->win); XMapRaised(dpy, c->title); if(c->tags[tsel]) focus(c); } void resize(Client *c, Bool sizehints, Corner sticky) { int bottom = c->y + c->h; int right = c->x + c->w; /*XConfigureEvent e;*/ XWindowChanges wc; if(sizehints) { if(c->incw) c->w -= (c->w - c->basew) % c->incw; if(c->inch) c->h -= (c->h - c->baseh) % c->inch; if(c->minw && c->w < c->minw) c->w = c->minw; if(c->minh && c->h < c->minh) c->h = c->minh; if(c->maxw && c->w > c->maxw) c->w = c->maxw; if(c->maxh && c->h > c->maxh) c->h = c->maxh; } if(c->x > right) /* might happen on restart */ c->x = right - c->w; if(c->y > bottom) c->y = bottom - c->h; if(sticky == TopRight || sticky == BotRight) c->x = right - c->w; if(sticky == BotLeft || sticky == BotRight) c->y = bottom - c->h; resizetitle(c); wc.x = c->x; wc.y = c->y; wc.width = c->w; wc.height = c->h; if(c->w == sw && c->h == sh) wc.border_width = 0; else wc.border_width = 1; XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc); XSync(dpy, False); } void setsize(Client *c) { long msize; XSizeHints size; if(!XGetWMNormalHints(dpy, c->win, &size, &msize) || !size.flags) size.flags = PSize; c->flags = size.flags; if(c->flags & PBaseSize) { c->basew = size.base_width; c->baseh = size.base_height; } else c->basew = c->baseh = 0; if(c->flags & PResizeInc) { c->incw = size.width_inc; c->inch = size.height_inc; } else c->incw = c->inch = 0; if(c->flags & PMaxSize) { c->maxw = size.max_width; c->maxh = size.max_height; } else c->maxw = c->maxh = 0; if(c->flags & PMinSize) { c->minw = size.min_width; c->minh = size.min_height; } else c->minw = c->minh = 0; if(c->flags & PWinGravity) c->grav = size.win_gravity; else c->grav = NorthWestGravity; } void settitle(Client *c) { char **list = NULL; int n; XTextProperty name; name.nitems = 0; c->name[0] = 0; XGetTextProperty(dpy, c->win, &name, netatom[NetWMName]); if(!name.nitems) XGetWMName(dpy, c->win, &name); if(!name.nitems) return; if(name.encoding == XA_STRING) strncpy(c->name, (char *)name.value, sizeof(c->name)); else { if(XmbTextPropertyToTextList(dpy, &name, &list, &n) >= Success && n > 0 && *list) { strncpy(c->name, *list, sizeof(c->name)); XFreeStringList(list); } } XFree(name.value); resizetitle(c); } void togglemax(Arg *arg) { int ox, oy, ow, oh; XEvent ev; if(!sel) return; if((sel->ismax = !sel->ismax)) { ox = sel->x; oy = sel->y; ow = sel->w; oh = sel->h; sel->x = sx; sel->y = sy + bh; sel->w = sw - 2; sel->h = sh - 2 - bh; higher(sel); resize(sel, False, TopLeft); sel->x = ox; sel->y = oy; sel->w = ow; sel->h = oh; } else resize(sel, False, TopLeft); while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); } void unmanage(Client *c) { XGrabServer(dpy); XSetErrorHandler(xerrordummy); XUngrabButton(dpy, AnyButton, AnyModifier, c->win); XDestroyWindow(dpy, c->title); if(c->prev) c->prev->next = c->next; if(c->next) c->next->prev = c->prev; if(c == clients) clients = c->next; if(sel == c) { sel = getnext(c->next); if(!sel) sel = getprev(c->prev); if(!sel) sel = clients; } free(c->tags); free(c); XSync(dpy, False); XSetErrorHandler(xerror); XUngrabServer(dpy); arrange(NULL); if(sel) focus(sel); } void zoom(Arg *arg) { Client *c; if(!sel || (arrange != dotile) || sel->isfloat) return; if(sel == getnext(clients)) { if((c = getnext(sel->next))) sel = c; else return; } /* pop */ if(sel->prev) sel->prev->next = sel->next; if(sel->next) sel->next->prev = sel->prev; sel->prev = NULL; if(clients) clients->prev = sel; sel->next = clients; clients = sel; arrange(NULL); focus(sel); }