Skip to content

Initialize nativeZoom from Shell via OS call #315

@akoch-yatta

Description

@akoch-yatta

Description
In some scenarios (e.g. when a secondary Shell is opened in a RCP via File Explorer) sub shell are not always created on the primary monitor, but on another one. As the logic in Shell inherits the zoom from its parent, this can lead to Shell thinking they are scaled to a wrong nativeZoom, which will lead to DPIChange-Events to be skipped. This presumably has some side effects, that could cause issues we tried to fix with #293.

Reproduction
Re-evaluate #241

Expected Behavior
Proper DPIChange-Event handling

Necessary configuration:

Additional knowledge
Proposed solution is to initialize the nativeZoom from Shell via DPIUtil.mapDPIToZoom(OS.GetDpiForWindow(handle)) after the handle is created.

Metadata

Metadata

Labels

HiDPIA HiDPI-Related Issue or FeatureSWTIssue for SWT

Type

No type

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions