The i3 FAQ has migrated to All content here is read-only.
Ask Your Question

Prevent new windows/popups from stealing focus

asked 2012-09-11 07:46:03 +0000

Richard gravatar image

Is it possible to prevent new windows or pop ups from stealing focus in i3 like it is possible for KDE as described here?

For instance, I would like to continue working in the current program even if a new window pops up (for example a notification message for an incoming IM message). Please note, I don't want to deactivate the pop up itself, just the focus stealing.

Thanks! :-)

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2012-09-11 09:39:27 +0000

Michael gravatar image

I’ve thought about this before. There’s multiple things to note here:

  1. Any X11 client (= application which connects to the X11 server) can use the SetInputFocus request and set focus to whereever it wants.
  2. Modern X11 clients rather send a _NET_ACTIVE_WINDOW ClientMessage to the window manager to make it set focus. i3 used to not implement these at all, but we do now.

So the only thing i3 can do is allow to adjust whether _NET_ACTIVE_WINDOW messages are honored (currently not possible). This doesn’t solve the focus-stealing problem entirely, though.

One hackish workaround I’ve come up with is to use an X11 proxy which would filter out SetInputFocus calls from certain applications…

edit flag offensive delete link more


Will this patch fix this issue?

Stephen gravatar imageStephen ( 2014-05-26 04:45:52 +0000 )edit

@Stephen - I see that this already has been merged. From which version should it be working, and does it require an option to be set? I've had problems with windows stealing focus (mostly IntelliJ) for a long time, but I still haven't found a way to prevent it.

Tiddo gravatar imageTiddo ( 2014-12-13 09:45:05 +0000 )edit

answered 2012-09-11 08:02:11 +0000

joepd gravatar image

updated 2012-09-11 08:04:49 +0000

I think it is safe to say that i3 will not provide for a graphical configuration interface for programs that are not part of i3.

I've never had a notification stealing focus. i3 just obeys the Xorg-flags that a new window requests, so you need to look into your notification application. Maybe it is user configurable somewhere, maybe it is a bug.

Edit: Here are some of the notification systems in use by i3-users.

edit flag offensive delete link more

Question Tools


Asked: 2012-09-11 07:46:03 +0000

Seen: 1,549 times

Last updated: Sep 11 '12