Created attachment 4735
Patch (against Xfwm4 version 4.10) To Retain Focus When Lowering Windows
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  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  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).
 My initial post about this on Xfce mailing list:
 KDE bug report 'Lower Window function makes window lose focus':
Created attachment 4736
Screenshot showing new option
-- GitLab Migration Automatic Message --
This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfwm4/-/issues/98.
Please create an account or use an existing account on one of our supported OAuth providers.
If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests
Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev