-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I have tried finding issue with the usage of getDeviceZoom in org.eclipse.swt.dnd.ImageTransfer.nativeToJava(TransferData) using example ClipboardExample class Image transfer option. No visible issue found.
Update:
While running the ClipboardExample on a primary monitor set to 150% scaling, the following behavior was observed:
-
Selecting an image from the file system and pressing the Copy button copies the image data to the clipboard with the DeviceZoom value set to 150% (the scaling of the primary monitor).
-
Moving the application shell to a secondary monitor with 100% scaling and pressing the Paste button retrieves the image data from the clipboard and displays the image based on the original DeviceZoom (150% from the primary monitor).
This results in the pasted image appearing larger on the secondary monitor, as it is rendered with the DeviceZoom of the primary monitor instead of adapting to the scaling of the current monitor.
Steps to reproduce:
- Run the
ClipboardExamplewith following VM arguments
-Dswt.autoScale.updateOnRuntime=true
-Dswt.autoScale=quarter
- Open an image on primary monitor (150%) and press copy button
- Move the shell to other monitor (200%) and press paste button
Observed Behavior:
The pasted image appears larger on the secondary monitor because the image data uses the DeviceZoom from the primary monitor (150%) instead of adjusting to the scaling of the current monitor (100%).
Suggested Solution:
To address this issue, the image data copied to the clipboard should not retain the zoom level from the original monitor. Instead, the application should adapt the zoom level dynamically based on the context of the monitor where the image is pasted. This ensures consistent rendering across monitors with different scaling factors.
Hint
Metadata
Metadata
Assignees
Labels
Type
Projects
Status

