Bug 445454

Summary: programs usually open on a different screen
Product: [Plasma] kwin Reporter: David Chmelik <dchmelik>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.23.2   
Target Milestone: ---   
Platform: Slackware   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screenshot
screenshot

Description David Chmelik 2021-11-14 01:53:44 UTC
SUMMARY
If you have two or (like I have) three or more screens, programs usually open on a different screen.

STEPS TO REPRODUCE
1. Select a screen with the left mouse button.
2. Use that screen's menu to open a program.
3. Probably see it open on a random screen.

OBSERVED RESULT
Program often open on a screen other than I selected/started it on, not always even the primary display (which might be expected) but a totally random screen.  KDE programs are particularly bad at this.  Other programs like non-KDE IRC, web browsers, text editors, usually opened on the primary display, don't tend to do this.  It's usually that I open konsole on the right-hand screen and dolphin on the upper screen but they usually open on a random screen, sometimes my main/left-hand one or the top one.

EXPECTED RESULT
Open programs on the same screen as beforehand selected and as the menu that opened them.  If someone moves the mouse to another screen before it starts, I don't know if that must change it or if people could be given an option.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.23.2
KDE Plasma Version: Slackware64-current / 5.23.2
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.3
Comment 1 Nate Graham 2021-11-23 18:51:35 UTC
In System Settings > Window Management > Window Behavior, what is the setting for where to open apps for multi-screen setups set to?
Comment 2 David Chmelik 2021-11-28 00:35:10 UTC
Just default 'click to focus;' maybe I should set it to something else, but I don't understand what some of the options mean...
Comment 3 Nate Graham 2021-11-29 20:16:54 UTC
"Click to focus" is not the default upstream in KDE anymore. It was changed to "active screen follows cursor" a year or two ago. Maybe Slackware hardcodes the old default setting or something? Either way, you can get what you want by switching it over to the new default.
Comment 4 David Chmelik 2022-05-12 21:18:07 UTC
Seems only options are 'click to focus,' 'click to focus (mouse precedence,)' 'focus follows mouse,' 'focus follows mouse (mouse precedence,') 'focus under mouse,' 'focus strictly under mouse.'  Slackware tradition is never change anything upstream unless needed to   work.
Comment 5 David Chmelik 2022-05-12 21:20:36 UTC
I see 'system settings->-window management->window behavior->focus, titlebar actions, window actions, movement, advanced, no mention of 'multi-screen setup.'
Comment 6 Nate Graham 2022-05-13 15:57:22 UTC
It's on the Focus tab. So:

"System Settings" app > "Window Management" group > "Window Behavior" page > "Focus" tab > make sure the "Active screen follows mouse" checkbox is checked.

That checkbox will only appear when you actually have more than one screen plugged in. So make sure you do when you go looking for the setting.
Comment 7 David Chmelik 2022-05-14 04:09:07 UTC
Created attachment 148818 [details]
screenshot

screenshot
Comment 8 David Chmelik 2022-05-14 04:11:10 UTC
Perhaps I should use forum more(?) because this is probably working but settings weren't updated (Slackware doesn't make their own default  settings but this isn't new KDE installation)... you partly-described two areas of this screen (named differently than you said) so I'm showing you what I have.
Comment 9 David Chmelik 2022-05-14 04:12:01 UTC
Created attachment 148819 [details]
screenshot

screenshot
Comment 10 Nate Graham 2022-05-16 15:48:17 UTC
OK, so you have "Active screen follows mouse" checked. Good.

Does the issue you're experiencing only happen for KDE apps? Does it ever happen for any 3rd-party apps?
Comment 11 David Chmelik 2022-05-19 03:43:01 UTC
I don't think I've seen it happen for a non-KDE program.
Comment 12 Nate Graham 2022-05-19 17:50:52 UTC
Thanks. Can you go to:

"System Settings" app > "Window Management" group > "Window Behavior" page > "Advanced" tab >Uncheck "Allow KDE apps to remember the positions of their windows, if they support it"?

Does that help?
Comment 13 Bug Janitor Service 2022-06-03 04:35:48 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 14 David Chmelik 2022-06-03 12:11:23 UTC
Yes, but options sound opposite if what they should be (as do some others.)  If I open a program then close it (or even have it crash) on a certain screen, I want it to remember it was closed (or crashed) on that screen and open there next time instead of having to go to that screen every time.  I know that the multiple screens are placed together in a way their coordinates are considered part of one larger screen so it should work.  For now it's fine to have to open them on the specific screen I wanted.
Comment 15 Nate Graham 2022-06-03 17:04:22 UTC
Well, you can't have it both ways. :) On X11, KWin can position new windows in the locations they were located in when they were closed (assuming they support this feature), or it can position them on the screen where the cursor is currently located. It can't do both, because those behaviors are mutually exclusive.

Unfortunately, opening windows in the location where they were last closed depends on support from individual apps and only works on X11 (on Wayland, it would work for all apps if KWin gained support for this, but it doesn't support it yet). As a result, the behavior will probably differ based on which programs you use. KDE apps should mostly behave nicely and remember their prior positions, but many 3rd-party apps won't.

So let's narrow this down: which exact apps are opening their windows "on a random screen", as you originally put it?
Comment 16 Bug Janitor Service 2022-06-18 04:35:32 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 17 David Chmelik 2022-07-03 00:42:49 UTC
I guess this works but options sound like doing opposite what they say.  When I fixed it for some, others have problems but it's fewer now, but I'll close this a seem to be enough options.