fix: no black area around the window over a remote desktop #7

Merged
kua-agent merged 1 commits from fix/mmd-pdf-remote-desktop-black-area-20260828 into main 2026-08-28 06:56:02 +00:00
Member

Ben saw the window drawn only in its top-left corner with the rest flat black, over the browser remote desktop, and the taskbar preview showed the same shape - so the black was the application, not the viewer.

Cause: WPF composites on the GPU, and in a remote-desktop session the surface it is handed is not repainted when the desktop is resized, leaving everything outside the original size black.

Fix: when Windows reports a remote session, draw in software. Costs nothing at this size and keeps the whole window painted. Wrapped so a rendering hint can never stop the app starting.

Built and launched on the Windows test VM: 0 errors, app renders correctly.

Ben saw the window drawn only in its top-left corner with the rest flat black, over the browser remote desktop, and the taskbar preview showed the same shape - so the black was the application, not the viewer. Cause: WPF composites on the GPU, and in a remote-desktop session the surface it is handed is not repainted when the desktop is resized, leaving everything outside the original size black. Fix: when Windows reports a remote session, draw in software. Costs nothing at this size and keeps the whole window painted. Wrapped so a rendering hint can never stop the app starting. Built and launched on the Windows test VM: 0 errors, app renders correctly.
kua-agent added 1 commit 2026-08-28 06:56:01 +00:00
kua-agent merged commit b6f046abdd into main 2026-08-28 06:56:02 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mmd-it/mmd-pdf#7