Closing window returns focus to incorrect last window when Raise on click is off
Submitted by ano..@..il.com
Assigned to Olivier Fourdan @olivier
Description
Steps to reproduce:
- Turn of Raise on Click in the Xfce 4 Settings Manager's Window Manager group (under Focus tab), and Turn on Compositor (Window Manager Tweaks group).
- Open a Mousepad.
- Open a Thunar.
- Open a Calculator.
- Position these three windows so Mousepad is at bottom, Thunar above that, and Calculator on top of them all. If they all overlap slightly, it's even better demo of bug.
- Click Calculator title bar to ensure it has focus and is on top.
- Click inside Thunar to give focus, as if you're working on it, but do not bring to top.
- Click inside Mousepad to give focus, as if you're working on it, but do not bring to top.
- Do some writing in Mousepad.
- In Mousepad: Ctrl-f (or menu Search-->Find...).
- Press "Esc" key, or Cancel, or even correctly find some text. BUG: Calculator now has the focus! I would expect Mousepad to have focus since that was what I was working with.
Also note: Bring Calc to top, click inside Thunar, click inside Mousepad. Exit Mousepad. BUG: Calculator has focus.
Also note: Same behaviors if windows do not overlap.
== more info on workflow/context below ==
With the compositor running, and with Raise on click turned off: I have two windows I'm working with (e.g. two Thunar windows or one term and one GEdit). I use Ctrl-o to open a file in Gedit to work on. When the file-open dialog goes away, focus is set to the terminal, not the one I was last at (Gedit).
That is, it seems that the Window focus order is missing the last-focused window in certain circumstances when Raise on click is off. It seems that clicking within a window to change focus does not add that new window to top of the last-focused list. So, when a new window closes, an older window gets the focus instead of the true last one.
With Raise-on-click off, I want focus returned to the last one that had focus, even if that last one was not on top (i.e. below the others in z-order).
Version: 4.6.1