Open jonathan-teh opened 6 years ago
Thanks Jonathan, closing per your citation of the commit that fixed it.
(yeah, i left it open because strictly i haven't fixed Terminator, but since this bug was specifically about Evergreen, and since fixing Terminator would seem to require removal of a feature that @martindorey uses or persuading Sun^wOracle to fix a Java bug/limitation from ~2007, we're not likely to fix that any time soon, and leaving the bug open had no obvious value. sgtm.)
Having tried it with a shinier Java than I have been using, I think he's talking about my use of translucency. I've addressed that, so that it'll warn less (for me) and won't warn at all unless, like me, you use the dubious feature. I wonder which Java issue he was alluding to because, if it was https://bugs.java.com/view_bug.do?bug_id=6633275, which was the only Sun bug cited in that part of the source, they think they fixed that. (He doesn't say on https://web.archive.org/web/20140405184323/http://elliotth.blogspot.com/2007/08/transparent-java-windows-on-x11.html.)
I still get:
WARNING: Illegal reflective access by e.util.GuiUtilities (file:/u2/home/mad/jessies/work/salma-hayek/.generated/classes/) to field sun.awt.X11.XToolkit.awtAppClassName at e.util.GuiUtilities.fixWmClass(GuiUtilities.java:444) at e.util.GuiUtilities.initLookAndFeel(GuiUtilities.java:417) at terminator.Terminator$4.run(Terminator.java:224) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764) at java.desktop/java.awt.EventQueue.access$500(EventQueue.java:97) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:717) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:711) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:734) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:199) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
... so I'll reopen this.
yeah, i can't find the relevant bug ("why is it only undecorated windows that can be transparent?") either. i'd file another, except i'm pretty sure Sun/Oracle never fixed a single bug i filed anyway.
i do wonder if their docs point to another possible solution: what happens if we lie by overriding isUndecorated
to always return true
? would that break anything else? might be worth exploring if/when we have to.
https://bugs.openjdk.java.net/browse/JDK-6528430 is the (unfixed) WM_CLASS bug. i'll add that link to the code comment.
(I guess /tmp/trc makes:
https://bugs.java.com/view_bug.do?bug_id=6354700 (LD_LIBRARY_PATH polluted in children)
... more likely to have been me than you.)
On Sun, Oct 7, 2018 at 22:10 Elliott Hughes notifications@github.com wrote:
yeah, i can't find the relevant bug ("why is it only undecorated windows that can be transparent?") either. i'd file another, except i'm pretty sure Sun/Oracle never fixed a single bug i filed anyway.
i do wonder if their docs point to another possible solution: what happens if we lie by overriding isUndecorated to always return true? would that break anything else? might be worth exploring if/when we have to.
https://bugs.openjdk.java.net/browse/JDK-6528430 is the (unfixed) WM_CLASS bug. i'll add that link to the code comment.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/software-jessies-org/jessies/issues/25#issuecomment-427723198, or mute the thread https://github.com/notifications/unsubscribe-auth/AQM-muR283jghC-VMIa61d6GxFeFrZPtks5uit5TgaJpZM4T3bho .
Further to that check-in comment, with that, transparency started working on Windows for me.
So is the decorated thing a lie?
On Mon, Oct 8, 2018, 17:15 Martin Dorey notifications@github.com wrote:
Further to that check-in comment, with that, transparency started working on Windows for me.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/software-jessies-org/jessies/issues/25#issuecomment-428018715, or mute the thread https://github.com/notifications/unsubscribe-auth/ACR2LX0wCtTcXB-i9NupI7BMmk_rQ-Ohks5ui-qkgaJpZM4T3bho .
If you mean, "does translucency still work with the patch below?" then "no", it fails with:
Caused by: java.awt.IllegalComponentStateException: The frame is decorated at java.awt.Frame.setOpacity(Frame.java:960)
If you mean "does there seem to be any good reason for translucency not to be supported for decorated windows?", then "not as far as I've noticed yet". Perhaps there was on Solaris or something. I'm pretty confident that I won't find any regression because, far as I see so far on Linux, the new code's effect looks exactly like the old code's. There's the bonus taste of sick, ameliorated perhaps by the removal of quite a bit of code that we don't think anyone was actively using.
--- a/salma-hayek/src/e/util/GuiUtilities.java +++ b/salma-hayek/src/e/util/GuiUtilities.java @@ -479,7 +479,7 @@ public class GuiUtilities { Log.warn("http://docs.oracle.com/javase/7/docs/api/java/awt/Window.html#setOpacity%28float%29."); Log.warn("Perhaps you'd like to override that but only for the duration of this call,"); Log.warn("otherwise you won't be able to move, resize or close your window."); - return; + //return; } try { // This is only available on Java 7 and later. --- a/terminator/src/terminator/TerminatorFrame.java +++ b/terminator/src/terminator/TerminatorFrame.java @@ -393,7 +393,7 @@ public class TerminatorFrame extends JFrame implements TerminalPaneHost { private void updateTransparency() { double alpha = Terminator.getPreferences().getDouble(TerminatorPreferences.ALPHA); - settingAlpha = true; + settingAlpha = false; GuiUtilities.setFrameAlpha(this, alpha); settingAlpha = false; }
Works for me. (Both literally and figuratively.)
On Mon, Oct 8, 2018, 17:53 Martin Dorey <notifications@github.com wrote:
If you mean, "does translucency still work with the patch below?" then "no", it fails with:
Caused by: java.awt.IllegalComponentStateException: The frame is decorated at java.awt.Frame.setOpacity(Frame.java:960)
If you mean "does there seem to be any good reason for translucency not to be supported for decorated windows?", then "not as far as I've noticed yet". Perhaps there was on Solaris or something. I'm pretty confident that I won't find any regression because, far as I see so far on Linux, the new code's effect looks exactly like the old code's. There's the bonus taste of sick, ameliorated perhaps by the removal of quite a bit of code that we don't think anyone was actively using.
--- a/salma-hayek/src/e/util/GuiUtilities.java +++ b/salma-hayek/src/e/util/GuiUtilities.java @@ -479,7 +479,7 @@ public class GuiUtilities { Log.warn("http://docs.oracle.com/javase/7/docs/api/java/awt/Window.html#setOpacity%28float%29."); Log.warn("Perhaps you'd like to override that but only for the duration of this call,"); Log.warn("otherwise you won't be able to move, resize or close your window.");
- return;
//return; } try { // This is only available on Java 7 and later. --- a/terminator/src/terminator/TerminatorFrame.java +++ b/terminator/src/terminator/TerminatorFrame.java @@ -393,7 +393,7 @@ public class TerminatorFrame extends JFrame implements TerminalPaneHost {
private void updateTransparency() { double alpha = Terminator.getPreferences().getDouble(TerminatorPreferences.ALPHA);
- settingAlpha = true;
- settingAlpha = false; GuiUtilities.setFrameAlpha(this, alpha); settingAlpha = false; }
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/software-jessies-org/jessies/issues/25#issuecomment-428024313, or mute the thread https://github.com/notifications/unsubscribe-auth/ACR2LfBM8rlaCrIGgzPCTw-8p5w_qEbrks5ui_ONgaJpZM4T3bho .
As before, OpenJDK 10 on Ubuntu 18.04:
gives this warning when launching evergreen, which works fine otherwise: