From 557f3d57cc2ca60678fe87df4b4a9c99c016e575 Mon Sep 17 00:00:00 2001 From: Sven Gothel <sgothel@jausoft.com> Date: Mon, 6 Jan 2020 19:40:12 +0100 Subject: Bug 1358: Merely simplifying the non MacOS getClientAreaInPixels() code path This also demonstrates that on non MacOS, SWT's scale-factor is artificially imposed on the actual pixel-units, as SWT's getClientArea() is simply returning: DPIUtil.autoScaleDown(getClientAreaInPixels()) --- src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/newt/classes') diff --git a/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java index 35458b9cc..c4b27a451 100644 --- a/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java +++ b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java @@ -256,8 +256,12 @@ public class NewtCanvasSWT extends Canvas implements NativeWindowHolder, WindowC return r; } private Rectangle getClientArea2InPixels() { - // SWTAccessor.getClientAreaInPixels(this); - return DPIUtil.autoScaleUp(getClientArea2()); + if( SWTAccessor.isOSX ) { + return DPIUtil.autoScaleUp(getClientArea2()); + } else { + // Essentially the same as: DPIUtil.autoScaleUp(getClientArea()) + return SWTAccessor.getClientAreaInPixels(this); + } } @Override -- cgit v1.2.3