<AWT Dev> [9] Review request for 8163101: dual-screen issue with JMenu, JPopupMenu

Semyon Sadetsky semyon.sadetsky at oracle.com
Thu Sep 29 06:54:34 UTC 2016

On 9/28/2016 10:54 PM, Sergey Bylokhov wrote:
> On 23.09.16 21:39, Semyon Sadetsky wrote:
>>> Just check what value will be returned if the system have two displays
>>> and each will have own scale, the result will be downscaled based on
>>> default config.
>> Did you really try this? Because I did not see any Linux within the
>> supported ones that allows this. Would be nice if you could share info
>> how to get different scales for two monitors.
> It is not necessary to check, it is obvious from the code. It is 
> broken in this case.
But this behavior is unsupported. Why should I check it?
>>> We have two bugs:
>>>  - This bug is about menu related code, it should care about bounds of
>>> gc where these popup will be shown, it should not use the method which
>>> return the bounds of the primary screen. In current fix the location
>>> will be incorrect if Xinerama is disabled and menu will be shown on
>>> non-primary screen, if this screen have different scale from main
>>> display.
>> If Xinerama is disabled the method will return the primary screen size
>> which is your favorite one.
> But the popup should use the bounds from the screen where they will be 
> shown, which is not necessary the main.
Xinerama is always on in the supported OSes. And that is how it worked 
before the regression and there were no complains. It was not introduced 
in 9 while the regression is caused fix in 9. So, if you want I could 
create a separate issue to investigate why it was solved so, but it is 
unrelated to the fix. The fix simply eliminates the regression.
>>>  - The toolkit method should be reworked.
>> It as an open question at least for 9. I can file a bug if you want.
> Toolkit bug is unrelated to this so its up to you. But the fix is 
> quite easy.

More information about the awt-dev mailing list