aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorokan2010-09-25 20:04:55 +0000
committerokan2010-09-25 20:04:55 +0000
commitff0f462f969c4f536082f33fe708dade7131353a (patch)
treef8a70742c79141d98697f1fd7664230fb4a317f8
parente618422f4f3745ddbf70319fed20bbcbe35a239b (diff)
downloadcwm-ff0f462f969c4f536082f33fe708dade7131353a.tar.gz
do not warp to clients marked 'ignore'; from chneukirchen at gmail - thanks.
(with the manpage bit from me). ok oga@
-rw-r--r--cwmrc.54
-rw-r--r--xevents.c8
2 files changed, 9 insertions, 3 deletions
diff --git a/cwmrc.5 b/cwmrc.5
index d6bd15b..6610e2b 100644
--- a/cwmrc.5
+++ b/cwmrc.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: cwmrc.5,v 1.32 2010/09/25 19:54:02 okan Exp $
+.\" $OpenBSD: cwmrc.5,v 1.33 2010/09/25 20:04:55 okan Exp $
.\"
.\" Copyright (c) 2004,2005 Marius Aamodt Eriksen <marius@monkey.org>
.\"
@@ -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
diff --git a/xevents.c b/xevents.c
index 02de6bf..1ff1b58 100644
--- a/xevents.c
+++ b/xevents.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: xevents.c,v 1.49 2009/12/15 04:10:42 okan Exp $
+ * $Id: xevents.c,v 1.50 2010/09/25 20:04:55 okan Exp $
*/
/*
@@ -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);
}