-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bring the greeter on primary screen to the front #1726
base: develop
Are you sure you want to change the base?
Conversation
When there are multiple monitors connected, sddm-greeter creates new views for each screen, and activates the primary one to focus on its password field. However, if the monitors are initially setup to display the same content, different views will overlap with each other. The views created by non-primary screens may be placed on top of the primary view. In such cases, the primary view will be focused but not visible to the user. This is fixed by calling `view->raise` for the primary screen. The primary view should be raised whenever a new screen is added, in order to avoid being covered by the newly created view.
How does one configure X server to reproduce this problem? |
It can be reproduced by connecting two monitors (for example, one builtin and one external) and then start sddm. |
I wonder if it is SDDM's own responsibility to start X server either in duplicated or Xinerama mode? Or maybe even a theme may request that from the daemon? Some themes might be prepared for the Xinerama scenario, for example by drawring only the background on the second screen. |
The SDDM greeter creates views for each screen, and then each view is managed by the theme separately. sddm/src/greeter/GreeterApp.cpp Lines 277 to 283 in 50409a3
I don't know much about Xinerama. If it configures X server in a way that only one screen will be detected by SDDM, a single view will be created. |
Not sure I agree with this - effectively this means whenever a screen is plugged in, the primary screen (essentially random) gets focus. Ideally focus shouldn't change, unless the new screen is the primary one, which is what the code does.
This sounds like the root cause. What about detecting whether a view overlaps anonther one (completely) and then ignoring it? |
Why do we create multiple views when two monitors showing the same content? I think that is the problem. |
In the case that all monitors have the same geometry, sharing would be possible, but in any other case it's not. To make it consistent, it's never shared. |
When there are multiple monitors connected, sddm-greeter creates new views for each screen, and activates the primary one to focus on its password field. However, if the monitors are initially setup to display the same content, different views will overlap with each other. The views created by non-primary screens may be placed on top of the primary view. In such cases, the primary view will be focused but not visible to the user.
This is fixed by calling
view->raise
for the primary screen. The primary view should be raised whenever a new screen is added, in order to avoid being covered by the newly created view.Fixes: #612 #514