Bug in DisplayManager::UpdateDisplaysWith() may result in removing an existing display even though it was never removed. |
||
Issue description
DisplayManager::UpdateDisplaysWith() sorts the existing and new displays using the least significant 8-bits of the display IDs [1].
But the loop that compares the existing and new display info to determine which displays are added and which ones are removed uses the full display IDs, in particular this branch is wrong: `else if (curr_iter->id() < new_info_iter->id()) {` [2].
In practice I found this to happen while switching to docked mode. The external display is removed then re-added unnecessarily.
[1]: https://cs.chromium.org/chromium/src/ui/display/manager/display_manager.cc?q=DisplayManager::UpdateDisplaysWith&g=0&l=909-912
[2]: https://cs.chromium.org/chromium/src/ui/display/manager/display_manager.cc?q=DisplayManager::UpdateDisplaysWith&g=0&l=1012
,
Jan 19
(4 days ago)
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Jan 17 (6 days ago)