GNOME Bugzilla – Bug 759492
Undecorated java jframes display grey
Last modified: 2015-12-16 18:52:32 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.
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() .
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.
Review of attachment 317525 [details] [review]: Hm, no, actually, on second thought (and me reading through the commit message again), this is correct.
Attachment 317525 [details] pushed as e7390cf - x11/window: Ensure we send a ConfigureNotify to just mapped windows