Merge pull request #17703 from bruvzg/fix_retina_drag

[macOS] Fix dragging window from non-retina to retina display.
This commit is contained in:
Rémi Verschelde 2018-03-23 10:05:01 +01:00 committed by GitHub
commit ff2cb002d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -263,6 +263,7 @@ static Vector2 get_mouse_pos(NSEvent *event) {
NSWindow *window = (NSWindow *)[notification object]; NSWindow *window = (NSWindow *)[notification object];
CGFloat newBackingScaleFactor = [window backingScaleFactor]; CGFloat newBackingScaleFactor = [window backingScaleFactor];
CGFloat oldBackingScaleFactor = [[[notification userInfo] objectForKey:@"NSBackingPropertyOldScaleFactorKey"] doubleValue]; CGFloat oldBackingScaleFactor = [[[notification userInfo] objectForKey:@"NSBackingPropertyOldScaleFactorKey"] doubleValue];
[OS_OSX::singleton->window_view setWantsBestResolutionOpenGLSurface:YES];
if (newBackingScaleFactor != oldBackingScaleFactor) { if (newBackingScaleFactor != oldBackingScaleFactor) {
//Set new display scale and window size //Set new display scale and window size