Skip to content
Commit 49cc50e6 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


(cherry picked from commit e17c6b5a)
parent 536f880c
Pipeline #382819 passed with stage
in 1 minute and 41 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment