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

Semyon Sadetsky semyon.sadetsky at oracle.com
Thu Sep 29 18:35:10 UTC 2016



On 29.09.2016 21:22, Sergey Bylokhov wrote:
> On 29.09.16 9:54, Semyon Sadetsky wrote:
>>>>> 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.
>
> This is a part of HiDPI support. The popup code should use the bounds 
> of the screen where it is located. It should not depend from the 
> method which:
>  - Support data for the main screen only.
>  - Even for this screen it returns incorrect data.
I did not get that.
The fix restores the the previous way to get screen bounds, which was 
not introduced as a part of HiDPI but much earier. It had been working 
before 8137571 without complains (no bugs reported).

Or did you mean it won't work in HiDPI? I tested, it works for both 
HiDPI and non-HiDPI displays while the current code doesn't work for both.


More information about the awt-dev mailing list