Bug 1053303 - Java (Swing/AWT) windows look unfocused when focused (grey title bar and close button)
Summary: Java (Swing/AWT) windows look unfocused when focused (grey title bar and clos...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-shell
Version: 20
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Owen Taylor
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-15 00:18 UTC by Robin Stocker
Modified: 2014-02-06 15:54 UTC (History)
13 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-02-06 15:54:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Simple demo illustrating the issue. (1.38 KB, text/x-java)
2014-01-17 11:50 UTC, Severin Gehwolf
no flags Details
Running the demo with java window in focus on F19 (835.13 KB, image/png)
2014-01-17 11:52 UTC, Severin Gehwolf
no flags Details
Running the demo with java window in focus on F20 (484.24 KB, image/png)
2014-01-17 11:53 UTC, Severin Gehwolf
no flags Details
Non java window in focus on F20 (554.01 KB, image/png)
2014-01-17 11:54 UTC, Severin Gehwolf
no flags Details

Description Robin Stocker 2014-01-15 00:18:32 UTC
Description of problem:

When using Swing-based Java applications in GNOME Shell, the window decorations only look focused right after startup.

When changing the focus to another window and then back to the Java application, the title bar stays in the unfocused (greyed out) look, and the window shadow is also not as expected. Keyboard and mouse input work though.

Note that SWT applications like Eclipse are not affected.


Version-Release number of selected component (if applicable):

Version     : 1.7.0.60
Release     : 2.4.3.0.fc20


Steps to Reproduce:
1. Start a Swing application, e.g. jvisualvm
2. Change the focus to another application (click on title bar)
3. Change the focus back to the window from point 1 (click on title bar)

Actual results:
The window is still not shown as focused, as can be seen from the title, close button and window shadow.

Expected results:
The window is shown as focused.

Additional info:
This problem did not occur in Fedora 19.

Comment 1 Robin Stocker 2014-01-15 00:19:55 UTC
See also these messages for other reports of this problem:

https://mail.gnome.org/archives/gnome-shell-list/2014-January/msg00007.html

Comment 2 Severin Gehwolf 2014-01-15 09:07:55 UTC
Robin, in the referenced thread Vadim claims that this is a problem with gnome-shell 3.10[1]. Thoughts?

[1] https://mail.gnome.org/archives/gnome-shell-list/2014-January/msg00012.html

Comment 3 Robin Stocker 2014-01-15 11:37:47 UTC
It is a problem with Swing/AWT applications when run in gnome-shell. It does not occur with GTK 2/3 applications. I don't know if it also occurs in other window managers.

So I don't know whether the bug is in gnome-shell or in java. I filed it against java because a previous problem like this turned out to be there, see bug 918055.

But it certainly wouldn't hurt if gnome-shell people could have a look at it.

Comment 4 Robin Stocker 2014-01-16 17:34:01 UTC
I found the following mutter bug, which also describes the focusing problem:

https://bugzilla.gnome.org/show_bug.cgi?id=711618#c2

So it looks like this problem can be fixed in mutter. Versions that show the problem currently:

mutter 3.10.2
gnome-shell 3.10.2.1

Comment 5 Severin Gehwolf 2014-01-16 17:40:27 UTC
Robin, does the update in[1] fix the problem then?

[1] https://admin.fedoraproject.org/updates/mutter-3.10.2-6.fc20

Comment 6 Robin Stocker 2014-01-16 17:53:45 UTC
I already had this version installed (sorry for not including the release):

Installed Packages
Name        : mutter
Arch        : x86_64
Version     : 3.10.2
Release     : 6.fc20

So no, it does not fix the problem I'm afraid.

Comment 7 Severin Gehwolf 2014-01-17 11:50:44 UTC
Created attachment 851526 [details]
Simple demo illustrating the issue.

Comment 8 Severin Gehwolf 2014-01-17 11:52:02 UTC
Created attachment 851529 [details]
Running the demo with java window in focus on F19

Comment 9 Severin Gehwolf 2014-01-17 11:53:20 UTC
Created attachment 851530 [details]
Running the demo with java window in focus on F20

Comment 10 Severin Gehwolf 2014-01-17 11:54:06 UTC
Created attachment 851531 [details]
Non java window in focus on F20

Comment 11 Severin Gehwolf 2014-01-17 12:00:18 UTC
This is looking like a gnome-shell regression to me. Comment 7 has a simple Java program attached. You can run it by;
$ javac FocusBorderDemo.java && java FocusBorderDemo

If I run this on F19 I get correct window decorations (including the drop shadow) if the window is in focus. When that same demo is run on F20 it looks as illustrated by the attachment of comment 9.

However, the java versions are the same. This yields me to believe it's not an openjdk bug.

On F19 I have:
$ java -version
java version "1.7.0_51"
OpenJDK Runtime Environment (fedora-2.4.4.0.fc19-x86_64 u51-b02)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

On F20 I have:
$ java -version
java version "1.7.0_51"
OpenJDK Runtime Environment (fedora-2.4.4.0.fc20-x86_64 u51-b02)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

Re-assigning to gnome-shell.

Comment 12 James Perkins 2014-01-23 16:48:31 UTC
Everything seems to be working fine in Gnome Shell 3.10.3 now for me at least.

Comment 13 Severin Gehwolf 2014-01-27 09:58:41 UTC
I can confirm. Attached simple Java program looks OK with newest gnome-shell.

$ rpm -q gnome-shell
gnome-shell-3.10.3-2.fc20.x86_64

Comment 14 Robin Stocker 2014-02-04 13:18:27 UTC
Yes, can confirm that it works again with gnome-shell-3.10.3-2.fc20.x86_64. This bug can be closed, thank you.


Note You need to log in before you can comment on or make changes to this bug.