The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
1

Prevent new windows/popups from stealing focus

asked Sep 11 '12

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! :-)

2 answers

Sort by » oldest newest most voted
2

answered Sep 11 '12

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…

Comments

Will this patch fix this issue? http://cr.i3wm.org/patch/534

Stephen gravatar imageStephen (May 26 '14)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 (Dec 13 '14)edit
0

answered Sep 11 '12

joepd gravatar image

updated Sep 11 '12

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.

Question Tools

Stats

Asked: Sep 11 '12

Seen: 1,549 times

Last updated: Sep 11 '12