Monitor scaling on Windows

Dejan Lekic dejan.lekic at gmail.com
Mon Jun 1 21:49:55 UTC 2026


On Friday, 15 May 2026 at 09:00:58 UTC, torhu wrote:
> Is there any support for monitor scaling in DWT?
>
> I was looking at this:
> https://github.com/eclipse-platform/eclipse.platform.swt/blob/master/docs/hidpi-support-for-windows-dev-guide.md
>
> But it seems that these features were added in later versions 
> of SWT.

GTK4 was designed from the ground up for the HiDPI era; it 
offloads multi-monitor tracking to the window surface 
(GdkSurface), abstracts coordinates away from developers, and 
leverages hardware acceleration so that dynamic rescaling happens 
seamlessly behind the scenes. If you use giD, then gdk.monitor is 
your friend - 
https://www.kymorphia.com/gid/gid~gdk4/gdk/monitor.html .

GTK4 allows you to subscribe for DPI changes. If your custom 
widget caches large graphical buffers that must be recreated when 
the scaling shifts, you can listen for changes on the display 
monitor rather than trapping raw OS window messages like 
WM_DPICHANGED.

If you need to get scale factor then 
https://www.kymorphia.com/gid/gid~gdk4/gdk/surface.html is your 
friend.


More information about the Digitalmars-d-dwt mailing list