Skip to content

Conversation

@amartya4256
Copy link
Contributor

This PR introduces the usage of a separate thread to start processing the DPI Change events by executing the handlers using Display#syncExec to provide higher priority to the DPIChangeExecuting tasks.

It doesn't fix the issue in vi-eclipse/Eclipse-Platform#530 but executes the DPI Change tasks with a higher priority making sure the execution happens quicker.

This commit introduces the usage of a separate thread to start
processing the DPI Change events by executing the handlers using
Display#syncExec to provide higher priority to the DPIChangeExecuting
tasks.
@github-actions
Copy link
Contributor

Test Results (win32)

   34 files  ±0     34 suites  ±0   4m 13s ⏱️ +13s
4 628 tests ±0  4 555 ✅ ±0  73 💤 ±0  0 ❌ ±0 
  167 runs  ±0    164 ✅ ±0   3 💤 ±0  0 ❌ ±0 

Results for commit ae4f812. ± Comparison against base commit 1a24778.

}
if (asyncExec) {
control.getDisplay().asyncExec(operation::run);
executor.submit(() -> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just an idea: couldn't we even simplify this by just having a single async task that sequentially runs through the controls and performs a syncExec with the operation on them? Maybe could even get rid of the counter then as there would be a single reponsingle (the executor) for tracking the process.
Maybe that's not possible or too complicated to adapt the implementation, but could be an interesting potential for simplification.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is currently one executor per DPI_CHANGE event yes. I could try getting rid of the counter and see how it affects the overall event.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After having a look, I think it is not possible to track the end of execution without using a counter because all the controls are notified from within handleDPIChange event and that happens during the execution of each control.

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.

No relayouting when dragging to monitor with different zoom and browser is opened

2 participants