提交 bf3d2a47 编写于 作者: A ant

8013424: Regression: java.awt.datatransfer.FlavorListeners not notified on Linux/Java 7

Reviewed-by: anthony
上级 355ce649
...@@ -179,6 +179,7 @@ public final class XClipboard extends SunClipboard implements OwnershipListener ...@@ -179,6 +179,7 @@ public final class XClipboard extends SunClipboard implements OwnershipListener
} }
synchronized (XClipboard.classLock) { synchronized (XClipboard.classLock) {
if (targetsAtom2Clipboard != null && !targetsAtom2Clipboard.isEmpty()) { if (targetsAtom2Clipboard != null && !targetsAtom2Clipboard.isEmpty()) {
// The viewer is still registered, schedule next poll.
XToolkit.schedule(this, XClipboard.getPollInterval()); XToolkit.schedule(this, XClipboard.getPollInterval());
} }
} }
...@@ -191,7 +192,8 @@ public final class XClipboard extends SunClipboard implements OwnershipListener ...@@ -191,7 +192,8 @@ public final class XClipboard extends SunClipboard implements OwnershipListener
final XSelectionEvent xse = ev.get_xselection(); final XSelectionEvent xse = ev.get_xselection();
XClipboard clipboard = null; XClipboard clipboard = null;
synchronized (XClipboard.classLock) { 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); XToolkit.removeEventDispatcher(XWindow.getXAWTRootWindow().getWindow(), this);
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册