Skip to content

Conversation

@Lcbx
Copy link

@Lcbx Lcbx commented Jan 9, 2026

PR is a fix for crash when minimizing window
OS: windows 11
backend: glfw/vulkan

output before fix :

File "...\rendercanvas\base.py", line 361, in __maybe_emit_resize_event
    self._canvas_context._rc_set_size_dict(self._size_info)
  File "...\rendercanvas\contexts\basecontext.py", line 54, in _rc_set_size_dict
    self._wgpu_context.set_physical_size(*size_info["physical_size"])
  File "...\wgpu\_classes.py", line 277, in set_physical_size
    raise ValueError("Physical size values must be positive.")
ValueError: Physical size values must be positive.

didn't feel like creating an issue on top of the PR.
Thx for the lib and happy new year👍

@Vipitis
Copy link
Contributor

Vipitis commented Jan 9, 2026

this is addressed in wgpu-py too: pygfx/wgpu-py#788 I believe you want to allow zero size so no draws happen. If I ready your change correctly it would simply ignore the resize when minimized and keep running "in the background".

@Lcbx Lcbx force-pushed the fix_resize_event_crash branch from 8e058d4 to 1d15114 Compare January 10, 2026 01:15
@Lcbx
Copy link
Author

Lcbx commented Jan 10, 2026

fixed the issue @Vipitis raised

seems to me like this should be fixed in rendercanvas,
but feel free to close the PR if you don't think so

saw the fix in wgpu, taking mine down

@Lcbx Lcbx closed this Jan 10, 2026
@almarklein
Copy link
Member

Thanks for the effort though!

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.

3 participants