Bug 1525

Summary: SWT High-DPI X11/GTK: Wrong Scaling since SWT 4.36 (update)
Product: [JogAmp] Newt Reporter: Sven Gothel <sgothel>
Component: swtAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: 2.6.0   
Hardware: All   
OS: all   
Type: DEFECT SCM Refs:
21c52cf660ce4c7afbf4fcc796310357bb299d9b
Workaround: ---

Description Sven Gothel 2025-08-22 06:17:37 CEST
After updating SWT to 4.36 (commit f71c29bace8ce579470b29e8e2aeca99e43f632a)
the dpi scaling on X11/GTK fails, e.g. via GDK_SCALE=2 environment variable.

## DPIUtil.autoScaleUp() and `useCairoAutoScale`
The (new) GTK implementation sets `useCairoAutoScale` to true,
avoiding scaling the window-coordinates up.
Hence we have to duplicate the scaleUp/scaleDown using the device scale-factor.

## GTK Scrollable.getClientAreaInPixels()
SWTAccessor.getClientAreaInPixels() uses Scrollable.getClientAreaInPixels(),
however the current GTK implementation doesn't returned the scaled value.
Hence we have to autoScaleUp.
Comment 1 Sven Gothel 2025-08-22 06:18:37 CEST
Resolved as described