Bug 119323 - Per-desktop stacking order
Summary: Per-desktop stacking order
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 390479 (view as bug list)
Depends on:
Blocks: 171454
  Show dependency treegraph
 
Reported: 2005-12-31 23:00 UTC by Mats Ahlgren
Modified: 2018-02-16 05:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mats Ahlgren 2005-12-31 23:00:12 UTC
Version:            (using KDE KDE 3.4.3)
Installed from:    Ubuntu Packages

Situation:
I have a terminal which I keep on all of my desktops. When I switch between desktops (e.g. Desktop 1 to Desktop 2), the terminal won't be as I left it; instead it will do any one of these things:

1- It was previously below a window in Desktop 2, now it is above all windows.
2- It was previously above a window in Desktop 2, now it is below all windows. (I think?)
3- The terminal is now above all windows, but out-of-focus -- really weird.
4- Perhaps the terminal might even switch orders within a set of windows.
5- Etc. -- I haven't checked all possibilities...

This odd behavior seems to be influenced by whether the window was in or out of focus in Desktop A, and perhaps might even be influenced by the z-index of the window in Desktop A (if KDE uses such a system).

I'm guessing this stems from the problem that window focus behavior is undefined when a window is on multiple desktops and the user switches between desktops.

It seems the proper behavior would be such:
Windows on multiple desktops have desktop-specific positioning: i.e. if the window stack is: Firefox | Terminal | AmaroK on Desktop B, then nomatter where Terminal is in Desktop A, it will stay sandwiched between Firefox and AmaroK on Desktop B.

(( This seems to me to be good default behavior. If the develops wish to, however, do anything else fancy (which I suggest against doing), this seems to be the only way to go about doing anything 'fancy':

It seems the only way to ensure sane behavior in keeping window positioning is to do this:
Add a new option to "window-specific options": "Keep window positioning between desktops (not recommended)."

It works as so (illustrative example):
When you switch desktops from A->B->C->D quickly in succession (no more than 1 second intervals between each switch), KDE looks at the top window of Desktop A. If this window has the above window-specific option set to true, then it will temporarily appear on top in all desktops which contain the window in the switch chain. However, then the user finally pauses the switching at Desktop D, the window will revert to its desktop-specific position in intermediate desktops in the switching chain (if those desktops contain said window), while on Desktop D its position will permanently remain on top. Note this introduces a race condition. There's lot of rationale behind this: you don't want switching through desktops to inadvertently mess up window order, you want to avoid the current KDE buggy behavior which is why you bring said window directly to the top instead of keeping the z-index constant or however KDE is doing it, etc. ))
Comment 1 Martin Flöser 2018-02-16 05:26:14 UTC
*** Bug 390479 has been marked as a duplicate of this bug. ***