JBR-6183 Wayland: clipboard-related exception in headless environment

(cherry picked from commit e302f472f2)
This commit is contained in:
Maxim Kartashev
2023-10-10 11:43:03 +04:00
committed by jbrbot
parent 85a53c56f6
commit ae269279d3

View File

@@ -171,17 +171,18 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
toolkitSystemThread.setDaemon(true);
toolkitSystemThread.start();
// Wait here for all display sync events to have been received?
}
WLClipboard selectionClipboard = null;
try {
selectionClipboard = new WLClipboard("Selection", true);
} catch (UnsupportedOperationException ignored) {
}
WLClipboard selectionClipboard = null;
try {
selectionClipboard = new WLClipboard("Selection", true);
} catch (UnsupportedOperationException ignored) {
clipboard = new WLClipboard("System", false);
selection = selectionClipboard;
} else {
clipboard = null;
selection = null;
}
clipboard = new WLClipboard("System", false);
selection = selectionClipboard;
}
public static boolean isToolkitThread() {