Repository navigation
fix: mac: fix coordinate conversion for secondary display in fullscreen - #55159
Open
VishalBhat07 wants to merge 1 commit into
Open
VishalBhat07 wants to merge 1 commit into
VishalBhat07 wants to merge 1 commit into
Conversation
Fix SetBounds, GetBounds, and GetNormalBounds to use the window's screen ([window_ screen]) instead of always using the primary screen ([[NSScreen screens] firstObject]) for coordinate conversion. This fixes a bug where clicking a -webkit-app-region: no-drag element inside a drag region on a secondary display in fullscreen mode would generate stray pointermove events with incorrect coordinates (offset by the secondary display's position relative to the primary), causing clicks to be lost and drags to start incorrectly. Fixes electron#40599
Contributor
|
For more information on signing commits, see GitHub's documentation on Telling Git about your signing key. |
This branch has not been deployed
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.
Description of Change
Fix coordinate conversion for secondary displays in fullscreen mode on macOS.
Three methods in
native_window_mac.mm(SetBounds,GetBounds,GetNormalBounds) used the primary screen ([[NSScreen screens] firstObject]) for coordinate conversion instead of the window's actual screen ([window_ screen]). This caused incorrect coordinates when the window was on a secondary display in fullscreen mode.Checklist
npm run lint:js)Release Notes
Fixes #40599: Clicking a
-webkit-app-region: no-dragelement inside a drag region on a secondary display in fullscreen mode now works correctly. Previously, straypointermoveevents with incorrect coordinates were generated, causing clicks to be lost and drags to start incorrectly.