From 6c9eedf03a196d8718ddccbb47c0166c7c6267b8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 15 Jan 2020 04:58:24 +0100 Subject: Bug 1421: NEWT OSX Invisible: Refine 'Fake invisible child window' off-viewport position Ensure it stays out of sight by moving it to 2x width/height of viewport. Otherwise one could see the child window moving from lower-right to upper-left ;-) --- src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java index 76bb52cd7..68a315390 100644 --- a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java @@ -484,9 +484,10 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl public void run() { if( useParent && 0 == ( STATE_MASK_VISIBLE & flags) ) { // Fake invisible child window: We can't use true orderOut + // Ensure it stays out of sight by moving it to 2x width/height of viewport. final RectangleImmutable r = getScreen().getViewportInWindowUnits(); setWindowClientTopLeftPointAndSize0(oldWindowHandle, - r.getX()+r.getWidth(), r.getY()+r.getHeight(), + r.getX()+2*r.getWidth(), r.getY()+2*r.getHeight(), width, height, false /* no display */); } else { // Normal visibility -- cgit v1.2.3