From alexander.zvegintsev at oracle.com Thu Feb 2 18:58:41 2023 From: alexander.zvegintsev at oracle.com (Alexander Zvegintsev) Date: Thu, 2 Feb 2023 19:58:41 +0100 Subject: wiki update : meeting notes + Known problems and solutions Message-ID: <77652dc6-cd57-4c8d-ec81-0d4093da504b@oracle.com> 1) Today's meeting notes https://wiki.openjdk.java.net/display/wakefield/Meeting+Notes 2) Updated: https://wiki.openjdk.java.net/display/wakefield/Open+Unsolved+Problems All committers feel free to update the pages. -- -- Thanks, Alexander. From nikita.gubarkov at jetbrains.com Thu Feb 2 22:47:40 2023 From: nikita.gubarkov at jetbrains.com (Nikita Gubarkov) Date: Fri, 3 Feb 2023 00:47:40 +0200 Subject: Multi monitor HIDPI in X11 compatibility mode Message-ID: JetBrains Runtime has support for per-monitor scaling in X11 mode implemented a few months ago. At first I tried to use the GTK library for reading the scales as suggested in https://bugs.openjdk.org/browse/JDK-8260270, but in a multi-monitor environment it is always returning scale of the main display when running with X11 backend. The final solution was to connect to Wayland just to read the scaling values and then do a huge refactoring to make AWT's X11-related code respect these individual scaling values. For coordinate conversions I took the same approach that was used in Windows - https://github.com/openjdk/jdk/pull/375 There were some issues that I was unable to solve, like the window title bar is always scaled with the main monitor's scale no matter what monitor the window is on, the same with mouse cursor when it's over the window, but overall it seems to work. I can try porting this into OpenJDK and create a PR if needed. JBR issue: https://youtrack.jetbrains.com/issue/JBR-5208 Code: https://github.com/JetBrains/JetBrainsRuntime/commit/bf073b92b8803fb45c5934127b8f4a9f58e508a1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From philip.race at oracle.com Fri Feb 10 20:48:05 2023 From: philip.race at oracle.com (Philip Race) Date: Fri, 10 Feb 2023 12:48:05 -0800 Subject: Multi monitor HIDPI in X11 compatibility mode In-Reply-To: References: Message-ID: If it needs Wayland, then it might be something that should go into the sandbox for the Wakefield project ... perhaps that is what you are intending here ? Until that project adds support back into main line for Wayland's X11 compat mode we only support running on X.org, so there won't be a wayland server to query, so this fix can't help mainline today. I presume this code would still report integer scales ? My understanding is Wayland by design does not support fractional scales. -phil. On 2/2/23 2:47 PM, Nikita Gubarkov wrote: > JetBrains Runtime has support for per-monitor scaling in X11 mode > implemented a few months ago. > > At first I tried to use the GTK library for reading the scales as > suggested in https://bugs.openjdk.org/browse/JDK-8260270, but in a > multi-monitor environment it is always returning scale of the main > display when running with X11 backend. > The final solution was to connect to Wayland just to read the scaling > values and then do a huge refactoring to make AWT's X11-related code > respect these individual scaling values. > For coordinate conversions I took the same approach that was used in > Windows - https://github.com/openjdk/jdk/pull/375 > There were some issues that I was unable to solve, like the window > title bar is always scaled with the main monitor's scale no matter > what monitor the window is on, the same with mouse cursor when it's > over the window, but overall it seems to work. > > I can try porting this into OpenJDK and create a PR if needed. > > JBR issue: https://youtrack.jetbrains.com/issue/JBR-5208 > Code: > https://github.com/JetBrains/JetBrainsRuntime/commit/bf073b92b8803fb45c5934127b8f4a9f58e508a1 From nikita.gubarkov at jetbrains.com Mon Feb 13 21:23:36 2023 From: nikita.gubarkov at jetbrains.com (Nikita Gubarkov) Date: Mon, 13 Feb 2023 23:23:36 +0200 Subject: Multi monitor HIDPI in X11 compatibility mode In-Reply-To: References: Message-ID: It doesn't require Wayland in order to run as before, but if Wayland is available at runtime (dlsym), it will use it to get per-monitor scaling. AFAIU mainline currently mostly works with XWayland, right? If so, probably this can even help the mainline, not only sandbox? And yes, it still reports integer scales, I didn't find a way to get fractional scaling, Wayland protocol itself has only integer wl_output::scale. On Fri, Feb 10, 2023 at 10:48 PM Philip Race wrote: > If it needs Wayland, then it might be something that should go into the > sandbox > for the Wakefield project ... perhaps that is what you are intending here ? > Until that project adds support back into main line for Wayland's X11 > compat > mode we only support running on X.org, so there won't be a wayland > server to query, > so this fix can't help mainline today. > > I presume this code would still report integer scales ? > My understanding is Wayland by design does not support fractional scales. > > -phil. > > On 2/2/23 2:47 PM, Nikita Gubarkov wrote: > > JetBrains Runtime has support for per-monitor scaling in X11 mode > > implemented a few months ago. > > > > At first I tried to use the GTK library for reading the scales as > > suggested in https://bugs.openjdk.org/browse/JDK-8260270, but in a > > multi-monitor environment it is always returning scale of the main > > display when running with X11 backend. > > The final solution was to connect to Wayland just to read the scaling > > values and then do a huge refactoring to make AWT's X11-related code > > respect these individual scaling values. > > For coordinate conversions I took the same approach that was used in > > Windows - https://github.com/openjdk/jdk/pull/375 > > There were some issues that I was unable to solve, like the window > > title bar is always scaled with the main monitor's scale no matter > > what monitor the window is on, the same with mouse cursor when it's > > over the window, but overall it seems to work. > > > > I can try porting this into OpenJDK and create a PR if needed. > > > > JBR issue: https://youtrack.jetbrains.com/issue/JBR-5208 > > Code: > > > https://github.com/JetBrains/JetBrainsRuntime/commit/bf073b92b8803fb45c5934127b8f4a9f58e508a1 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: