Changeset 14177 in josm for trunk/src/org
- Timestamp:
- 2018-08-22T02:41:48+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r14176 r14177 6 6 import static org.openstreetmap.josm.tools.Utils.getSystemProperty; 7 7 8 import java.awt.AWTError; 8 9 import java.awt.Container; 9 10 import java.awt.Dimension; … … 874 875 args.getSingle(Option.GEOMETRY).orElse(null), 875 876 !args.hasOption(Option.NO_MAXIMIZE) && Config.getPref().getBoolean("gui.maximized", false)); 876 final MainFrame mainFrame = newMainFrame(geometry);877 final MainFrame mainFrame = createMainFrame(geometry); 877 878 final Container contentPane = mainFrame.getContentPane(); 878 879 if (contentPane instanceof JComponent) { … … 1016 1017 Logging.info("Enabled EDT checker, wrongful access to gui from non EDT thread will be printed to console"); 1017 1018 RepaintManager.setCurrentManager(new CheckThreadViolationRepaintManager()); 1019 } 1020 } 1021 1022 private static MainFrame createMainFrame(WindowGeometry geometry) { 1023 try { 1024 return new MainFrame(geometry); 1025 } catch (AWTError e) { 1026 // #12022 #16666 On Debian, Ubuntu and Linux Mint the first AWT toolkit access can fail because of ATK wrapper 1027 // Good news: the error happens after the toolkit initialization so we can just try again and it will work 1028 Logging.error(e); 1029 return new MainFrame(geometry); 1018 1030 } 1019 1031 } -
trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
r14148 r14177 49 49 @Override 50 50 public void preStartupHook() { 51 // See #12022 - Disable GNOME ATK Java wrapper as it causes a lot of serious trouble 52 if ("org.GNOME.Accessibility.AtkWrapper".equals(getSystemProperty("assistive_technologies"))) { 53 System.clearProperty("assistive_technologies"); 51 // See #12022, #16666 - Disable GNOME ATK Java wrapper as it causes a lot of serious trouble 52 if (isDebianOrUbuntu()) { 53 if (Utils.getJavaVersion() >= 9) { 54 // TODO: find a way to disable ATK wrapper on Java >= 9 55 // We should probably be able to do that by embedding a no-op AccessibilityProvider in our jar 56 // so that it is loaded by ServiceLoader without error 57 // But this require to compile at least one class with Java 9 58 } else { 59 // Java 8 does a simple Class.newInstance() from system classloader 60 Utils.updateSystemProperty("javax.accessibility.assistive_technologies", "java.lang.Object"); 61 } 54 62 } 55 63 }
Note:
See TracChangeset
for help on using the changeset viewer.