about summary refs log tree commit diff stats
path: root/event.c
Commit message (Collapse)AuthorAgeFilesLines
* applied Sanders max_and_focus.patchAnselm R. Garbe2006-09-041-4/+4
|
* simplified buttonpressAnselm R. Garbe2006-09-011-23/+12
|
* applied sanders patchAnselm R. Garbe2006-09-011-5/+8
|
* implemented Button2 press on tags for toggletag on the focused clientAnselm R. Garbe2006-08-311-2/+9
|
* 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-291-1/+11
| | | | however it accepts to touch the max size on configurerequest, this shouldn't break fillscreen apps (tested with mplayer)
* applied sanders focus_ patchesAnselm R. Garbe2006-08-281-1/+1
|
* applied sanders somepatches.patchAnselm R. Garbe2006-08-281-2/+4
|
* trying a different configurationAnselm R. Garbe2006-08-251-13/+11
|
* changed symbols for float/tiled mode, added mouse-driven mode toggle to ↵Anselm R. Garbe2006-08-251-10/+12
| | | | buttonpress()
* new color stuff/new rendering stuffAnselm R. Garbe2006-08-251-1/+3
|
* applied Sanders focus_* patches, removed the unnecessary clean-prefix from ↵Anselm R.Garbe2006-08-211-0/+2
| | | | the new function names
* changed main event loopAnselm R.Garbe2006-08-151-0/+13
|
* removed NUMLOCKMASK, added dynamically calculated numlockmask insteadAnselm R.Garbe2006-08-141-3/+3
|
* applied sanders man page patch, removed button2 from bar clickAnselm R.Garbe2006-08-141-3/+3
|
* fixedAnselm R.Garbe2006-08-141-1/+1
|
* remove unnecessary XSyncAnselm R.Garbe2006-08-141-1/+0
|
* added mappingnotify event for kb refreshesAnselm R.Garbe2006-08-141-0/+12
|
* removed unneecessary crapAnselm R.Garbe2006-08-141-6/+1
|
* pplied Sanders appendtag patchAnselm R.Garbe2006-08-141-0/+6
|
* some other small fixesAnselm R.Garbe2006-08-141-2/+4
|
* removed ungrabkeys again (because of sander's mail)Anselm R.Garbe2006-08-141-16/+0
|
* implemented ungrabkeys() which is called in cleanup()Anselm R.Garbe2006-08-141-0/+16
|
* implemented restack behavior (floats are on top in tiled mode)Anselm R.Garbe2006-08-141-3/+6
|
* applied Sanders LD and resize patchesAnselm R.Garbe2006-08-141-2/+5
|
* removed viewnext/viewprevAnselm R.Garbe2006-08-141-23/+9
|
* made shortcuts like proposed by Sander, renamed viewextend to toggleview ↵Anselm R.Garbe2006-08-131-1/+1
| | | | (more clear)
* implemented viewextend and added M-S-C-n shortcuts for extending the current ↵Anselm R.Garbe2006-08-111-5/+2
| | | | view... updated man page (works great!) nice feature
* implement multi-tag selection through button3 click on the specific tagAnselm R.Garbe2006-08-111-1/+7
|
* realized that client focussing through the bar is pretty useless, better is ↵Anselm R.Garbe2006-08-111-5/+5
| | | | sloppy view focussing for B1/B3 as well instead
* implemented focusprev on button1 press in the bar, and focusnext on button3 ↵Anselm R.Garbe2006-08-111-2/+6
| | | | press in the bar
* applied Sanders zoom_update patchAnselm R.Garbe2006-08-101-2/+1
|
* applied sumik's multihead patchAnselm R.Garbe2006-08-101-5/+10
|
* applied sander's patchAnselm R.Garbe2006-08-101-11/+8
|
* disallow zoom on maximized clientsAnselm R.Garbe2006-08-101-9/+8
|
* added zoom on Mod1-Button1 on managed clients only (there is no moving possible)Anselm R.Garbe2006-08-091-0/+2
|
* removed NET_ACTIVE_WINDOW handlingAnselm R.Garbe2006-08-081-13/+0
|
* implemented NET_ACTIVE_WINDOW supportAnselm R.Garbe2006-08-081-0/+13
|
* applied grabbing-- and shell_minimalarg@10ksloc.org2006-08-071-8/+0
|
* small performance tweak ;)arg@10ksloc.org2006-08-041-2/+4
|
* fixed xterm font change (all other related apps should work fine with this ↵arg@10ksloc.org2006-08-041-14/+12
| | | | fix as well)
* removed TLast tag enum, now tags is simple defined as char *[] array, the ↵arg@10ksloc.org2006-08-031-1/+1
| | | | rest is calculated correctly, rules take an int array for the tags
* made fullscreen apps working fine in floating mode (there is no sane way to ↵arg@10ksloc.org2006-08-021-19/+46
| | | | 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-5/+2
|
* implemented focus on enterwindow on titlebarsarg@10ksloc.org2006-08-021-1/+1
|
* applied Sanders patches (numlock2)arg@10ksloc.org2006-08-021-5/+12
|
* reverting to old resize policyarg@10ksloc.org2006-08-021-10/+13
|
* new resize stuff (using XConfigureWindow instead of XSendEvent)arg@10ksloc.org2006-08-021-13/+10
|
ass="n">a.len == b.len: for i in 0..<a.len: if not sameTree(a[i], b[i]): return result = true proc getMagic*(op: PNode): TMagic = if op == nil: return mNone case op.kind of nkCallKinds: case op[0].kind of nkSym: result = op[0].sym.magic else: result = mNone else: result = mNone proc isConstExpr*(n: PNode): bool = const atomKinds = {nkCharLit..nkNilLit} # Char, Int, UInt, Str, Float and Nil literals n.kind in atomKinds or nfAllConst in n.flags proc isCaseObj*(n: PNode): bool = if n.kind == nkRecCase: return true for i in 0..<n.safeLen: if n[i].isCaseObj: return true proc isDeepConstExpr*(n: PNode; preventInheritance = false): bool = case n.kind of nkCharLit..nkNilLit: result = true of nkExprEqExpr, nkExprColonExpr, nkHiddenStdConv, nkHiddenSubConv: result = isDeepConstExpr(n[1], preventInheritance) of nkCurly, nkBracket, nkPar, nkTupleConstr, nkObjConstr, nkClosure, nkRange: for i in ord(n.kind == nkObjConstr)..<n.len: if not isDeepConstExpr(n[i], preventInheritance): return false if n.typ.isNil: result = true else: let t = n.typ.skipTypes({tyGenericInst, tyDistinct, tyAlias, tySink, tyOwned}) if t.kind in {tyRef, tyPtr} or tfUnion in t.flags: return false if t.kind == tyObject: if preventInheritance and t[0] != nil: result = false elif isCaseObj(t.n): result = false else: result = true else: result = true else: discard proc isRange*(n: PNode): bool {.inline.} = if n.kind in nkCallKinds: let callee = n[0] if (callee.kind == nkIdent and callee.ident.id == ord(wDotDot)) or (callee.kind == nkSym and callee.sym.name.id == ord(wDotDot)) or (callee.kind in {nkClosedSymChoice, nkOpenSymChoice} and callee[1].sym.name.id == ord(wDotDot)): result = true proc whichPragma*(n: PNode): TSpecialWord = let key = if n.kind in nkPragmaCallKinds and n.len > 0: n[0] else: n if key.kind == nkIdent: result = whichKeyword(key.ident) proc findPragma*(n: PNode, which: TSpecialWord): PNode = if n.kind == nkPragma: for son in n: if whichPragma(son) == which: return son proc effectSpec*(n: PNode, effectType: TSpecialWord): PNode = for i in 0..<n.len: var it = n[i] if it.kind == nkExprColonExpr and whichPragma(it) == effectType: result = it[1] if result.kind notin {nkCurly, nkBracket}: result = newNodeI(nkCurly, result.info) result.add(it[1]) return proc unnestStmts(n, result: PNode) = if n.kind == nkStmtList: for x in items(n): unnestStmts(x, result) elif n.kind notin {nkCommentStmt, nkNilLit}: result.add(n) proc flattenStmts*(n: PNode): PNode = result = newNodeI(nkStmtList, n.info) unnestStmts(n, result) if result.len == 1: result = result[0] proc extractRange*(k: TNodeKind, n: PNode, a, b: int): PNode = result = newNodeI(k, n.info, b-a+1) for i in 0..b-a: result[i] = n[i+a]