Re: [dwm] Keyboard focus stolen by a client in non-visible tag

From: Donald Bruce Stewart <>
Date: Fri, 22 Jun 2007 10:35:27 +1000

> >Message: 1
> >Date: Thu, 21 Jun 2007 11:18:11 +0200
> >From: Antoni Grzymala <>
> >Subject: [dwm] Keyboard focus stolen by a client in non-visible tag.
> >To:
> >Message-ID: <>
> >Content-Type: text/plain; charset="us-ascii"
> >
> >Hi people,
> >
> >I've this problem:
> >
> >I launch URL's with middle clicking them in rxvt-unicode, they get
> >launched in Opera via opera -newtab %s. What happens is that keyboard
> >focus gets stolen (I get an empty cursor) and I have to refocus my
> >terminal window to get it back.
> >
> >Is there a sensible way to make sure that clients in non-visible tags do
> >not steal keyboard focus?
> >
> >Best,
> >
> >[a]
> >
> I also have this problem. If I go to a tag, run pidgin, then go back to
> the tag I was previously on, and pidgin is set to stay on the tag I
> launched it on (in this case 3), then pidgin has the tendency to steal
> my focus even though dwm thinks it's on the window in tag 1. Which
> results in me having to re-focus the window I want to be on in tag 1.
> It's quite annoying :) I'll help in any way I can!

Separate tags, iirc, are still implemented in dwm by moving clients off
screen. This means they're still in normal state, and such clients,
for all they know, are still on the screen, and able to grab focus
freely. Which they do.

One solution is to unmap and set iconified clients on hidden tags. This
avoids things like pidgin or flash stealing focus, but it also
complicates the code, as you have races, and issues, distinguishing
different unmap events.

We did get enough complaints about flash stealing focus on hidden
workspaces to actually implement this scheme in xmonad. Seems to work.
See bug #16,

wmii also does this, iirc.

-- Don
Received on Fri Jun 22 2007 - 02:35:33 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:44:52 UTC