Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1687745 - Java windows that have a preferred width larger than Short.MAX_VALUE are not properly displayed in RHEL7
Summary: Java windows that have a preferred width larger than Short.MAX_VALUE are not ...
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: mutter
Version: 7.6
Hardware: Unspecified
OS: Linux
Target Milestone: rc
: ---
Assignee: Jonas Ådahl
QA Contact: Desktop QE
Depends On:
TreeView+ depends on / blocked
Reported: 2019-03-12 09:48 UTC by Divya
Modified: 2019-03-22 13:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Target Upstream Version:

Attachments (Terms of Use)
Reproducer (deleted)
2019-03-12 09:48 UTC, Divya
no flags Details

Description Divya 2019-03-12 09:48:52 UTC
Created attachment 1543127 [details]

Description of problem:
Dialog/window with a preferred width greater than Short.MAX_VALUE, results in a dialog that functions similar to the expected dialog, except that instead of the expected components being displayed, the portion of the screen behind the display is copied into the dialog's panel.  The functionality of the dialog is still working (example: copy/pasting cells, clicking buttons and getting dropdown menus, closing the dialog), but the display never gets painted correctly.

Some code within the Java libraries is forcing the width to be Short.MAX_VALUE.  However, when this is too wide for the window manager (Gnome 3) to process correctly. Based on our testing, the most likely cause of this issue is that the pixel(s) that make up the border around the Java application are not being accounted for, and this is causing the window manager to use an invalid (probably 0 or negative) value when tracking the width of the window. 

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

How reproducible:

Steps to Reproduce:
1. Compile the attached reproducer as below: 

$ javac

2. Run PrefWidthExceedsShortMaxExample as below to reproduce the issue

$ java PrefWidthExceedsShortMaxExample

Actual results:
With default values of arguments, java window does not show up properly. With other manual arguments passed as below, results are as listed: 

5000 a : Bad painting (width = 32767)
4096 a : bad painting (width = 32767)
4095 a : correct behavior (width = 32760)
10000 M : correct behavior (width = 32763)
10000 i : correct behavior (width = 20000)
10000 W : correct behavior (width = 32762)
10000 X : bad behavior (width = 32766)
10000 '&' : bad behavior (width = 32765)

Expected results:
Java window should always appear from end to end corners on the screen. 

Additional info:
Tried the reproducer in KDE desktop environment and it works fine. So I suspect issue with the GNOME window manager.

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