Replace fullscreen cloak with transition snapshot - #1224
Closed
MarceloAlejandroJorquera wants to merge 1 commit into
Closed
Replace fullscreen cloak with transition snapshot#1224MarceloAlejandroJorquera wants to merge 1 commit into
MarceloAlejandroJorquera wants to merge 1 commit into
Conversation
Owner
|
It works, but now the transition process is taking longer on my 4K resolution. |
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.
Summary
Replaces the
DWMWA_CLOAKworkaround used during fullscreen transitions with a temporary owned layered snapshot.The previous fullscreen fix kept the main MPC-BE window logically visible while its layout was completed, preventing stale-frame and upper-left video quadrant artifacts. However, cloaking the real player window can expose the desktop or other windows underneath during the transition.
This change preserves the working fullscreen layout behavior without cloaking the player.
Implementation
On Windows 8 and later, the fullscreen transition now:
MoveVideoWindow()path unchanged;Windows 7 and earlier retain the existing path.
No separate renderer geometry or fullscreen video-sizing logic is introduced.
Reason
Hiding the real player window interferes with the normal child-window layout timing and can reproduce the upper-left video quadrant artifact.
DWMWA_CLOAKavoids that layout problem by keeping the HWND logically visible, but because the real window is removed from DWM presentation, content behind MPC-BE can become visible during the transition.The temporary layered snapshot provides the required presentation isolation while allowing the real player window and its children to complete their normal layout.
Only the existing player area is captured. Any additional area required by the target fullscreen/windowed rectangle remains black, so desktop content outside MPC-BE is not captured into the transition surface.
Testing
Tested locally with repeated fullscreen/windowed transitions using:
The existing stale/corrupt-frame and upper-left video quadrant fixes remain effective, while the desktop/background exposure caused by fullscreen cloaking is avoided.
This change only replaces the cloak used by the fullscreen transition; unrelated uses of
DWMWA_CLOAKelsewhere are intentionally outside the scope of this PR.