Bug 482903 - Separate screen focus not working
Summary: Separate screen focus not working
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: core (other bugs)
Version First Reported In: 6.0.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
: 483622 483893 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-03-08 18:19 UTC by harle-quin
Modified: 2024-03-27 11:31 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description harle-quin 2024-03-08 18:19:54 UTC
SUMMARY
The 'Active screen follows mouse cursor' option has been removed from settings, but the internal default value is true (see kwin/src/kwin.kcfg). When activeMouseScreen==true separateScreenFocus does not work, so there should be some safeguard to ensure that activeMouseScreen is false when the user sets separateScreenFocus to true.


STEPS TO REPRODUCE
1. In settings -> Window Behavior -> Focus - check 'Separate screen focus'
2. In settings -> Shortcuts -> KWin - configure shortcut for 'Switch to Next Screen'
3. Use previously configures shortcut

OBSERVED RESULT
There will be a message that switching screen is not possible, because of configuration, but this configuration can't be changed anymore (activeMouseScreen).

EXPECTED RESULT
Focus should be switch to other monitor.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
Comment 1 fanzhuyifan 2024-03-18 23:14:40 UTC
*** Bug 483893 has been marked as a duplicate of this bug. ***
Comment 2 fanzhuyifan 2024-03-18 23:14:45 UTC
*** Bug 483622 has been marked as a duplicate of this bug. ***
Comment 3 Muthanna 2024-03-19 10:05:23 UTC
For anyone looking for a temporary workaround, you can edit your $HOME/.config/kwinrc manually, find the [Windows] section, and add this line to it:
activeMouseScreen=true

Then log out and back in.

Thanks to harle-quin for mentioning the flag name in the OP :)
Comment 4 Emanuele 2024-03-26 11:10:11 UTC
I have tried to add the key activeMouseScreen=true in the section [Windows] of file ~/.config/kwinrc and restart...without luck.

Operating System: Arch Linux 
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.1-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 5 Muthanna 2024-03-26 12:42:46 UTC
(In reply to Emanuele from comment #4)
> I have tried to add the key activeMouseScreen=true in the section [Windows]
> of file ~/.config/kwinrc and restart...without luck.

Make sure both SeparateScreenFocus and activeMouseScreen are set to true.
Comment 6 Emanuele 2024-03-26 14:10:01 UTC
(In reply to Muthanna from comment #5)
> (In reply to Emanuele from comment #4)
> > I have tried to add the key activeMouseScreen=true in the section [Windows]
> > of file ~/.config/kwinrc and restart...without luck.
> 
> Make sure both SeparateScreenFocus and activeMouseScreen are set to true.

https://ibb.co/jzcW9Q3

Sorry, I don't know how to post (if it's allowed) image...I have set both keys (see image).
Anyway, it's not a problem, I'll wait the fix of the bug...It's not too important one for me.

Thanks!
Comment 7 Muthanna 2024-03-26 14:30:29 UTC
(In reply to Emanuele from comment #6)
> Sorry, I don't know how to post (if it's allowed) image...I have set both
> keys (see image).

I'm sorry, my previous comment (#3) was incorrect: the line you should add is ActiveMouseScreen=false, not true (and make sure the A is capitalised). I just retested it after toggling this to true (doesn't work) then false again (which works).
Comment 8 moisesnp 2024-03-26 19:48:16 UTC
(In reply to Muthanna from comment #7)
> (In reply to Emanuele from comment #6)
> > Sorry, I don't know how to post (if it's allowed) image...I have set both
> > keys (see image).
> 
> I'm sorry, my previous comment (#3) was incorrect: the line you should add
> is ActiveMouseScreen=false, not true (and make sure the A is capitalised). I
> just retested it after toggling this to true (doesn't work) then false again
> (which works).

Thanks, it works :D
Comment 9 Emanuele 2024-03-27 11:31:44 UTC
> I'm sorry, my previous comment (#3) was incorrect: the line you should add
> is ActiveMouseScreen=false, not true (and make sure the A is capitalised). I
> just retested it after toggling this to true (doesn't work) then false again
> (which works).

I also confirm, with ActiveMouseScreen=false it works! Thanks!!