Skip to content

Draft: BUG: 440540 Fix Toggle Raise and Lower in presence of Keep Above windows on the same desktop - v2

Jarek Janik requested to merge yaro/kwin:toggleRaiseLower_bugfix into Plasma/5.27

Fix BUG: 440540, this is a solution I consider superior to e6f53d93. User experience is better and the patch is leaner and not scattered over several places. However it extends API of KWin::Workspace class, which breaks its ABI - and ABI of libkwin.so as an effect (but I don't think this is a problem, everything must be compiled from the same source anyway (?)).

Commit message:

Checking if a window is top-most is now limited to the same layer
windows only (i.e. the window that is top-most within its own layer is
"good enough" to be lowered by "Toggle raise and lower" action).

This approach is even better than the original implementation, because
in that implementation - in the presence of windows in higher layers -
windows that were already top-most within its own layer needed to be
"promoted" to quasi top-most state (by means of assigning them to
most_recently_raised field) when "Toggle raise and lower" was triggered
first time; this "promotion" was visually a no-op and user needed to
trigger "Toggle raise and lower" action again to make that window
actually get lowered. This quirky behaviour is eliminated with this
patch.
Edited by Méven Car

Merge request reports