Comment 4 for bug 1459671

Revision history for this message
Guilherme Quentel Melo (gqmelo) wrote : Re: focus goes to the wrong window after a modal dialog is closed

I did some other tests using "Always on Top" feature.

1 - Open Gimp on multi window mode
2 - Open a terminal
3 - Set the terminal as always on top
4 - Go back to Gimp and press Ctrl + O (Open dialog)
5 - Press Esc

Now focus goes sometimes to Gimp main window, but keep doing opening and closing the dialog and eventually it always goes to the "always on top" terminal.

1 - Open Gimp on multi window mode
2 - Open two dock windows (if you there is none already)
3 - Let's say you have Layers and Toolbox windows open. Move the Toolbox over the Layers window.
4 - Click on the main window.
5 - Press Ctrl + O (Open dialog)
6 - Press Esc

Focus goes to the Toolbox window

7 - Move the Layers window over the Toolbox window, so it gets on front of it.
8 - Click on the main window.
9 - Press Ctrl + O (Open dialog)
10 - Press Esc

Focus goes to the Layers window.

So, considering all the tests I made, it seems that when you close any window, the window manager chooses to focus the most on top window even if this window is from another application, which is hardly ever the expected result. I would expect to always focus on the last window.