Bug 365685 - "keep below" windows dive below plasmashell (sometimes)
Summary: "keep below" windows dive below plasmashell (sometimes)
Status: RESOLVED DUPLICATE of bug 350826
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-14 16:59 UTC by enslaver
Modified: 2016-07-15 13:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
rule (167 bytes, text/plain)
2016-07-14 20:25 UTC, enslaver
Details
could be important! the bug comes back after i change the order under kwin rules. (42.12 KB, image/png)
2016-07-15 09:09 UTC, enslaver
Details

Note You need to log in before you can comment on or make changes to this bug.
Description enslaver 2016-07-14 16:59:18 UTC
Ticking "keep below" moves a window under plasmashell SOMETIMES!
Sure, it doesn't say below what, but i assume it's below other open windows?!
It's not only kde specific apps, but any application with Qt.WindowStaysOnBottomHint/Qt::WindowStaysOnBottomHint flag.
I can't tell if it's kwin/plasmashell/intel/gl or wayland bug, sorry if this is the wrong place for this bug.

software versions:
up to date fedora 23
kwin 5.6.5

* happens with/without effects enabled.
* happens on all engines (raster,egl,glx).
* happens on both, kwin & kwin_x11 wrapper



Reproducible: Sometimes

Steps to Reproduce:
1. make a quick qt/qml app with "Qt.WindowStaysOnBottomHint" in it
or
1. open dolphin, tick "keep below" on it's titlebar
2. click somewhere on plasmashell, click back to application's titlebar
3. repeat...



Actual Results:  
"keep below" marked window dives below plasmashell sometimes

Expected Results:  
"keep below" marked window should always be above plasmashell
Comment 1 Thomas Lübking 2016-07-14 19:30:16 UTC
smells related to bug #350826

open a konsole, set it to keep above ( ;-) and try to cause this. when it happens, run "xprop _NET_WM_WINDOW_TYPE" and click the desktop, see whether it says "_NET_WM_WINDOW_TYPE_DESKTOP"
Comment 2 enslaver 2016-07-14 19:35:48 UTC
yup...
$ _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
Comment 3 Thomas Lübking 2016-07-14 19:45:31 UTC
I assume it's when keep below windows are lost (otherwise the value is expectable)
Can you create a kwin rule (kcmshell5 kwinrules) that enforces plasmashell to be of desktop type; then try to re-cause the problem.

If not, the problem will be caused by kwin updating the layer for the window (typically when showing the desktop, but there may be other occasions) and the window having the wrong type at that moment.

You can also try to run "xprop -spy _NET_WM_WINDOW_TYPE" on the desktop and see whether there's noise right when the window gets lost.

Last (just in case the above fails), did you already ensure it's really because the keep below window drops in the stack, ie. withdrawing the state with wmctrl re-raises it?
Comment 4 enslaver 2016-07-14 20:16:57 UTC
same happens when i enforce plasmashell being a desktop type.


ok, xprop -spy was kinda noisy when focusing between window and plasmashell

"_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
_NET_WM_WINDOW_TYPE(ATOM) = _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP"

basicly the pattern is pretty random. those "skipping" bits are when a window is sliding behind plasmashell

about "wmctrl": well i can't "re-raise" it, if i click on other window (e.g. konsole to type in wmctrl), the "keep below window" will appear. i can only keep it behind the plasmashell if i don't focus on other (any???) window.
Comment 5 Thomas Lübking 2016-07-14 20:21:29 UTC
Hummm... it all points that direction, still.
Could you please export and attach the rule you created?
Comment 6 enslaver 2016-07-14 20:25:55 UTC
Created attachment 100105 [details]
rule

sure
Comment 7 Thomas Lübking 2016-07-14 20:32:42 UTC
> types=2

Revisit the match page - it matches the type ;-)
Just ensure to match desktop, override and normal windows so the rule will actually apply.
Comment 8 enslaver 2016-07-14 20:42:07 UTC
i can "force" window type as desktop under `appearance and fixes` tab only, and it doesn't change anything.
Comment 9 Thomas Lübking 2016-07-14 20:51:59 UTC
On the first tab, the window matching (ie. which windows to apply this rule to) can be configured and that's probably too sharp because of the selected type, ie. the rule isn't applied to the window because it actually only forces desktop type windows to be of desktop type (ie. does nothing)

You need to ensure that normal and override type windows are caught as well.
Comment 10 enslaver 2016-07-14 20:55:20 UTC
can you make a rule please? i just want to be sure it's correct, i don't have "override" for example :(
Comment 11 Thomas Lübking 2016-07-14 21:27:58 UTC
No, sorry
I've abandoned KDE few months ago and only help out on bugs (since my experience didn't drop off me - and actually I wanted to and should have quit bugs.kde.org on July 1st...)


Just edit the rule and on the very first tab ensure to select all window type **except docks and dialogs** - that should do.

See this screenshot of the relevant page.
https://userbase.kde.org/images.userbase/thumb/2/20/Window-matching-init.png/560px-Window-matching-init.png

The thing should not be called "unmanaged window" ... (it's not) but again: you do NOT want to match dialogs and docks.
Comment 12 enslaver 2016-07-14 21:39:22 UTC
sorry, i'm an idiot. i had to close and reopen window after i've made the changes.
yea, it seems to fix it.

the random xprop messages
"_NET_WM_WINDOW_TYPE(ATOM) = _KDE_NET_WM_WINDOW_TYPE_OVERRIDE, _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DESKTOP
"
are still there, but i can atleast go back to my workflow now! thanks, Thomas ;)
Comment 13 Thomas Lübking 2016-07-14 22:12:33 UTC
Thanks for the update.
From the report, it doesn't seem that you're trying to show the desktop, but this happens when simply clicking (activating) the desktop?

*** This bug has been marked as a duplicate of bug 350826 ***
Comment 14 enslaver 2016-07-15 08:14:17 UTC
yup, it happens when clicking empty spot somewhere on plasmashell and focusing back to a "keep below" window.
Comment 15 enslaver 2016-07-15 09:09:48 UTC
Created attachment 100110 [details]
could be important! the bug comes back after i change the order under kwin rules.
Comment 16 Thomas Lübking 2016-07-15 13:11:43 UTC
This re-reads and re-applies the rules. Did you alter the match patterns (for otherwise you were "lucky" to have the rules applied when the desktop was set "desktop" and now ran into the override setting)