diff options
author | Sven Gothel <[email protected]> | 2020-01-05 23:02:55 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-01-05 23:02:55 +0100 |
commit | 8caf3fab68dc890855961d22cb235d1c8f5c52c6 (patch) | |
tree | d074f8d2a16557f1bd6963efddac0ca5dd37e9da /src/nativewindow/classes | |
parent | 1216aa7bc4284e5568d7dd7bbd7f6d9fed27d25b (diff) |
Bug 1358: GLCanvas: Call new OSXUtil.SetWindowPixelScale(..) when GLCanvas gets realized on MacOS
This fixes GLCanvas's High-DPI scaled size issue on MacOS of Bug 1358.
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r-- | src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java index e847279e1..e06a68953 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java +++ b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java @@ -150,6 +150,11 @@ public class OSXUtil implements ToolkitProperties { return 1.0f; // default } } + public static void SetWindowPixelScale(final long windowOrView, final float reqPixelScale) { + if( 0 != windowOrView ) { + SetWindowPixelScale1(windowOrView, reqPixelScale); + } + } public static long CreateNSWindow(final int x, final int y, final int width, final int height) { final long res[] = { 0 }; @@ -436,6 +441,7 @@ public class OSXUtil implements ToolkitProperties { private static native float GetScreenPixelScale1(int displayID); private static native float GetScreenPixelScale2(long windowOrView); private static native float GetWindowPixelScale1(long windowOrView); + private static native void SetWindowPixelScale1(final long windowOrView, final float reqPixelScale); private static native long CreateNSWindow0(int x, int y, int width, int height); private static native void DestroyNSWindow0(long nsWindow); private static native long GetNSView0(long nsWindow); |