changeset 7249:8472c148688c

8013424: Regression: java.awt.datatransfer.FlavorListeners not notified on Linux/Java 7 Reviewed-by: anthony
author ant
date Thu, 30 May 2013 18:23:21 +0400
parents 768fcc36182a
children 56512cfccef9
files src/solaris/classes/sun/awt/X11/XClipboard.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/classes/sun/awt/X11/XClipboard.java	Thu May 30 18:10:26 2013 +0400
+++ b/src/solaris/classes/sun/awt/X11/XClipboard.java	Thu May 30 18:23:21 2013 +0400
@@ -179,6 +179,7 @@
             }
             synchronized (XClipboard.classLock) {
                 if (targetsAtom2Clipboard != null && !targetsAtom2Clipboard.isEmpty()) {
+                    // The viewer is still registered, schedule next poll.
                     XToolkit.schedule(this, XClipboard.getPollInterval());
                 }
             }
@@ -191,7 +192,8 @@
                 final XSelectionEvent xse = ev.get_xselection();
                 XClipboard clipboard = null;
                 synchronized (XClipboard.classLock) {
-                    if (targetsAtom2Clipboard != null && !targetsAtom2Clipboard.isEmpty()) {
+                    if (targetsAtom2Clipboard != null && targetsAtom2Clipboard.isEmpty()) {
+                        // The viewer was unregistered, remove the dispatcher.
                         XToolkit.removeEventDispatcher(XWindow.getXAWTRootWindow().getWindow(), this);
                         return;
                     }