After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 759492 - Undecorated java jframes display grey
Undecorated java jframes display grey
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: window-management
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-12-15 13:29 UTC by Axel Kittenberger
Modified: 2015-12-16 18:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
minimal java app to reproduce this problem. (1006 bytes, text/x-java)
2015-12-15 13:29 UTC, Axel Kittenberger
  Details
x11/window: Ensure we send a ConfigureNotify to just mapped windows (2.16 KB, patch)
2015-12-16 18:14 UTC, Rui Matos
committed Details | Review

Description Axel Kittenberger 2015-12-15 13:29:26 UTC
Created attachment 317417 [details]
minimal java app to reproduce this problem.

Undecorated JFrames appear blank in Gnome 3.

See attachment for an application that displays a grey window, when its first argument is "true" but works as expected when it is "false" and thus creates a decorated window.

As the same behavior is seen with OpenJDK(7) as well as Oracle-Java(9) and both of them work as expected in XFCE or KDE sessions I'm filing this against gnome-shell. Same behavior also on my notebook with completely different hardware/graphic card configuration.

This is a minification of the problem seen with the login splash screen "Omero Insight" on Gnome 3.

Commands to reproduce this bug:
  javac Jex.java
  java Jex true

Result:
  a grey window

Expected result:
  a window with a label and button insight.

Comment:
"java -Dsun.java2d.d3d=false -Dsun.java2d.noddraw=true Jex true"
Doesnt work as well.
Comment 1 Rui Matos 2015-12-16 18:14:48 UTC
Created attachment 317525 [details] [review]
x11/window: Ensure we send a ConfigureNotify to just mapped windows

When managing a non-OR window we're required by the ICCCM to behave as
if we received a ConfigureRequest which means that we must generate a
synthetic ConfigureNotify even if the window isn't moved or resized
from its current (initial) geometry.

During MetaWindow's x11/wayland split a slight behavior change for x11
windows crept in. Before the code split, MetaWindow->rect was
initialized with the X window's geometry, but now we're not
initializing MetaWindowX11Private->client_rect which causes the checks
for whether it's necessary to move/resize the window in
meta_window_x11_move_resize_internal() to tell us that we do need to
move/resize which means we do an XConfigureWindow() call and don't
send the sythetic ConfigureNotify. But since the X window isn't really
moving, the XConfigureWindow() call doesn't cause the X server to
generate a ConfigureNotify which breaks some clients such as Java's
AWT.

We can fix this by setting MetaWindowX11Privatew->client_rect for both
OR and non-OR windows. We can set buffer_rect for non-OR windows as
well to simplify the code since it will be assigned the correct value
in meta_window_x11_move_resize_internal() .
Comment 2 Jasper St. Pierre (not reading bugmail) 2015-12-16 18:22:18 UTC
Review of attachment 317525 [details] [review]:

Hm, I think move_resize_internal needs to have the *old* client rect when doing the reconfigure, no? I'll have to stare at this more closely.
Comment 3 Jasper St. Pierre (not reading bugmail) 2015-12-16 18:38:01 UTC
Review of attachment 317525 [details] [review]:

Hm, no, actually, on second thought (and me reading through the commit message again), this is correct.
Comment 4 Rui Matos 2015-12-16 18:52:23 UTC
Attachment 317525 [details] pushed as e7390cf - x11/window: Ensure we send a ConfigureNotify to just mapped windows