[XProto] Fix crash when using VNC session
When running under a VNC session, the connection setup data sometimes has duplicated depths, like so: depth=24: visuals={123,456} depth=24: visuals={789} Previously, we were searching for the unique depth that matches the root depth, then searching for the visual within the list corresponding to that depth. However, since the depths may not be unique, search through all depths until we find a matching visual ID, and then use that to set both the default depth and default visual. R=sky Change-Id: I51f75260f584f85f2bdc93048e6c4848cf00997a Fixes: 1121438, 1115929 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2375888Reviewed-by:Scott Violet <sky@chromium.org> Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Auto-Submit: Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/heads/master@{#802371}
Showing
Please register or sign in to comment