Bug 390479 - Wrong stacking order when a window has been moved to another virtual desktop
Summary: Wrong stacking order when a window has been moved to another virtual desktop
Status: RESOLVED DUPLICATE of bug 119323
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 5.12.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-14 20:55 UTC by Vlad Zahorodnii
Modified: 2018-02-16 05:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
bug demonstration (728.06 KB, video/mp4)
2018-02-14 20:56 UTC, Vlad Zahorodnii
Details
expected behaviour (630.89 KB, video/mp4)
2018-02-14 20:58 UTC, Vlad Zahorodnii
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad Zahorodnii 2018-02-14 20:55:14 UTC
Sometimes, when a window has been moved to another virtual desktop, it is below other windows.

Steps to reproduce:
* have a shortcut to send a window to another virtual desktop
* switch to the second virtual desktop, open konsole
* switch back to the first virtual desktop, open konsole
* move konsole to the second virtual desktop by using a shortcut

also, you may have to repeat it several times to reproduce this bug.
Comment 1 Vlad Zahorodnii 2018-02-14 20:56:44 UTC
Created attachment 110670 [details]
bug demonstration

Google Chrome should be above Konsole
Comment 2 Vlad Zahorodnii 2018-02-14 20:58:01 UTC
Created attachment 110672 [details]
expected behaviour

... and sometimes stacking order is fine
Comment 3 Vlad Zahorodnii 2018-02-14 21:04:22 UTC
If you can reproduce bug as stated in the first comment, try to maximize konsole on the second virtual desktop.
Comment 4 Vlad Zahorodnii 2018-02-14 21:04:56 UTC
(In reply to Vlad Zagorodniy from comment #3)
> If you can reproduce bug as stated in the first comment, try to maximize
> konsole on the second virtual desktop.

can't
Comment 5 Martin Flöser 2018-02-15 05:21:35 UTC
The stacking order in KWin is global and not per virtual desktop. Sending a window to another desktop does not affect the stacking order. It still has the same position. If it is behind another window the reason is it was already behind it before sending.
Comment 6 Nate Graham 2018-02-15 05:52:44 UTC
Does that match the user expectation, though, or the developer expectation?
Comment 7 Vlad Zahorodnii 2018-02-15 08:32:58 UTC
(In reply to Nate Graham from comment #6)
> Does that match the user expectation, ...?

Definitely not!

(In reply to Martin Flöser from comment #5)
> The stacking order in KWin is global and not per virtual desktop.

I've "always" been wondering why KWin has a global stacking order. Is there a reason why it should be global? (I'm just curious)

> Sending a window to another desktop does not affect the stacking order.

Is it on purpose?
Comment 8 Martin Flöser 2018-02-15 16:41:23 UTC
(In reply to Nate Graham from comment #6)
> Does that match the user expectation, though, or the developer expectation?

This is due to the fact how X11 works. On X11 there is one global stacking order. Not much one can do about that. Virtual desktops are just a concept which hides certain windows.

Changing this would require a fair amount of rework and I doubt this has any priority the next years especially given that there is a high risk of breakage.
Comment 9 Nate Graham 2018-02-15 16:42:28 UTC
Is the situation better on Wayland?
Comment 10 Martin Flöser 2018-02-16 05:26:14 UTC

*** This bug has been marked as a duplicate of bug 119323 ***