Add Focus Retention Option For Window Lowering
Submitted by Bill Marr
Assigned to Olivier Fourdan @olivier
Description
Created attachment 4735 Patch (against Xfwm4 version 4.10) To Retain Focus When Lowering Windows
Short Description:
The attached patch adds a simple checkbutton widget to the 'Focus' tab of the 'Window Manager Tweaks' dialog. It allows control of the focus retention policy when lowering a window (i.e. moving it to the bottom of the Z-order).
The attached screenshot shows the new option as the last one on the 'Focus' tab of the 'Window Manager Tweaks' dialog.
Background and Justification:
Prior to my first use of Xfce in Sep 2009, all the X11 window managers I'd used for any meaningful duration behaved the same way with respect to the functionality addressed by this patch. That is to say, when a window was lowered in the Z-order, it retained input focus. This included about 8 years of initially using the Motif Window Manager (a.k.a. 'mwm') and then about 10 years using KDE 3.x. (Note, as can be seen by the thread in reference [2] below, KDE's behavior changed sometime in the 4.x series to work like Xfce does -- i.e. to switch focus away from the lowered window.)
In over 20 years of X11 use, I've become very dependent on that behavior and was quite surprised, as described in reference [1] below, to see that Xfce's window manager took focus away from the lowered window.
The attached patch simply gives the user the option to retain window input focus, making Xfwm4 behave like older window managers (mwm, kwin 3.x) and like some current window managers (Fluxbox, and probably a few others I haven't tested).
Further References:
[1] My initial post about this on Xfce mailing list:
http://mail.xfce.org/pipermail/xfce/2012-March/030021.html
[2] KDE bug report 'Lower Window function makes window lose focus':
https://bugs.kde.org/show_bug.cgi?id=255052
Patch 4735, "Patch (against Xfwm4 version 4.10) To Retain Focus When Lowering Windows":
retain-focus-on-lower.patch
Version: 4.10.0