Version: unspecified (using KDE 4.6.3) OS: Linux In Java Swing apps, using the com.sun.java.swing.plaf.gtk.GTKLookAndFeel (with oxygen-gtk as the GTK+ theme), all inactive tabs always get highlighted with the blue hover shadow even when they're not being hovered with the mouse. Reproducible: Didn't try Steps to Reproduce: Try running a Java Swing apps which has tabs in it. Use these JVM switches: -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.systemlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel to make sure it actually uses the GTKLookAndFeel (as opposed to the ugly Metal one, see also http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=729 ). Actual Results: All inactive tabs falsely show as if they were being hovered. Expected Results: Only actually hovered tabs should show up as hovered, or if this is not possible, then no hover highlight should be drawn at all. This glitch is very annoying because the highlighting shadow misleadingly draws the attention away from the active tab.
Oops, actually this should read "Reproducible: Always", not "Didn't try". (I forgot to set the combobox.) I did try, it happens every single time.
It would be easy to fix (disable hover support) if we knew how to detect Swing usage. Just detecting java isn't enough since e.g. SWT works with tabs normally (because it's mostly normal GTK+ wrapper). Any ideas on this?
I think we need to sanity-check the coordinates returned by gdk_window_get_pointer at: https://projects.kde.org/projects/playground/artwork/oxygen-gtk/repository/revisions/master/entry/src/animations/oxygenhoverdata.cpp#L49 I think the solution to the mystery must be that there is a false intersect detected in that function.
(The coordinates in Swing's fake widgets must be nonsense which happens to always intersect.)
yes, thats what it is. That's why we need to find a way to disable hover on tabs for this kind of widgets, (and this kind only). Will investigate.
Kevin, 2 newbie questions: - Swing is swt, correct ? - can you point me to one or two (basic please) swt apps, for me to test patches ? Thx, Hugo
@Hugo No, SWT and Swing are very different. SWT is a GTK wrapper on Linux, while Swing draws all the widgets on a single X window, using GTK only as a theme drawer. That's why SWT apps work OK with tab prelight, while Swing ones don't.
Here's a good tab test app using Swing: http://download.oracle.com/javase/tutorial/uiswing/components/tabbedpane.html
Git commit abcceffd3eb38fef3d49499ce5a82caa5d1cd6c5 by Hugo Pereira Da Costa. Committed on 23/05/2011 at 19:09. Pushed by hpereiradacosta into branch 'master'. Disable tab widgets hover in Java (non-swt) applications when an invalid window is passed as argument to draw_extension. CCBUG: 273829 M +4 -1 src/oxygenstylewrapper.cpp http://commits.kde.org/oxygen-gtk/abcceffd3eb38fef3d49499ce5a82caa5d1cd6c5