From 124af9f2e30d7941c99d21e086c9837fedd99867 Mon Sep 17 00:00:00 2001 From: Xerxes RĂ„nby Date: Mon, 27 Jul 2015 23:13:10 +0200 Subject: Bug 1178: if overlay is undecorated then make under-lay the same --- .../jogamp/newt/driver/bcm/vc/iv/WindowDriver.java | 15 +++++++-------- .../jogamp/newt/driver/x11/X11UnderlayTracker.java | 6 +++++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java index 29c1bf13d..c971acfad 100644 --- a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java @@ -63,25 +63,24 @@ public class WindowDriver extends WindowImpl { public WindowDriver() { - /* Try use X11 as input for bcm.vc.iv - * if X11 fail to initialize then - * track using the /dev/event files directly - * using the LinuxMouseTracker - */ + /* Try use X11 as input for bcm.vc.iv + * if X11 fail to initialize then + * track using the /dev/event files directly + * using the LinuxMouseTracker + */ try{ x11UnderlayTracker = X11UnderlayTracker.getSingleton(); mouseTracker = x11UnderlayTracker; keyTracker = x11UnderlayTracker; - } catch(ExceptionInInitializerError e){ + } catch(ExceptionInInitializerError e) { linuxMouseTracker = LinuxMouseTracker.getSingleton(); linuxEventDeviceTracker = LinuxEventDeviceTracker.getSingleton(); mouseTracker = linuxMouseTracker; keyTracker = linuxEventDeviceTracker; } - - + layer = -1; nativeWindowHandle = 0; windowHandleClose = 0; diff --git a/src/newt/classes/jogamp/newt/driver/x11/X11UnderlayTracker.java b/src/newt/classes/jogamp/newt/driver/x11/X11UnderlayTracker.java index 3e073a326..db34d9337 100644 --- a/src/newt/classes/jogamp/newt/driver/x11/X11UnderlayTracker.java +++ b/src/newt/classes/jogamp/newt/driver/x11/X11UnderlayTracker.java @@ -202,6 +202,10 @@ public class X11UnderlayTracker implements WindowListener, KeyListener, MouseLis underlayWindow.setTitle(overlayWindow.getTitle()); + if(overlayWindow.isUndecorated()){ + underlayWindow.setUndecorated(true); + } + underlayWindow.addKeyListener(this); underlayWindow.addMouseListener(this); underlayWindow.addWindowListener(this); @@ -247,7 +251,7 @@ public class X11UnderlayTracker implements WindowListener, KeyListener, MouseLis w.setVisible(true); w = NewtFactory.createWindow(caps); - w.setUndecorated(true); + w.setUndecorated(false); w.addWindowListener(X11UnderlayTracker.getSingleton()); w.setTitle("2"); w.setVisible(true); -- cgit v1.2.3