about summary refs log tree commit diff stats
path: root/event.c
Commit message (Collapse)AuthorAgeFilesLines
* removing all EnterNotifys after resizeAnselm R. Garbe2007-02-121-0/+1
|
* added pointer warp on drop in resizeAnselm R. Garbe2007-02-121-0/+2
|
* replaced getproto with a saner function, now old-school artifacts of WM ↵Anselm R. Garbe2007-02-071-4/+0
| | | | times in the early 90s completely disappeared, no punned pointer warning anymore ;)
* renamed activescreen into selscreen 3.2Anselm R. Garbe2007-01-231-2/+2
|
* small changesAnselm R. Garbe2007-01-231-2/+2
|
* I think this is the best solution of multihead supportAnselm R. Garbe2007-01-231-1/+1
|
* this variant is known to work, but focus() is ugly - we need in general a ↵Anselm R. Garbe2007-01-221-1/+1
| | | | better way to handle multihead, this issel-stuff looks awkward (maybe it might be a good idea to set sel to NULL but to introduce a Client *revert which is set if a screen is unfocused, have to think about it further).
* applied Sanders all5.patch (thanks for your weekend session, Sander!)Anselm R. Garbe2007-01-221-26/+24
|
* leavenotify also don't needs the checkAnselm R. Garbe2007-01-191-5/+2
|
* deciding for focus(NULL);Anselm R. Garbe2007-01-191-2/+2
|
* replaced XSetBorder.../focus()Anselm R. Garbe2007-01-191-1/+1
|
* yet another multihead fix by Christof MusikAnselm R. Garbe2007-01-191-0/+2
|
* applied a modified version of Christof Musik's multihead patch (though this ↵Anselm R. Garbe2007-01-181-1/+4
| | | | is not sure if it works in all cases, have to wait for an ACK by Christof)
* Jukka, thanks for being faster than me!Anselm R. Garbe2007-01-151-1/+0
|
* removed drawclient and drawall (they performed useless operations/consumed ↵Anselm R. Garbe2007-01-151-5/+3
| | | | useless cpu cycles)
* removed client title barAnselm R. Garbe2007-01-141-5/+2
|
* added comment to %u in config.default.h, added Button{4.5} support on mode labelAnselm R. Garbe2007-01-101-2/+14
|
* renamed drawtitle into drawclientAnselm R. Garbe2007-01-041-2/+2
|
* correctionsarg@mig292007-01-021-1/+1
|
* next version will contain updated copyright noticearg@mig292007-01-021-1/+1
|
* renamed updatesize into updatesizehints (thx to Sander for this hint)arg@mig292007-01-011-1/+1
|
* removed gravitate for the momentarg@mig292006-12-111-2/+0
|
* applied Alex Elide's tricky patch, thanks!arg@mig292006-11-271-1/+0
|
* returning to old Key structarg@mig292006-11-271-5/+4
|
* changing Key.func into Key.func[NFUNCS], this allows sequences execution of ↵arg@mig292006-11-271-4/+5
| | | | functions per keypress (avoids implementing useless masterfunctions which call atomic ones)
* applied Jukka's sizeof K&R compliance patch, applied Manuels' last-line ↵arg@mig292006-11-261-2/+2
| | | | printage proposal for stdin reading.
* applied Gottox' windowarea patcharg@mig292006-11-161-8/+8
|
* make sure that changing sx has no impact on snapping 2.0arg@mig292006-10-311-1/+1
|
* fixed stupid bug of snap-to-screenarg@mig292006-10-301-4/+4
|
* changing snap priorityarg@mig292006-10-301-3/+3
|
* removed useless abs() callsarg@mig292006-10-301-2/+2
|
* added screen-border snapping in floating mode, feels quite wellarg@mig292006-10-301-0/+8
|
* and another fixarg@mig292006-10-271-1/+2
|
* applied sanders try2 patcharg@mig292006-10-271-1/+1
|
* moved MOUSEMASK into event.c (not used in other places)Anselm R. Garbe2006-10-161-0/+1
|
* do* has no Arg arument anymore (never called directly) 1.9Anselm R. Garbe2006-10-061-2/+2
|
* code polishing, removed unnecessary newlinesAnselm R. Garbe2006-10-061-7/+2
|
* removed the stack position stuffAnselm R. Garbe2006-10-051-6/+2
|
* Button3 click on mode label toggles stack position nowAnselm R. Garbe2006-10-051-0/+2
|
* added the new dotile as described on mlAnselm R. Garbe2006-09-291-2/+3
|
* I changed sanders patch to fix the ff issue to be simplier, though it needs ↵Anselm R. Garbe2006-09-291-3/+2
| | | | testing if this really fixes the issue
* first step to a more flexible dotile() algorithmAnselm R. Garbe2006-09-291-1/+4
|
* fixing the settags issue, preparing 1.7.1 1.7.1Anselm R. Garbe2006-09-271-0/+1
|
* removed an unused vararg@zarathustra2006-09-261-1/+0
|
* removed useless debug infoarg@mmvi2006-09-261-4/+0
|
* added configure(), but this doesn't really fix those frking broken SDL appsarg@mmvi2006-09-261-13/+8
|
* slight change of event handling orderarg@mmvi2006-09-251-6/+6
|
* simplified mouse resizalsarg@mmvi2006-09-251-43/+16
|
* applied sanders jukka patcharg@mmvi2006-09-251-5/+1
|
* applied Jukkas patcharg@mmvi2006-09-251-4/+4
|
"> if(w > dc.w) return; /* too long */ gcv.foreground = invert ? dc.bg : dc.fg; gcv.background = invert ? dc.fg : dc.bg; if(dc.font.set) { XChangeGC(dpy, dc.gc, GCForeground | GCBackground, &gcv); XmbDrawImageString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len); } else { gcv.font = dc.font.xfont->fid; XChangeGC(dpy, dc.gc, GCForeground | GCBackground | GCFont, &gcv); XDrawImageString(dpy, dc.drawable, dc.gc, x, y, buf, len); } } /* extern */ void drawall() { Client *c; for(c = clients; c; c = getnext(c->next)) drawtitle(c); drawstatus(); } void drawstatus() { int i, x; Bool istile = arrange == dotile; dc.x = dc.y = 0; dc.w = bw; drawtext(NULL, !istile); dc.w = 0; for(i = 0; i < ntags; i++) { dc.x += dc.w; dc.w = textw(tags[i]); if(istile) drawtext(tags[i], (i == tsel)); else drawtext(tags[i], (i != tsel)); } x = dc.x + dc.w; dc.w = textw(stext); dc.x = bx + bw - dc.w; drawtext(stext, !istile); if(sel && ((dc.w = dc.x - x) >= bh)) { dc.x = x; drawtext(sel->name, istile); } XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0); XSync(dpy, False); } void drawtitle(Client *c) { int i; Bool istile = arrange == dotile; if(c == sel) { drawstatus(); XUnmapWindow(dpy, c->title); XSetWindowBorder(dpy, c->win, dc.fg); return; } XSetWindowBorder(dpy, c->win, dc.bg); XMapWindow(dpy, c->title); dc.x = dc.y = 0; dc.w = 0; for(i = 0; i < ntags; i++) { if(c->tags[i]) { dc.x += dc.w; dc.w = textw(tags[i]); drawtext(tags[i], !istile); } } dc.x += dc.w; dc.w = textw(c->name); drawtext(c->name, !istile); XCopyArea(dpy, dc.drawable, c->title, dc.gc, 0, 0, c->tw, c->th, 0, 0); XSync(dpy, False); } unsigned long getcolor(const char *colstr) { Colormap cmap = DefaultColormap(dpy, screen); XColor color; XAllocNamedColor(dpy, cmap, colstr, &color, &color); return color.pixel; } void setfont(const char *fontstr) { char **missing, *def; int i, n; missing = NULL; setlocale(LC_ALL, ""); if(dc.font.set) XFreeFontSet(dpy, dc.font.set); dc.font.set = XCreateFontSet(dpy, fontstr, &missing, &n, &def); if(missing) { while(n--) fprintf(stderr, "missing fontset: %s\n", missing[n]); XFreeStringList(missing); if(dc.font.set) { XFreeFontSet(dpy, dc.font.set); dc.font.set = NULL; } } if(dc.font.set) { XFontSetExtents *font_extents; XFontStruct **xfonts; char **font_names; dc.font.ascent = dc.font.descent = 0; font_extents = XExtentsOfFontSet(dc.font.set); n = XFontsOfFontSet(dc.font.set, &xfonts, &font_names); for(i = 0, dc.font.ascent = 0, dc.font.descent = 0; i < n; i++) { if(dc.font.ascent < (*xfonts)->ascent) dc.font.ascent = (*xfonts)->ascent; if(dc.font.descent < (*xfonts)->descent) dc.font.descent = (*xfonts)->descent; xfonts++; } } else { if(dc.font.xfont) XFreeFont(dpy, dc.font.xfont); dc.font.xfont = NULL; dc.font.xfont = XLoadQueryFont(dpy, fontstr); if (!dc.font.xfont) dc.font.xfont = XLoadQueryFont(dpy, "fixed"); if (!dc.font.xfont) eprint("error, cannot init 'fixed' font\n"); dc.font.ascent = dc.font.xfont->ascent; dc.font.descent = dc.font.xfont->descent; } dc.font.height = dc.font.ascent + dc.font.descent; } unsigned int textw(const char *text) { return textnw(text, strlen(text)) + dc.font.height; }