[Hacktoberfest] Improving Hi-DPI support on Windows as a Community

Trevor DeVore lists at mangomultimedia.com
Tue Nov 6 00:15:53 EST 2018


On Thu, Oct 11, 2018 at 10:40 AM Trevor DeVore <lists at mangomultimedia.com>
wrote:

> I'm aware of the following limitations and bugs around Hi-DPI support on
> Windows:
>
> 1. The `screenPixelScales` reports the pixelScale of the primary monitor
> for all attached monitors. For example, if you have a Windows 10 computer
> with two monitors attached and the primary monitor is set to displays at
> 100% (1.0 pixelScale) and a second monitor at 200% (2.0 pixelScale) then
> the `screenPixelScales` returns `1.0\n1.0` when it should return `1.0\n2.0`.
>
> https://quality.livecode.com/show_bug.cgi?id=19542
>

An update for anyone interested. Today I finished setting up a build
environment for LiveCode Community on Windows and I started doing some
testing. Fixing `the screenPixelScales` issue was actually really easy. It
was just a matter of adding some XML to the engine/standalone manifests.
You can see what I've changed so far at the following url. It compares a
branch I created to the LiveCode develop-9.0 branch:

https://github.com/livecode/livecode/compare/develop-9.0...trevordevore:tkd-dpiawareness?expand=1

The next item of business is to update `the screenPixelScale of stack
tStack`. It currently returns the wrong value on secondary displays. I'm
guessing it involves switching to GetDpiForWindow() in the code.

Another to-do item is that the WM_DPICHANGED message needs to be handled
and do something like call `MCDispatch::reopen_stack_windows()`.

-- 
Trevor DeVore
ScreenSteps
www.screensteps.com

>



More information about the use-livecode mailing list