From 917bce4b8da39e68ed2200f1e2eab09582e7fa34 Mon Sep 17 00:00:00 2001 From: okan Date: Sat, 25 Sep 2010 20:01:27 +0000 Subject: spacing nits --- group.c | 9 +++++---- search.c | 11 ++--------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/group.c b/group.c index d88484b..1c2fd03 100644 --- a/group.c +++ b/group.c @@ -179,19 +179,19 @@ group_init(struct screen_ctx *sc) } void -group_make_autogroup(struct conf *conf, char *class, int no) +group_make_autogroup(struct conf *conf, char *val, int no) { struct autogroupwin *aw; char *p; aw = xcalloc(1, sizeof(*aw)); - if ((p = strchr(class, ',')) == NULL) { + if ((p = strchr(val, ',')) == NULL) { aw->name = NULL; - aw->class = xstrdup(class); + aw->class = xstrdup(val); } else { *(p++) = '\0'; - aw->name = xstrdup(class); + aw->name = xstrdup(val); aw->class = xstrdup(p); } aw->num = no; @@ -426,6 +426,7 @@ group_autogroup(struct client_ctx *cc) if (cc->app_class == NULL || cc->app_name == NULL) return; + if (xu_getprop(cc->win, _NET_WM_DESKTOP, XA_CARDINAL, 1, (unsigned char **)&grpno) > 0) { if (*grpno == 0xffffffff) diff --git a/search.c b/search.c index 4383f5d..8cd6523 100644 --- a/search.c +++ b/search.c @@ -78,11 +78,7 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search) } } - /* - * See if there is a match on the window class - * name. - */ - + /* Then if there is a match on the window class name. */ if (tier < 0 && strsubmatch(search, cc->app_class, 0)) { cc->matchname = cc->app_class; tier = 3; @@ -99,9 +95,7 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search) if (cc == client_current() && tier < ntiers - 1) tier++; - /* - * Clients that are hidden get ranked one up. - */ + /* Clients that are hidden get ranked one up. */ if (cc->flags & CLIENT_HIDDEN && tier > 0) tier--; @@ -114,7 +108,6 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search) * Always make your current tierp the newly inserted * entry. */ - for (t = tier; t >= 0 && ((before = tierp[t]) == NULL); t--) ; -- cgit 1.4.1 From 2d66003e4b8013d02370982fdf617510b108144c Mon Sep 17 00:00:00 2001 From: okan Date: Sat, 25 Sep 2010 20:02:58 +0000 Subject: picked a henning diff from src - original log: fix linecount bug with comments spanning multiple lines problem reported with the obvious fix for bgpd by Sebastian Benoit , also PR 6432 ok oga@ --- parse.y | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parse.y b/parse.y index 20b1d8b..d86c4e1 100644 --- a/parse.y +++ b/parse.y @@ -366,9 +366,10 @@ yylex(void) return (0); if (next == quotec || c == ' ' || c == '\t') c = next; - else if (next == '\n') + else if (next == '\n') { + file->lineno++; continue; - else + } else lungetc(next); } else if (c == quotec) { *p = '\0'; -- cgit 1.4.1 From dee6ac5b7db3605e1364789001aa2502f0b2d287 Mon Sep 17 00:00:00 2001 From: okan Date: Sat, 25 Sep 2010 20:04:55 +0000 Subject: do not warp to clients marked 'ignore'; from chneukirchen at gmail - thanks. (with the manpage bit from me). ok oga@ --- xevents.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xevents.c b/xevents.c index 22c2afc..f4fca00 100644 --- a/xevents.c +++ b/xevents.c @@ -76,6 +76,7 @@ xev_handle_maprequest(XEvent *ee) XMapRequestEvent *e = &ee->xmaprequest; struct client_ctx *cc = NULL, *old_cc; XWindowAttributes xattr; + struct winmatch *wm; if ((old_cc = client_current()) != NULL) client_ptrsave(old_cc); @@ -85,6 +86,11 @@ xev_handle_maprequest(XEvent *ee) cc = client_new(e->window, screen_fromroot(xattr.root), 1); } + TAILQ_FOREACH(wm, &Conf.ignoreq, entry) { + if (strncasecmp(wm->title, cc->name, strlen(wm->title)) == 0) + return; + } + client_ptrwarp(cc); } -- cgit 1.4.1 From ff3df256a10d5ab40bbbe019860af9adbfbac16b Mon Sep 17 00:00:00 2001 From: schwarze Date: Sat, 25 Sep 2010 21:48:08 +0000 Subject: s/\.Pb/.Pp/ for correct vertical spacing; found by mandoc -Tlint --- cwmrc.5 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cwmrc.5 b/cwmrc.5 index 46bc897..800e253 100644 --- a/cwmrc.5 +++ b/cwmrc.5 @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: July 23 2010 $ +.Dd $Mdocdate: September 25 2010 $ .Dt CWMRC 5 .Os .Sh NAME @@ -29,7 +29,7 @@ The following options are accepted in the configuration file: .Bl -tag -width Ds -compact .It Ic autogroup Ar group windowname .It Ic autogroup Ar group windowname,windowclass -Control automatic window grouping, based on the class and/or name +Control automatic window grouping, based on the name and/or class properties, where .Ar group is a number between 0 and 9. @@ -38,7 +38,7 @@ allow for .Dq sticky windows in sticky group mode. .Pp -The class and name of a window may be obtained using +The name and class of a window may be obtained using .Xr xprop 1 . .Pp .It Ic bind Ar keys command @@ -138,7 +138,7 @@ can be used for applications such as where the user may wish to remain visible. .Pp .It Ic ignore Ar windowname -Ignore windows with the name +Ignore, and do not warp to, windows with the name .Ar windowname when drawing borders and cycling through windows. .Pp @@ -147,7 +147,7 @@ Cause the creation of a mouse binding, or replacement of a default mouse binding. The modifier keys come first, followed by a .Sq - . -.Pb +.Pp The following modifiers are recognised: .Pp .Bl -tag -width Ds -offset indent -compact @@ -164,7 +164,7 @@ The Mod4 key (normally the windows key). The .Sq - should be followed by number: -.Pb +.Pp .Bl -tag -width Ds -offset indent -compact .It 1 Left mouse button. -- cgit 1.4.1 From 1f310d57e2284d7e6bf1edc947a7f263baef8d5d Mon Sep 17 00:00:00 2001 From: schwarze Date: Sat, 25 Sep 2010 21:58:18 +0000 Subject: s/-offset -indent/-offset indent/ for correct indentation, and properly encode \(:a found by mandoc -Tlint --- cwm.1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cwm.1 b/cwm.1 index 8a27bd5..1282798 100644 --- a/cwm.1 +++ b/cwm.1 @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 19 2009 $ +.Dd $Mdocdate: August 24 2009 $ .Dt CWM 1 .Os .Sh NAME @@ -188,7 +188,7 @@ keeps a history of the 5 previous titles of a window. When searching, the leftmost character of the result list may show a flag: .Pp -.Bl -tag -width 10n -offset -indent -compact +.Bl -tag -width 10n -offset indent -compact .It ! The window is the currently focused window. .It & @@ -230,7 +230,7 @@ and a red border will be shown on those just removed. .Sh MENUS Menus are recalled by clicking the mouse on the root window: .Pp -.Bl -tag -width 10n -offset -indent -compact +.Bl -tag -width 10n -offset indent -compact .It Ic M1 Show list of currently hidden windows. Clicking on an item will unhide that window. @@ -266,7 +266,7 @@ with contributions from .An Andy Adamson Aq dros@monkey.org , .An Niels Provos Aq provos@monkey.org , and -.An Antti Nykänen Aq aon@iki.fi . +.An Antti Nyk\(:anen Aq aon@iki.fi . Ideas, discussion with many others. .Sh HISTORY .Nm -- cgit 1.4.1