Skip to content

Conversation

@akoch-yatta
Copy link
Contributor

This PR ensures to always reset the currently cached DPIChangeEvent of a Control in any case. Otherwise spawning dpi change events for multiple Controls that are related via parent->child hierarchy could lead to a currentDpiChangeEvent of the parent being canceled by the creation of the event of the child.

So, as as example: there is Composite A and B and A is the parent of B. Now an asynchronous DPI change event for A is created because A is added to a new parent, now the same is done for B while the first event is already propagated the cached event for B could be already there and will be canceled when adding the second event which will cancel further processing. Therefor it is important wo always nullify Control#currentDpiChangeEvent after the event for a Control is processed and not only when it is the final Control

This fixes the effect in #2608 (comment).
It can be reproduced in the runtime for me, by moving it to the secondary monitor - primary and secondary must have different zooms of course.

This commit ensures to always reset the currently cached DPIChangeEvent
of a Control properly. Otherwise spawning dpi change events for multiple
Controls that are related via parent->child hierarchy could lead to a
currentDpiChangeEvent of the parent being canceled by the creation of the
event of the child.

Contributes to eclipse-platform#2608
@github-actions
Copy link
Contributor

Test Results

  115 files  ±0    115 suites  ±0   10m 52s ⏱️ - 1m 42s
4 546 tests ±0  4 531 ✅ ±0  15 💤 ±0  0 ❌ ±0 
  311 runs  ±0    308 ✅ ±0   3 💤 ±0  0 ❌ ±0 

Results for commit 1b7dd32. ± Comparison against base commit 79e74c7.

@HeikoKlare
Copy link
Contributor

@HeikoKlare HeikoKlare closed this Oct 17, 2025
@HeikoKlare HeikoKlare deleted the win32-fix-resetting-of-dpi-events branch October 17, 2025 12:31
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.

Fix for broken layout after perspective switcher is used

2 participants