You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
#266 breaks DPI awareness for open_blocking windows #270
I'm not yet sure why, but #266 seems to have stopped windows created with open_blocking from fetching the right resolution. The window.get_dpi call in after_create is always returning the default 96, regardless of the scale of my screen. Calling get_dpi later on (manually triggering in a click event handler) continues to return 96.
After some experimentation, I've found that this relates to the DpiAwarenessContext getting dropped before window creation. Creating a new DpiAwarenessContext in create_window will open a window with the right resolution, and doesn't seem to have any deleterious effects in a parented context:
Activity
AlexCharlton commentedon Jun 16, 2026
After some experimentation, I've found that this relates to the
DpiAwarenessContextgetting dropped before window creation. Creating a newDpiAwarenessContextincreate_windowwill open a window with the right resolution, and doesn't seem to have any deleterious effects in a parented context:Creating the context any later (like in
initialize/after_create) does not have any effect.@prokopyl, not sure if you think this is the right place to do this, though. If so, I can open a PR.
prokopyl commentedon Jun 17, 2026
Ah, yeah it's quite embarrassing that I missed this, considering the whole point of the
DpiAwarenessContextis for it to wrapCreateWindow. 😅Thanks for the quick catch, I will release this fix asap!