Repository navigation
Keep the assigned monitor when a player is minimized or hidden - #19
Open
Harry3342138 wants to merge 1 commit into
Open
Harry3342138 wants to merge 1 commit into
Harry3342138 wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Minimizing a player such as QQ Music can change its audio output: the minimized window has a tiny/off-screen rectangle, so
FindMainWindowForProcessdrops it and routing may fall back to the system default or another window, such as desktop lyrics.This change retains the last known monitor while the tracked player window is minimized or hidden. Cold-start minimized windows are identified using
GetWindowPlacementand located withMonitorFromWindow. Restored windows still follow normal dragging. Cached handles are checked against their owner, disconnected monitors get a nearest-monitor fallback, and sessions that disappear release their cached state.Validation:
MonitorServiceand fake only the Win32 boundary. The original implementation failed the minimize/hide cases; the patch passes all checks.A window that is already fully hidden to the tray before ScreenSound observes it still has no remembered screen; restoring it once establishes the location.