Steps to reproduce: 1. Open a fresh KDE session. 2. Open Okular as a standard window (not fullscreen). 3. Open Kwrite. 4. Make Kwrite window full-screen. 5. Open a new window in Kwrite (not fullscreen). 6. From the second (not fullscreen) window, try to switch to Okular. Expected behaviour: Okular window should come to foreground. What happens: Okular window stays invisible behind the open windows of Kwrite.
Created attachment 109564 [details] demonstration (webm)
Is this on X11 or Wayland?
X11
Very well. We have a general issue on Wayland to activate a window if an X11 window is fullscreen. So I hope that is the same root issue.
I investigated the issue and found a potential issue. In the case you created the two kwrite windows are belonging to the same group. Due to that the non fullscreen window is put into the active fullscreen layer. Normally when a fullscreen window loses activation it goes back to the normal layer. From what it looks like the problem here is that a non-fullscreen window is in the active fullscreen layer. So any check for fullscreen just bails out.
Git commit 87ebfd15179d7c136d840ebdc9f8ebfc3ab83687 by Martin Flöser. Committed on 06/01/2018 at 09:45. Pushed by graesslin into branch 'master'. [autotests] Add test case for fullscreen window with groups When an X11 window is raised to fullscreen it gets set to active layer. When another window gets activated then it goes back to normal layer. But when a window of the same group gets activated the fullscreen window stays in the active layer. Due to that it is not possible to raise other windows above the fullscreen window. This just adds a test case exposing the problematic area. M +74 -0 autotests/integration/x11_client_test.cpp https://commits.kde.org/kwin/87ebfd15179d7c136d840ebdc9f8ebfc3ab83687
Possible patch at https://phabricator.kde.org/D9699
Git commit b7ad4bcf881cdc184375a0c5b64e2dd625e30344 by Martin Flöser. Committed on 10/01/2018 at 16:44. Pushed by graesslin into branch 'master'. Keep fullscreen windows in active layer based on transients not the group Summary: So far a not-active fullscreen X11 window was kept in the active layer if the newly activated window is in the same group (that is same client leader). For example a fullscreen X11 kwrite window is in the active layer if another kwrite window is active. The two kwrite windows obviously don't have anything to do with each other, but are in the same group. This creates problems as it's not possible to raise other windows above the active not-fullscreen kwrite window. E.g. the panel is stacked below. The idea behind the check makes sense: if a fullscreen window opens another window (e.g. a configuration dialog) it should not be put back to normal layer. Thus the check is adjusted whether the new active window is a transient to the fullscreen window. Thus the intention is still the same, but does not cause the problems. As the code now does not need to differentiate between X11 and Wayland windows (group only on X11) the Client specific implementation is removed and the method unvirtual'ed. FIXED-IN: 5.12.0 Test Plan: Test passes Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #plasma Differential Revision: https://phabricator.kde.org/D9699 M +1 -1 abstract_client.cpp M +1 -1 abstract_client.h M +4 -1 autotests/integration/x11_client_test.cpp M +0 -1 client.h M +0 -15 layers.cpp https://commits.kde.org/kwin/b7ad4bcf881cdc184375a0c5b64e2dd625e30344