<AWT Dev> Integrated: 8076313: GraphicsEnvironment does not detect changes in count of monitors on Linux OS
serb at openjdk.java.net
Wed Feb 3 03:44:40 UTC 2021
On Tue, 26 Jan 2021 04:08:44 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
> This fix enables display change detection on Linux when the number of monitors is changed in the Xinerama mode.
> The fix itself is straightforward:
> 1. When we get an event that the root window is changed we assume that it could be caused by some screen manipulation like screen resolution change or adding/removing a monitor.
> 2. We rebuild the native data structure for the x11 screens, and then mirror this data on the java level in the X11GraphicsEnvironment.
> 3. While we updating the data, we block all access to it in the native -> after the fix all access to the native x11 screens should be done under awt-lock.
> - This fix has a long chain of pre-fixes where we dropped the native access to the x11 screens, to minimize the places we need to synchronize.
> - In the current version we rebuild the screens more often than needed, for example, we rebuild it even if resolution changed in a single monitor config. It is done intentionally to increase the test code coverage for now.
> - The current implementation is based on the Xinerama, while the better solution will be use XRandr 1.5, but it does not support AIX, and is not supported in the current devkit.
This pull request has now been integrated.
Author: Sergey Bylokhov <serb at openjdk.org>
Stats: 345 lines in 6 files changed: 203 ins; 103 del; 39 mod
8076313: GraphicsEnvironment does not detect changes in count of monitors on Linux OS
More information about the awt-dev