From e637d918cf49b42101bff232b8f307fcf6428a71 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 5 May 2010 15:21:25 +0200 Subject: Newt X11: Add focus in/out events; Request focus with mouse click --- src/newt/classes/com/jogamp/newt/impl/x11/X11Window.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/newt/classes') diff --git a/src/newt/classes/com/jogamp/newt/impl/x11/X11Window.java b/src/newt/classes/com/jogamp/newt/impl/x11/X11Window.java index 2fa41c62a..e81d89a8c 100755 --- a/src/newt/classes/com/jogamp/newt/impl/x11/X11Window.java +++ b/src/newt/classes/com/jogamp/newt/impl/x11/X11Window.java @@ -211,6 +211,17 @@ public class X11Window extends Window { } } + /** + * @param focusGained + */ + private void focusChanged(boolean focusGained) { + if (focusGained) { + sendWindowEvent(WindowEvent.EVENT_WINDOW_GAINED_FOCUS); + } else { + sendWindowEvent(WindowEvent.EVENT_WINDOW_LOST_FOCUS); + } + } + private void windowCreated(long windowHandle) { this.windowHandle = windowHandle; } -- cgit v1.2.3