[libbluray-devel] BDRootWindow: cancel timer when disposed
hpi1
git at videolan.org
Sat Mar 30 01:39:08 CET 2013
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sun Mar 17 10:22:46 2013 +0200| [8c661ad5dd1c4900c9a4374d9024c1ca8c27ed7b] | committer: hpi1
BDRootWindow: cancel timer when disposed
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=8c661ad5dd1c4900c9a4374d9024c1ca8c27ed7b
---
src/libbluray/bdj/java/java/awt/BDRootWindow.java | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/libbluray/bdj/java/java/awt/BDRootWindow.java b/src/libbluray/bdj/java/java/awt/BDRootWindow.java
index 3d94a99..1fa8274 100644
--- a/src/libbluray/bdj/java/java/awt/BDRootWindow.java
+++ b/src/libbluray/bdj/java/java/awt/BDRootWindow.java
@@ -133,6 +133,25 @@ public class BDRootWindow extends Frame {
private int changeCount;
}
+ public void dispose()
+ {
+ if (isVisible()) {
+ hide();
+ }
+ if (timerTask != null) {
+ timerTask.cancel();
+ timerTask = null;
+ }
+ if (timer != null) {
+ timer.cancel();
+ timer = null;
+ }
+
+ BDToolkit.setFocusedWindow(null);
+
+ super.dispose();
+ }
+
private int[] backBuffer = null;
private Rectangle dirty = new Rectangle();
private int changeCount = 0;
More information about the libbluray-devel
mailing list