Skip to content

Conversation

@amartya4256
Copy link
Contributor

@amartya4256 amartya4256 commented Oct 30, 2025

Currently, the shell is scaled synchronously regardless of the sync/async behaviour of scaling. With this PR the size of the shell is set at the end of a DPIChange execution to ensure the final size set to the shell consistent with the final zoom level.

Why it is necessary:

In case of a DPIChange event or multiple events, the scaling of all the widgets can happen synchronously or asynchronously. In case of asynchronous execution, the shell's size might be set before all the widgets are scaled which can lead to a weird result as resizing a shell leads to the widgets to relayout. Calling a Shell:layout at the end has similar results. It is only consistent to also set the size of the shell at the end of the execution followed by a Shell::layout.

Currently, the shell is scaled synchronously regardless of the sync/async behaviour of scaling. With this commit the size of the shell is set at the end of a DPIChange execution to ensure the final size set to the shell consistent with the final zoom level.
@github-actions
Copy link
Contributor

github-actions bot commented Oct 30, 2025

Test Results

  118 files  ±0    118 suites  ±0   14m 18s ⏱️ - 2m 4s
4 650 tests ±0  4 633 ✅ ±0  17 💤 ±0  0 ❌ ±0 
  330 runs  ±0    326 ✅ ±0   4 💤 ±0  0 ❌ ±0 

Results for commit 6a7d658. ± Comparison against base commit 079d2a9.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@HeikoKlare HeikoKlare left a comment

Choose a reason for hiding this comment

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

While the code looks reasonable, the change unfortunately degrades user experience. When I move a shell to another monitor and immediately stop moving the mouse without stopping to drag (i.e., without releasing the mouse button), the shell stays at a too large size (when moving from low zoom to high zoom monitor) until I move the mouse again or release the mouse button. Even when moving "ordinarily", you see that the shell is now resized multiple times (first to a larger size than what it will finally be), wheras without the change the shell just resizes once.

Here is a capture when moving from a 100% to a 125% monitor:
dpichange_multiple_resize

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.

Set size of shell asynchronously upon DPI Change

2 participants