mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-5655 java/awt/Toolkit/Wayland/WaylandToolkit.java: WLToolkit not found
WLToolkit made operational in headless mode
(cherry picked from commit 5679e134a7)
This commit is contained in:
@@ -150,13 +150,15 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
return null;
|
||||
});
|
||||
|
||||
Thread toolkitThread = new Thread(this, "AWT-Wayland");
|
||||
toolkitThread.setDaemon(true);
|
||||
toolkitThread.start();
|
||||
if (!GraphicsEnvironment.isHeadless()) {
|
||||
Thread toolkitThread = new Thread(this, "AWT-Wayland");
|
||||
toolkitThread.setDaemon(true);
|
||||
toolkitThread.start();
|
||||
|
||||
final Thread toolkitSystemThread = new Thread(this::dispatchNonDefaultQueues, "AWT-Wayland-system-dispatcher");
|
||||
toolkitSystemThread.setDaemon(true);
|
||||
toolkitSystemThread.start();
|
||||
final Thread toolkitSystemThread = new Thread(this::dispatchNonDefaultQueues, "AWT-Wayland-system-dispatcher");
|
||||
toolkitSystemThread.setDaemon(true);
|
||||
toolkitSystemThread.start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,8 +34,11 @@ public class WaylandToolkit {
|
||||
|
||||
public static void main(String args[]) {
|
||||
Toolkit tk = Toolkit.getDefaultToolkit();
|
||||
if (!"sun.awt.wl.WLToolkit".equals(tk.getClass().getName())) {
|
||||
throw new RuntimeException("WLToolkit not found");
|
||||
System.out.println("Toolkit.getDefaultToolkit(): " + tk);
|
||||
if (!GraphicsEnvironment.isHeadless()) {
|
||||
if (!"sun.awt.wl.WLToolkit".equals(tk.getClass().getName())) {
|
||||
throw new RuntimeException("WLToolkit not found");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user