"Bret S. Lambert" <[email protected]> writes:
> On Mon, Aug 09, 2010 at 09:28:40PM +0200, Christian Neukirchen wrote:
>> Hi,
>>
>> cwm currently warps to all newly mapped windows. I think it would be
>> nice to not warp to windows marked as "ignore" in .cwmrc, so popping
>> windows you are not interested in don't disturb you.
>
> I think your mailer ate your patch.
Whoops, my bad.
diff --git a/xevents.c b/xevents.c
index 9681790..ca0c9db 100644
--- a/xevents.c
+++ b/xevents.c
@@ -77,6 +77,8 @@ xev_handle_maprequest(XEvent *ee)
XMapRequestEvent *e = &ee->xmaprequest;
struct client_ctx *cc = NULL, *old_cc;
XWindowAttributes xattr;
+ struct winmatch *wm;
+ int ignore = 0;
if ((old_cc = client_current()) != NULL)
client_ptrsave(old_cc);
@@ -86,7 +88,15 @@ xev_handle_maprequest(XEvent *ee)
cc = client_new(e->window, screen_fromroot(xattr.root), 1);
}
- client_ptrwarp(cc);
+ TAILQ_FOREACH(wm, &Conf.ignoreq, entry) {
+ if (strncasecmp(wm->title, cc->name, strlen(wm->title)) == 0) {
+ ignore = 1;
+ break;
+ }
+ }
+
+ if (!ignore)
+ client_ptrwarp(cc);
}
static void
--
Christian Neukirchen <[email protected]> http://chneukirchen.org