Update overlay bounds before entering fullscreen to always enter fullscreen on correct monitor#45
Merged
SnosMe merged 4 commits intoSnosMe:masterfrom Aug 25, 2025
Conversation
…screen on correct monitor
SnosMe
reviewed
Aug 23, 2025
Owner
|
published |
This was referenced Aug 25, 2025
Open
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 #44, also just realised this may fix #16, not sure if this is the exact scenario mentioned in that issue though.
When target is in fullscreen (or windowed fullscreen on linux) the attach event will make overlay fullscreen then update the bounds. If the overlay starts on second monitor this will cause overlay to fullscreen on second monitor, and the bound adjustment afterwards does nothing. This probably only happens when second monitor is on the left, as I assume electron window defaults to
x: 0, y: 0, which would be on the leftmost monitor.First, in attach event handler, update
this.targetBoundsbeforehandleFullscreen, then inhandleFullscreenupdate bounds before entering fullscreen to guarantee overlay is on the same monitor as target.