Skip to content
Commit e17c6b5a authored by Harald Sitter's avatar Harald Sitter 🍌
Browse files

xrandr: always try to update primary

When screen0 gets disconnected the atom essentially says it is priority
1 but we ignore it on account of being disconnected/disabled (this
happens inside priority()). This caused setPriority to exit early and
not do anything. Upon plugging screen0 back in the atom comes into play
again and it is still saying the screen is priority 1, but really
another screen was/is priority 1. What happens then is that since the
atom says the screen is priority1 == newpriority == noop.

tldr:

- screen0 disconnect: priority=0 == newPrirority=0 -> noop
- screen1: priority=2 != newPriority=1 -> set_primary
- screen0 reconnect: priority=1 == newPriority=1 -> noop
- screen1 is now primary but the entire kscreen system thinks it should
be screen0

to solve this problem simply update the primary regardless of the
property change, at worst this is noop on the xcb side of things, at
best we ensure the primary is in sync

CCBUG: 465396
parent 485fffb9
Loading
Loading
Loading
Pipeline #382812 passed with stage
in 1 minute and 26 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment