fix: disable pillarboxing when display screen is in portrait orientation#1450
Open
CodingDozent wants to merge 1 commit intoOpenBoard-org:masterfrom
Open
fix: disable pillarboxing when display screen is in portrait orientation#1450CodingDozent wants to merge 1 commit intoOpenBoard-org:masterfrom
CodingDozent wants to merge 1 commit intoOpenBoard-org:masterfrom
Conversation
In boardViewResized(), setBoxing() was called with the geometry of mDisplayView regardless of its orientation. When mDisplayView is a portrait monitor, this incorrectly pillarboxes the control view. Skip boxing when the display screen is in portrait orientation.
Author
|
As an addition to this fix, I'd like to propose a feature request: it would be very helpful to have an explicit role assignment for monitors in the preferences, e.g.:
Thank You for Your time. Yours Frederik |
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.
Fixes #1180
Problem
When using a mixed portrait/landscape multi-monitor setup, the control view is incorrectly pillarboxed to match the width of a portrait display screen, cropping the usable drawing area.
In
boardViewResized(),setBoxing()is called with the geometry ofmDisplayView. If that screen is portrait (e.g. 1080×1920) while the control screen is landscape (1920×1080), the boxing logic crops the control view to the portrait width — which is clearly unintended.Root cause
Boxing is conceptually only meaningful for
ScreenRole::Displaywhen it mirrors content to students at a different aspect ratio. ThePreviousscreens serve a different purpose — they simply scale and show previous pages for the teacher. Their geometry should never influence the control view's usable area.This worked correctly before 1.7.0, where monitors were used as-is without boxing. The feature introduced in 1.7.0 improved the standard two-screen setup but inadvertently broke more complex configurations that previously worked fine. Making boxing configurable per screen role would restore this flexibility for complex setups.
Context
This issue was reported by a teacher using OpenBoard for online classes since 2020. The four-monitor setup is purposeful: one landscape monitor for the video conferencing tool, one landscape monitor as the OpenBoard control view, and two portrait monitors showing previous pages for reference during class. The portrait orientation is not accidental — DIN A4 material displayed on a 22" portrait monitor appears larger than a physical A4 sheet, making it ideal for multi-page exercises during online teaching.
This setup worked flawlessly until a monitor replacement changed the Windows display initialization order, causing a portrait monitor to land on
ScreenRole::Displayand triggering the boxing regression while ignoring their actual order in the setup.As discussed with @kaamui in #1180, the gray borders should not appear when portrait monitors are used as previous-page screens. This PR implements the fix for that specific case.
Fix
Skip boxing when the display screen is portrait:
This is intentionally minimal and does not affect standard landscape setups.
Analyzed on
Note: The fix has been verified by code analysis with AI assistance. A compiled test was not possible without a build environment.