[libbluray-devel] remove focused windows from KeyboardFocusManager in J2SE toolkit shutdown

hpi1 git at videolan.org
Thu Apr 11 18:03:12 CEST 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Apr 11 18:58:07 2013 +0300| [2d07cf2a37732498e9a8b636ce6120caa5299241] | committer: hpi1

remove focused windows from KeyboardFocusManager in J2SE toolkit shutdown

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=2d07cf2a37732498e9a8b636ce6120caa5299241
---

 src/libbluray/bdj/java-j2se/java/awt/BDToolkit.java |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/libbluray/bdj/java-j2se/java/awt/BDToolkit.java b/src/libbluray/bdj/java-j2se/java/awt/BDToolkit.java
index 27fb0f3..b71dfc7 100644
--- a/src/libbluray/bdj/java-j2se/java/awt/BDToolkit.java
+++ b/src/libbluray/bdj/java-j2se/java/awt/BDToolkit.java
@@ -64,7 +64,16 @@ public class BDToolkit extends Toolkit implements KeyboardFocusManagerPeerProvid
             BDJHelper.stopEventQueue(eventQueue);
             eventQueue = null;
         }
+
+        KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();
+        KeyboardFocusManager.getCurrentKeyboardFocusManager().setGlobalCurrentFocusCycleRoot(null);
+        KeyboardFocusManager.getCurrentKeyboardFocusManager().setGlobalFocusedWindow(null);
+        KeyboardFocusManager.getCurrentKeyboardFocusManager().setGlobalActiveWindow(null);
+        KeyboardFocusManager.getCurrentKeyboardFocusManager().setGlobalPermanentFocusOwner(null);
+
         BDKeyboardFocusManagerPeer.shutdown();
+
+        KeyboardFocusManager.setCurrentKeyboardFocusManager(null);
     }
 
     public static void setFocusedWindow(Window window) {



More information about the libbluray-devel mailing list