SystemKit: fix framebuffer sizing so single-axis resolution changes a…#540
Open
armm77 wants to merge 1 commit into
Open
SystemKit: fix framebuffer sizing so single-axis resolution changes a…#540armm77 wants to merge 1 commit into
armm77 wants to merge 1 commit into
Conversation
…pply applyDisplayLayout: enlarged the X framebuffer only when BOTH dimensions grew (&&) and shrank it only when one dimension got smaller (||). A change that altered a single axis - e.g. 1400x1050 -> 1680x1050, same height - matched neither branch, so the framebuffer stayed at the old size while a wider CRTC mode was requested. XRRSetCrtcConfig then failed with BadMatch, the mode never took effect, and the display showed a black band on the right (xrandr still reported the old 1400x1050 screen). Grow the framebuffer up front to the per-axis maximum of the current and new sizes so the new mode always fits, then set it to the exact final size after all CRTCs are placed. This preserves the original VirtualBox BadMatch safeguard (the framebuffer is never shrunk below the still-current layout mid-transition) while covering single-axis and mixed grow/shrink changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…pply
applyDisplayLayout: enlarged the X framebuffer only when BOTH dimensions grew (&&) and shrank it only when one dimension got smaller (||). A change that altered a single axis - e.g. 1400x1050 -> 1680x1050, same height - matched neither branch, so the framebuffer stayed at the old size while a wider CRTC mode was requested. XRRSetCrtcConfig then failed with BadMatch, the mode never took effect, and the display showed a black band on the right (xrandr still reported the old 1400x1050 screen).
Grow the framebuffer up front to the per-axis maximum of the current and new sizes so the new mode always fits, then set it to the exact final size after all CRTCs are placed. This preserves the original VirtualBox BadMatch safeguard (the framebuffer is never shrunk below the still-current layout mid-transition) while covering single-axis and mixed grow/shrink changes.