Merge branch 'origin' into linux

This commit is contained in:
Christian Neukirchen 2010-09-26 01:43:12 +02:00
commit b11c12e99b
6 changed files with 26 additions and 25 deletions

8
cwm.1
View File

@ -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

12
cwmrc.5
View File

@ -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.

View File

@ -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)

View File

@ -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';

View File

@ -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--)
;

View File

@ -77,6 +77,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);
@ -86,6 +87,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);
}