aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-01-06 19:40:12 +0100
committerSven Gothel <[email protected]>2020-01-06 19:40:12 +0100
commit557f3d57cc2ca60678fe87df4b4a9c99c016e575 (patch)
treeeb91aac531fb2aa5b5b806efe26839d8a22b4b24 /src/newt/classes
parent141fa0fba0f47851f20acfcb078e11659ebc74cc (diff)
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())
Diffstat (limited to 'src/newt/classes')
-rw-r--r--src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java8
1 files changed, 6 insertions, 2 deletions
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