28

In XFce4, when I launch applications, I don't want them to appear above the windows I am currently using, or to show alert windows above my current work. Rather, I'd like the windows to load in the background and to not steal focus. The exception would be an alert window or dialog belonging to the application I'm using, e.g. if I am currently using LibreOffice Calc, and it gives me a pop-up to tell me an error, that window can be brought to focus.

Is there any way to prevent windows from stealing focus in Xfce4?

3

6 Answers 6

18

Settings/Window Manager/Focus

  • Focus follows mouse (on) [shouldn't matter, but the focus stealing prevention setting seems to work better with this on]

  • Automatically give Focus to newly created windows (off)

Also

Settings/Window Manager Tweaks/Focus

  • Activate Focus Stealing Prevention (on)
  • Honor standard ICCCM focus hint (off)
  • When a window raises itself, (do nothing)
2
  • 6
    Xfce 4.12, does not work for all applications (e.g. NetBeans IDE 8.1), will steal focus (even when clicking in this window after splashscreen, it will just gain focus again later).
    – Yeti
    Sep 15, 2016 at 6:52
  • 5
    Does not work for Intellij Idea either.
    – Klesun
    Mar 12, 2018 at 13:11
6

Settings manager >> window manager >> focus tab. Uncheck automatically give focus

2
  • 5
    Xfce 4.10: this does not work for me, I even activated focus stealing prevention in advanced settings.
    – hochl
    Apr 10, 2015 at 19:09
  • 3
    Doesn't work for me either. XFCE 4.12 Oct 17, 2015 at 0:08
3

For me, Xfce's focus stealing prevention only works when you also have Focus Follows Mouse turned on.

Running Xfce 4.10.1

1
  • 2
    I cannot confirm this
    – phil294
    Oct 13, 2018 at 19:41
2

If nothing from previous answers helped you, you must additionally go to Settings-> Window Manager Tweaks -> Accessiblity tab and unselect "Raise windows when any mouse button is pressed"

1

Disabling these prevented focus changes in a Xubuntu session on

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.10
Release:    19.10
Codename:   eoan

Xfconf Settings Editor

Settings, Window Manager should set the same:

Window Manager Settings

3
0

In case you're using Compiz settings manager I was able to get focus to all new windows launched by setting (from the ccsm menu) General Options> Focus & Raise Behaviour>Focus Prevention Windows to Off

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .