When the screen is locked, the focus always remains on the main screen. This patch fixes the problem: now the focus is on the screen where the cursor is located.
BUG: 395639
FIXED-IN: 5.16.0
davidedmundson |
When the screen is locked, the focus always remains on the main screen. This patch fixes the problem: now the focus is on the screen where the cursor is located.
BUG: 395639
FIXED-IN: 5.16.0
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
davidedmundson
we don't want to cursor grab in testing mode, this change is lost yes, did not notice
This is still relevant A cursor can be in none. I think this is superfluous, because the default focus is on the first screen.
why are we changing the window flags? Because with the flag X11BypassWindowManagerHint the focus will not be able to change, so it needs to be removed, change the focus, put flag back.
I rewrited the patch with minimal changes.
abetts
It is easy to reproduce when more than one monitor is connected, you must set the cursor on any monitor except the first one and block the screen with hot keys, after which you will notice that the focus of the password entry remains on the first screen.
This problem may be associated with the bug 395639.
abetts
It is easy to reproduce when more than one monitor is connected, you must set the cursor on any monitor except the first one and block the screen with hot keys, after which you will notice that the focus of the password entry remains on the first screen.
This problem may be associated with the bug 395639.
Thanks for the explanation. Makes sense!
greeter/greeterapp.cpp | ||
---|---|---|
460 | David already said it: we cannot do this. Changing the X11BypassWindowManagerHint flag after the window is created is not supported by X11 protocol! We really, really cannot do this. |
@andreyby, can you adjust this patch to address @davidedmundson and @graesslin's concerns?
Seems better, but I'm not sure I understand exactly.
The key difference here is we have an event filter on mouse clicks and call requestActivate when that happens.
But you said earlier calling requestActivate doesn't do anything.
When we use the X11BypassWindowManagerHint flag with a call to the showFullScreen() function on the x11 platform, requestActivate does not make the desired window active. For correct work, on x11 we have to call the show() function. But when the focus is set on a window different from the main one, we cannot select a window without a focus with the mouse; for this, it is necessary to use mouse click events.
@andreyby, can you let us know your email address so we can land this with correct authorship information? Thanks!