Discussion:
[i3-discuss] Preventing focus
Jeff Abrahamson
2018-07-16 06:49:48 UTC
Permalink
Is there a way to request i3 to ignore focus requests from a specific
window (or process)?

The context is the image viewer geeqie, which I drive from other
programs to aid in certain image automation tasks.  It's taken to
focusing itself when asked to load an image (probably via
gtk_widget_grab_focus() based on scanning its code, but I'm not sure how
to verify that besides a long-ish gdb session).  If I could simply tell
i3 to ignore that request, that would be faster than adapting geeqie or
another program to do what I want.
--
Jeff Abrahamson
+33 6 24 40 01 57
+44 7920 594 255

http://p27.eu/jeff/
Ingo Bürk
2018-07-16 06:59:26 UTC
Permalink
Hi,

assuming it's an activation request, you can use
focus_on_window_activation[1].
However, this is global and not per-window. There's also no_focus (which
is per-window), but this only applies to newly mapped windows which I
understand isn't your case.

[1] https://i3wm.org/docs/userguide.html#focus_on_window_activation


Regards
Ingo
Post by Jeff Abrahamson
Is there a way to request i3 to ignore focus requests from a specific
window (or process)?
The context is the image viewer geeqie, which I drive from other
programs to aid in certain image automation tasks.  It's taken to
focusing itself when asked to load an image (probably via
gtk_widget_grab_focus() based on scanning its code, but I'm not sure how
to verify that besides a long-ish gdb session).  If I could simply tell
i3 to ignore that request, that would be faster than adapting geeqie or
another program to do what I want.
Jeff Abrahamson
2018-07-16 07:07:57 UTC
Permalink
Thanks, Ingo.  I hadn't thought of that, but it's a good option and it
solves the immediate issue.  So far I can't think of instances where I
don't want the "urgent" setting anyway, so this may work out doubly well.

Jeff
Post by Ingo Bürk
Hi,
assuming it's an activation request, you can use
focus_on_window_activation[1].
However, this is global and not per-window. There's also no_focus (which
is per-window), but this only applies to newly mapped windows which I
understand isn't your case.
[1] https://i3wm.org/docs/userguide.html#focus_on_window_activation
Regards
Ingo
Post by Jeff Abrahamson
Is there a way to request i3 to ignore focus requests from a specific
window (or process)?
The context is the image viewer geeqie, which I drive from other
programs to aid in certain image automation tasks.  It's taken to
focusing itself when asked to load an image (probably via
gtk_widget_grab_focus() based on scanning its code, but I'm not sure how
to verify that besides a long-ish gdb session).  If I could simply tell
i3 to ignore that request, that would be faster than adapting geeqie or
another program to do what I want.
--
Jeff Abrahamson
+33 6 24 40 01 57
+44 7920 594 255

http://p27.eu/jeff/
Loading...