about summary refs log tree commit diff stats
path: root/client.c
Commit message (Collapse)AuthorAgeFilesLines
* made a new client position strategy similiar to that one proposed by Sander, ↵Anselm R.Garbe2006-08-181-7/+7
| | | | but which takes top bar into account
* fixed a bug reported by sanderAnselm R.Garbe2006-08-171-1/+1
|
* centering apps only if transient_for is not(!) setAnselm R.Garbe2006-08-171-9/+1
|
* fixed issue Sander reportedAnselm R.Garbe2006-08-171-4/+3
|
* condition was insufficientAnselm R.Garbe2006-08-161-2/+2
|
* fixed issue reported by sanderAnselm R.Garbe2006-08-161-0/+4
|
* added general centralization rule for new clients (works around various ↵Anselm R.Garbe2006-08-161-1/+10
| | | | borken apps)
* removed NUMLOCKMASK, added dynamically calculated numlockmask insteadAnselm R.Garbe2006-08-141-6/+6
|
* fixedAnselm R.Garbe2006-08-141-8/+4
|
* added some flicker preventionAnselm R.Garbe2006-08-141-1/+3
|
* fixed a core dumpAnselm R.Garbe2006-08-141-1/+0
|
* implemented restack behavior (floats are on top in tiled mode)Anselm R.Garbe2006-08-141-18/+8
|
* implement multi-tag selection through button3 click on the specific tagAnselm R.Garbe2006-08-111-2/+2
|
* applied Sander's patch as wellAnselm R.Garbe2006-08-111-2/+1
|
* simplified unmanageAnselm R.Garbe2006-08-111-7/+2
|
* removed the if(clients) check from popping codeAnselm R.Garbe2006-08-111-2/+1
|
* applied Sanders zoom_update patchAnselm R.Garbe2006-08-101-1/+1
|
* respecting inc hints in floating mode on togglemaxAnselm R.Garbe2006-08-101-1/+1
|
* reverting last patch, that sucks, I don't care about retarded apps like gvimAnselm R.Garbe2006-08-101-1/+1
|
* togglemax repects inc-hints (this way gvim can be toggle'maxed as well)Anselm R.Garbe2006-08-101-1/+1
|
* applied sumik's multihead patchAnselm R.Garbe2006-08-101-0/+2
|
* disallow zoom on maximized clientsAnselm R.Garbe2006-08-101-7/+0
|
* removed NET_ACTIVE_WINDOW handlingAnselm R.Garbe2006-08-081-5/+0
|
* implemented NET_ACTIVE_WINDOW supportAnselm R.Garbe2006-08-081-0/+5
|
* applied endless loop prevention on zoom()arg@10ksloc.org2006-08-071-1/+3
|
* small fix of the last commitarg@10ksloc.org2006-08-051-1/+1
|
* using -Os again, zoom is ignored in floating mode or on floating clientsarg@10ksloc.org2006-08-051-1/+1
|
* mouse grab needs also to grab for combinations of numlock/lockmaskarg@10ksloc.org2006-08-051-0/+20
|
* removed TLast tag enum, now tags is simple defined as char *[] array, the ↵arg@10ksloc.org2006-08-031-1/+3
| | | | rest is calculated correctly, rules take an int array for the tags
* changed Client->tags and Rule->tags to be Bool (I'll also try to remove the ↵arg@10ksloc.org2006-08-031-1/+1
| | | | TLast enum)
* made fullscreen apps working fine in floating mode (there is no sane way to ↵arg@10ksloc.org2006-08-021-22/+10
| | | | make them work in tiled mode, thus I switch to floating mode if I run such kind of app), also fixed the xterm issue reported by Sander
* new stuffarg@10ksloc.org2006-08-021-15/+21
|
* implemented focus on enterwindow on titlebarsarg@10ksloc.org2006-08-021-1/+1
|
* reverting to old resize policyarg@10ksloc.org2006-08-021-11/+19
|
* new resize stuff (using XConfigureWindow instead of XSendEvent)arg@10ksloc.org2006-08-021-19/+11
|
* renamed WM_PROTOCOL_DELWIN into PROTODELWINarg@10ksloc.org2006-08-011-1/+1
|
* removed artefacts of single-linked list (thanx to Jukka, I must have been mad)arg@10ksloc.org2006-08-011-8/+3
|
* uppercasing all define'd values (uppercase-prefixed should only be enum ↵arg@10ksloc.org2006-08-011-3/+3
| | | | field qualifiers)
* applied Sanders patchesarg@10ksloc.org2006-08-011-3/+3
|
* committed a patch which fixes the hints of Jukkaarg@10ksloc.org2006-08-011-34/+8
|
* sanitization of several clunky stuff, removed heretag (rarely of use), ↵arg@10ksloc.org2006-07-211-2/+15
| | | | simplified pop(), changed shortcuts to always contain MODKEY
* applied sanders no_sizehints for tiled mode patch (thx!)arg@10ksloc.org2006-07-201-10/+10
|
* serious mistake in pop() (forgot to set c->prev to NULL on pop)arg@10ksloc.org2006-07-201-0/+1
|
* using double-linked list in order to get correct prev focus handlingarg@10ksloc.org2006-07-201-15/+31
|
* made status bar drawing more robust, implemented togglemax and togglemode, ↵arg@10ksloc.org2006-07-201-15/+38
| | | | works quite well
* cleaned up codearg@10ksloc.org2006-07-201-6/+10
|
* removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling ↵arg@10ksloc.org2006-07-201-76/+52
| | | | remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
* implemented regexp matching for rulesarg@10ksloc.org2006-07-191-2/+3
|
* applied Jukka's patch with s/ModKeyMask/MODKEY/garg@10ksloc.org2006-07-191-3/+3
|
* fixed the bug mentioned by Sanderarg@10ksloc.org2006-07-191-3/+7
|
ass="w"> && !isvisible(c); c = c->snext); focus(c); } restack(); } LAYOUTS /* extern */ void floating(void) { Client *c; for(c = clients; c; c = c->next) { if(isvisible(c)) { if(c->isbanned) XMoveWindow(dpy, c->win, c->x, c->y); c->isbanned = False; resize(c, c->x, c->y, c->w, c->h, True); } else { c->isbanned = True; XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y); } } if(!sel || !isvisible(sel)) { for(c = stack; c && !isvisible(c); c = c->snext); focus(c); } restack(); } void focusclient(const char *arg) { Client *c; if(!sel || !arg) return; if(atoi(arg) < 0) { for(c = sel->prev; c && !isvisible(c); c = c->prev); if(!c) { for(c = clients; c && c->next; c = c->next); for(; c && !isvisible(c); c = c->prev); } } else { for(c = sel->next; c && !isvisible(c); c = c->next); if(!c) for(c = clients; c && !isvisible(c); c = c->next); } if(c) { focus(c); restack(); } } void incmasterw(const char *arg) { int i; if(lt->arrange != tile) return; if(!arg) masterw = MASTERWIDTH; else { i = atoi(arg); if(waw * (masterw + i) / 1000 >= waw - 2 * BORDERPX || waw * (masterw + i) / 1000 <= 2 * BORDERPX) return; masterw += i; } lt->arrange(); } void incnmaster(const char *arg) { int i; if(!arg) nmaster = NMASTER; else { i = atoi(arg); if((lt->arrange != tile) || (nmaster + i < 1) || (wah / (nmaster + i) <= 2 * BORDERPX)) return; nmaster += i; } if(sel) lt->arrange(); else drawstatus(); } void initlayouts(void) { unsigned int i, w; lt = &layout[0]; nlayouts = sizeof layout / sizeof layout[0]; for(blw = i = 0; i < nlayouts; i++) { w = textw(layout[i].symbol); if(w > blw) blw = w; } } Client * nexttiled(Client *c) { for(; c && (c->isfloating || !isvisible(c)); c = c->next); return c; } void restack(void) { Client *c; XEvent ev; drawstatus(); if(!sel) return; if(sel->isfloating || lt->arrange == floating) XRaiseWindow(dpy, sel->win); if(lt->arrange != floating) { if(!sel->isfloating) XLowerWindow(dpy, sel->win); for(c = nexttiled(clients); c; c = nexttiled(c->next)) { if(c == sel) continue; XLowerWindow(dpy, c->win); } } XSync(dpy, False); while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); } void setlayout(const char *arg) { int i; if(!arg) { for(i = 0; i < nlayouts && lt != &layout[i]; i++); if(i == nlayouts - 1) lt = &layout[0]; else lt = &layout[++i]; } else { i = atoi(arg); if(i < 0 || i >= nlayouts) return; lt = &layout[i]; } if(sel) lt->arrange(); else drawstatus(); } void togglemax(const char *arg) { XEvent ev; if(!sel || (lt->arrange != floating && !sel->isfloating) || sel->isfixed) return; if((sel->ismax = !sel->ismax)) { sel->rx = sel->x; sel->ry = sel->y; sel->rw = sel->w; sel->rh = sel->h; resize(sel, wax, way, waw - 2 * BORDERPX, wah - 2 * BORDERPX, True); } else resize(sel, sel->rx, sel->ry, sel->rw, sel->rh, True); drawstatus(); while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); } void zoom(const char *arg) { unsigned int n; Client *c; if(!sel || lt->arrange != tile || sel->isfloating) return; for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) n++; if((c = sel) == nexttiled(clients)) if(!(c = nexttiled(c->next))) return; detach(c); attach(c); focus(c); lt->arrange(); }