Bug 467996 - 5.27 reversed screen order for "Window to Next / Previous" Screen
Summary: 5.27 reversed screen order for "Window to Next / Previous" Screen
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Natalie Clarius
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2023-03-31 10:36 UTC by hasezoey
Modified: 2023-05-18 23:53 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27.6


Attachments
Screenshot of display configuration (62.12 KB, image/png)
2023-04-05 09:05 UTC, hasezoey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hasezoey 2023-03-31 10:36:07 UTC
SUMMARY
Today i updated from 5.26 to 5.27(.3) and noticed that the screen order for "Window to Next / Previous Screen" are reversed.

STEPS TO REPRODUCE
1. be on KDE 5.26 and have ~3 displays, where the center is the primary and a display on each side (left and right)
2. enable Shortcuts "Kwin -> Window to Next / Previous Screen"
3. move a window with the "Window to Next Screen" button, observe the window going to the RIGHT
4. move a window with the "Window to Previous Screen" button, observe the window going to the LEFT
5. upgrade to KDE 5.27
6. move a window with the "Window to Next Screen" button, observe the window going to the LEFT
7. move a window with the "Window to Previous Screen" button, observe the window going to the RIGHT

OBSERVED RESULT
The order / behavior reversed

EXPECTED RESULT
The order / behavior should not have changed

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 5.27.3
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.8-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX Vega
Manufacturer: ASUS

ADDITIONAL INFORMATION
I have also tried to change "Display -> Change Screen Priorities" but it did not seem to affect anything

also, i dont know if this is related, but sometimes when changing the shortcut, anything other than the default shortcut (if enabled) does not work / respond
Comment 1 Nate Graham 2023-04-04 18:39:07 UTC
Natalie, am I remembering correctly that this is something you were touching recently?
Comment 2 Natalie Clarius 2023-04-04 23:55:06 UTC
Yes.

What I suspect is happening is that the screens don't have their center on the same horizontal line (e.g. they are different sizes but aligned at the edges), in which case the screen considered to be the next is the one further bottom. Screen priority settings do not affect this behavior, since 5.27 it goes top to bottom, left to right. I'll try to come up with a solution to better handle this scenario.

Could you please  
- share a screenshot of your display configuration  
- tell me if the "Window one Screen to the Left"/"Right" shortcuts work as expected?
Comment 3 Natalie Clarius 2023-04-04 23:56:13 UTC
> also, i dont know if this is related, but sometimes when changing the shortcut, anything other than the default shortcut (if enabled) does not work / respond

This sounds like a different bug; could you please file this one separately? Thanks!
Comment 4 hasezoey 2023-04-05 09:05:37 UTC
Created attachment 157864 [details]
Screenshot of display configuration

Added a screenshot of the display configuration, it is also the same configuration it was in KDE 5.26

also, yes "Window One Screen to the Right / Left" work as expected (from center, left moves to the "Samsung" display, and right to the "Dell" display)
Comment 5 Natalie Clarius 2023-04-05 09:59:06 UTC
Thanks, I'll submit a fix.
Comment 6 mdcclxv 2023-04-15 12:39:54 UTC
@Natalie: I have the same issue. My two cents: give us the possibility to configure the order of the screens. I was also expecting that the "Screen Priorities" setting would do just that. So what's the purpose of that setting then? As far as I can tell it has no effect whatsoever anywhere in the system.
Comment 7 mdcclxv 2023-04-15 15:09:49 UTC
I just ran a short poll with four of my colleagues. How would they see the "Move to Next" functionality on a 2x2 screen setup. So, three of them would see as normal a clockwise sequence, while the fourth one would see it as book reading order. Add me to the clockwise order. My point here is that with an automatic behavior you will not offer a good experience for everyone. Allowing manual configuration is the be(a)st.
Comment 8 Natalie Clarius 2023-04-25 13:35:09 UTC
>  I was also expecting that the "Screen Priorities" setting would do just that. So what's the purpose of that setting then? 

It is explained in the question mark on that setting.

The order of the screens for previous/next should work the same as the order of virtual desktops, which there are analogous shortcuts for: top to bottom, left to right. If you want more precise control, you can use the "to the left/right/top/bottom" shortcuts instead.
Comment 9 mdcclxv 2023-04-25 13:46:55 UTC
(In reply to Natalie Clarius from comment #8)
> >  I was also expecting that the "Screen Priorities" setting would do just that. So what's the purpose of that setting then? 
> 
> It is explained in the question mark on that setting.
Problematic, but I don't want to steal the thread, so I'm giving up on this.

> 
> The order of the screens for previous/next should work the same as the order
> of virtual desktops, which there are analogous shortcuts for: top to bottom,
> left to right. If you want more precise control, you can use the "to the
> left/right/top/bottom" shortcuts instead.

You do realize that it is waaay more comfortable to always press the same single key two or three times than deciding to press various keys depending on the desired outcome. Would it really be so hard to expose the display order number to the user? They already have that internally, so why not giving access to it?
Comment 10 Natalie Clarius 2023-04-25 14:01:58 UTC
> Would it really be so hard to expose the display order number to the user? 

Yes. And for such a niche feature, where people use three or more screens *and* do not want them ordered top to bottom/left to right *and* want to use keyboard shortcuts to move between them *and* do not want to use the directional shortcuts which are specifically for this purpose *and* would bother finding, understanding and using such a setting, it is not worth it.
Comment 11 mdcclxv 2023-04-25 14:07:12 UTC
(In reply to Natalie Clarius from comment #10)
> > Would it really be so hard to expose the display order number to the user? 
> 
> Yes. And for such a niche feature, where people use three or more screens
> *and* do not want them ordered top to bottom/left to right *and* want to use
> keyboard shortcuts to move between them *and* do not want to use the
> directional shortcuts which are specifically for this purpose *and* would
> bother finding, understanding and using such a setting, it is not worth it.

Wow!!

Three or more display is not niche at all nowadays, wake up to reality. I'm glad to see, again, an open minded attitude in the KDE dev world. You guys never disappoint.
Comment 12 Nate Graham 2023-04-25 14:11:17 UTC
We are getting off-topic regarding the original bug report. Let's keep the conversation on that topic please. Also let's try to avoid being bitter and spiteful, which makes developers *less* likely to do what you're asking, not more. Thanks.
Comment 13 Bug Janitor Service 2023-04-25 14:42:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4024
Comment 14 Vlad Zahorodnii 2023-05-16 07:54:12 UTC
Git commit 9a3da098999fee9f40f8b3a233011c27cd414ef7 by Vlad Zahorodnii, on behalf of Natalie Clarius.
Committed on 16/05/2023 at 07:54.
Pushed by vladz into branch 'master'.

Refine order of previous/next screens in Workspace::findOutput

A screen should be considered further top, and therefore more previous, only it is strictly above the other with no vertical overlap, and not if only the vertical center is higher while they are horizontally on a line. Otherwise, on a left to right setup with screens of different resolutions aligned at the edges (and thus different vertical centesr), the order will be unintuitive.
FIXED-IN: 5.27

M  +3    -1    src/workspace.cpp

https://invent.kde.org/plasma/kwin/commit/9a3da098999fee9f40f8b3a233011c27cd414ef7
Comment 15 Vlad Zahorodnii 2023-05-16 08:12:32 UTC
Git commit 736d90787b43697beb50e922fb8d3e8a7682329a by Vlad Zahorodnii, on behalf of Natalie Clarius.
Committed on 16/05/2023 at 07:57.
Pushed by vladz into branch 'Plasma/5.27'.

Refine order of previous/next screens in Workspace::findOutput

A screen should be considered further top, and therefore more previous, only it is strictly above the other with no vertical overlap, and not if only the vertical center is higher while they are horizontally on a line. Otherwise, on a left to right setup with screens of different resolutions aligned at the edges (and thus different vertical centesr), the order will be unintuitive.
FIXED-IN: 5.27


(cherry picked from commit 9a3da098999fee9f40f8b3a233011c27cd414ef7)

M  +3    -1    src/workspace.cpp

https://invent.kde.org/plasma/kwin/commit/736d90787b43697beb50e922fb8d3e8a7682329a