Skip to content

Conversation

@ShahzaibIbrahim
Copy link
Contributor

Creating a map to provide different handle w.r.t the current zoom of the display. The method win32_getHandle provides the appropriate handle for the scaled image as per requested by the client.

HOW TO TEST

  • Run the Snippet92 (Image) or Snippet119 (Icon) with the following VM Arguments
-Dswt.autoScale=quarter
-Dswt.autoScale.updateOnRuntime=true
  • Run the example
  • Move the mouse pointer to the window
  • See if the mouse pointer is scaled to the current monitor zoom level.
  • Now move the window to another monitor with different zoom level (i.e. 200%)
  • Move the mouse pointer to the window again
  • See if the pointer still scaled correctly according to 200% zoom level

@github-actions
Copy link
Contributor

github-actions bot commented Nov 20, 2024

Test Results

   381 files   -   102     381 suites   - 102   3m 35s ⏱️ - 5m 2s
 4 060 tests  -    35   4 052 ✅  -    33   8 💤 + 1  0 ❌  - 3 
11 923 runs   - 4 250  11 885 ✅  - 4 195  38 💤  - 52  0 ❌  - 3 

Results for commit 29c0bdb. ± Comparison against base commit ca1bb19.

This pull request removes 35 tests.
org.eclipse.swt.graphics.ImageWin32Tests ‑ testImageShouldHaveDimesionAsPerZoomLevel
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testByteArrayTransfer
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testFileTransfer
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testHtmlTransfer
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testImageTransfer_fromCopiedImage
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testImageTransfer_fromImage
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testImageTransfer_fromImageData
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testImageTransfer_fromImageDataFromImage
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testRtfTransfer
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_dnd_DND ‑ testTextTransfer
…
This pull request skips 4 tests.
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_Constructor_multipleInstantiationsInDifferentThreads[browser flags: 0]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_setUrl_local[browser flags: 0]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_setUrl_remote[browser flags: 0]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Button ‑ test_traverseCheckButton

♻️ This comment has been updated with latest results.

Copy link
Member

@fedejeanne fedejeanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test this, I only have some proposals regarding the coding style and JavaDoc.

I also have 2 questions regarding returning a handle of a cursor that is already disposed and about making the field handle private.

Copy link
Member

@fedejeanne fedejeanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, they produce the expected result and I see no regressions either.

Please remove the extra (unnecessary) call to registerResourceWithZoomSupport(this) from the constructor, squash and rebase your commits and then this PR is good to go ✔️

@ShahzaibIbrahim ShahzaibIbrahim force-pushed the master-104 branch 2 times, most recently from 5d07820 to 9231432 Compare November 27, 2024 10:33
Creating a map to provide different handle w.r.t the current zoom of the
display. The method win32_getHandle provides the appropriate handle for
the scaled image as per requested by the client.
Copy link
Member

@fedejeanne fedejeanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test failures are unrelated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non system cursors are not adapted to DPI scale changes

2 participants