# HG changeset patch # User Andrew John Hughes # Date 1453339377 0 # Node ID 8554f062d23d3806b894c64ea703bfd93eefa225 # Parent cf929b8fdebc8f4da5c64b7d54412d74373fc17b Add new backports for issues to be fixed in 1.13.10. S7169111, PR2757: Unreadable menu bar with Ambiance theme in GTK L&F S8140620, PR2711: Find and load default.sf2 as the default soundbank on Linux 2016-01-19 Andrew John Hughes * Makefile.am: (ICEDTEA_PATCHES): Add new patches. * NEWS: Updated. * patches/openjdk/7169111-pr2757-unreadable_menu_bar_with_ambiance_theme.patch, * patches/openjdk/8140620-pr2711-find_default.sf2.patch: New backports for issues to be fixed in 1.13.10. diff -r cf929b8fdebc -r 8554f062d23d ChangeLog --- a/ChangeLog Wed Nov 18 03:11:24 2015 +0000 +++ b/ChangeLog Thu Jan 21 01:22:57 2016 +0000 @@ -1,3 +1,12 @@ +2016-01-19 Andrew John Hughes + + * Makefile.am: + (ICEDTEA_PATCHES): Add new patches. + * NEWS: Updated. + * patches/openjdk/7169111-pr2757-unreadable_menu_bar_with_ambiance_theme.patch, + * patches/openjdk/8140620-pr2711-find_default.sf2.patch: + New backports for issues to be fixed in 1.13.10. + 2015-11-17 Andrew John Hughes * NEWS: Add 1.13.10 section. diff -r cf929b8fdebc -r 8554f062d23d Makefile.am --- a/Makefile.am Wed Nov 18 03:11:24 2015 +0000 +++ b/Makefile.am Thu Jan 21 01:22:57 2016 +0000 @@ -639,7 +639,9 @@ patches/openjdk/6763122-no_zipfile_ctor_exception.patch \ patches/openjdk/6599383-pr363-large_zip_files.patch \ patches/openjdk/6929479-pr363-disable_mmap_zip.patch \ - patches/pr2513-layoutengine_reset.patch + patches/pr2513-layoutengine_reset.patch \ + patches/openjdk/7169111-pr2757-unreadable_menu_bar_with_ambiance_theme.patch \ + patches/openjdk/8140620-pr2711-find_default.sf2.patch if WITH_RHINO ICEDTEA_PATCHES += \ diff -r cf929b8fdebc -r 8554f062d23d NEWS --- a/NEWS Wed Nov 18 03:11:24 2015 +0000 +++ b/NEWS Thu Jan 21 01:22:57 2016 +0000 @@ -14,6 +14,10 @@ New in release 1.13.10 (2016-01-XX): +* Backports + - S7169111, PR2757: Unreadable menu bar with Ambiance theme in GTK L&F + - S8140620, PR2711: Find and load default.sf2 as the default soundbank on Linux + New in release 1.13.9 (2015-11-13): * Security fixes diff -r cf929b8fdebc -r 8554f062d23d patches/openjdk/7169111-pr2757-unreadable_menu_bar_with_ambiance_theme.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/7169111-pr2757-unreadable_menu_bar_with_ambiance_theme.patch Thu Jan 21 01:22:57 2016 +0000 @@ -0,0 +1,54 @@ +# HG changeset patch +# User rupashka +# Date 1342090033 -14400 +# Thu Jul 12 14:47:13 2012 +0400 +# Node ID 05c69338ee73c1e454aa632ced5cbc057420b404 +# Parent 0039f5c7fb512e1ec2e22bceb69ee324426a684f +7169111, PR2757: Unreadable menu bar with Ambiance theme in GTK L&F +Reviewed-by: kizune + +diff -r 0039f5c7fb51 -r 05c69338ee73 src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java +--- openjdk/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java Wed Jul 11 16:19:41 2012 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java Thu Jul 12 14:47:13 2012 +0400 +@@ -796,9 +796,10 @@ + "Menu.margin", zeroInsets, + "Menu.cancelMode", "hideMenuTree", + "Menu.alignAcceleratorText", Boolean.FALSE, ++ "Menu.useMenuBarForTopLevelMenus", Boolean.TRUE, + + +- "MenuBar.windowBindings", new Object[] { ++ "MenuBar.windowBindings", new Object[] { + "F10", "takeFocus" }, + "MenuBar.font", new FontLazyValue(Region.MENU_BAR), + +diff -r 0039f5c7fb51 -r 05c69338ee73 src/share/classes/com/sun/java/swing/plaf/gtk/GTKStyleFactory.java +--- openjdk/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKStyleFactory.java Wed Jul 11 16:19:41 2012 -0700 ++++ openjdk/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKStyleFactory.java Thu Jul 12 14:47:13 2012 +0400 +@@ -92,7 +92,13 @@ + boolean defaultCapable = btn.isDefaultCapable(); + key = new ComplexKey(wt, toolButton, defaultCapable); + } ++ } else if (id == Region.MENU) { ++ if (c instanceof JMenu && ((JMenu) c).isTopLevelMenu() && ++ UIManager.getBoolean("Menu.useMenuBarForTopLevelMenus")) { ++ wt = WidgetType.MENU_BAR; ++ } + } ++ + if (key == null) { + // Otherwise, just use the WidgetType as the key. + key = wt; +diff -r 0039f5c7fb51 -r 05c69338ee73 src/share/classes/javax/swing/plaf/synth/SynthMenuUI.java +--- openjdk/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuUI.java Wed Jul 11 16:19:41 2012 -0700 ++++ openjdk/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuUI.java Thu Jul 12 14:47:13 2012 +0400 +@@ -299,7 +299,8 @@ + */ + @Override + public void propertyChange(PropertyChangeEvent e) { +- if (SynthLookAndFeel.shouldUpdateStyle(e)) { ++ if (SynthLookAndFeel.shouldUpdateStyle(e) || ++ (e.getPropertyName().equals("ancestor") && UIManager.getBoolean("Menu.useMenuBarForTopLevelMenus"))) { + updateStyle((JMenu)e.getSource()); + } + } diff -r cf929b8fdebc -r 8554f062d23d patches/openjdk/8140620-pr2711-find_default.sf2.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/8140620-pr2711-find_default.sf2.patch Thu Jan 21 01:22:57 2016 +0000 @@ -0,0 +1,53 @@ +# HG changeset patch +# User omajid +# Date 1445973555 14400 +# Tue Oct 27 15:19:15 2015 -0400 +# Node ID 79e4644bd40482ec3ae557f086137e2869b3f50a +# Parent 09c2cc84d4517af288f26607a39ff0515a05e771 +8140620, PR2711: Find and load default.sf2 as the default soundbank on Linux +Reviewed-by: serb + +diff -r 09c2cc84d451 -r 79e4644bd404 src/share/classes/com/sun/media/sound/SoftSynthesizer.java +--- openjdk/jdk/src/share/classes/com/sun/media/sound/SoftSynthesizer.java Fri Nov 13 05:11:53 2015 +0000 ++++ openjdk/jdk/src/share/classes/com/sun/media/sound/SoftSynthesizer.java Tue Oct 27 15:19:15 2015 -0400 +@@ -668,6 +668,40 @@ + actions.add(new PrivilegedAction() { + public InputStream run() { + if (System.getProperties().getProperty("os.name") ++ .startsWith("Linux")) { ++ ++ File[] systemSoundFontsDir = new File[] { ++ /* Arch, Fedora, Mageia */ ++ new File("/usr/share/soundfonts/"), ++ new File("/usr/local/share/soundfonts/"), ++ /* Debian, Gentoo, OpenSUSE, Ubuntu */ ++ new File("/usr/share/sounds/sf2/"), ++ new File("/usr/local/share/sounds/sf2/"), ++ }; ++ ++ /* ++ * Look for a default.sf2 ++ */ ++ for (File systemSoundFontDir : systemSoundFontsDir) { ++ if (systemSoundFontDir.exists()) { ++ File defaultSoundFont = new File(systemSoundFontDir, "default.sf2"); ++ if (defaultSoundFont.exists()) { ++ try { ++ return new FileInputStream(defaultSoundFont); ++ } catch (IOException e) { ++ // continue with lookup ++ } ++ } ++ } ++ } ++ } ++ return null; ++ } ++ }); ++ ++ actions.add(new PrivilegedAction() { ++ public InputStream run() { ++ if (System.getProperties().getProperty("os.name") + .startsWith("Windows")) { + File gm_dls = new File(System.getenv("SystemRoot") + + "\\system32\\drivers\\gm.dls");