From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- external/rhino/rhino1_5R5-updateToolTip.patch | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 external/rhino/rhino1_5R5-updateToolTip.patch (limited to 'external/rhino/rhino1_5R5-updateToolTip.patch') diff --git a/external/rhino/rhino1_5R5-updateToolTip.patch b/external/rhino/rhino1_5R5-updateToolTip.patch new file mode 100644 index 000000000..be0700daf --- /dev/null +++ b/external/rhino/rhino1_5R5-updateToolTip.patch @@ -0,0 +1,23 @@ +--- misc/rhino1_5R5/toolsrc/org/mozilla/javascript/tools/debugger/Main.java Wed Feb 23 10:25:09 2011 ++++ misc/build/rhino1_5R5/toolsrc/org/mozilla/javascript/tools/debugger/Main.java Wed Feb 23 10:25:01 2011 +@@ -1045,9 +1045,18 @@ + } ); + } + ++ // Fix taken from ++ // toolsrc/org/mozilla/javascript/tools/debugger/SwingGui.java: + private void updateToolTip() { +- // in case fileName is very long, try to set tool tip on frame +- Component c = getComponent(1); ++ // Try to set tool tip on frame. On macOS 10.5, ++ // the number of components is different, so try to be safe. ++ int n = getComponentCount() - 1; ++ if (n > 1) { ++ n = 1; ++ } else if (n < 0) { ++ return; ++ } ++ Component c = getComponent(n); + // this will work at least for Metal L&F + if (c != null && c instanceof JComponent) { + ((JComponent)c).setToolTipText(getUrl()); -- cgit v1.2.3