-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to resize a window? #590
Comments
Nope that's currently not possible, mainly because this doesn't make sense in browsers and on mobile platforms. I had started to add more window functions in a WIP multiwindow-branch (which stalled because of various problems on macOS), but it might make sense to move at least those functions over into the main branch (with the setter functions being empty stubs on platforms where programmatic resizing doesn't make sense). Lines 1497 to 1521 in 57688eb
|
I'd love to see this in the main branch. Do you plan to continue the multiwindow branch in the near future? This is something I'm really looking forward to. And by the way, thanks for this awesome library. |
I don't know yet, on macOS I was hitting a wall that the whole application is blocked for around a second if one window becomes obscured. A workaround would probably require to run each window in its own thread. The next big feature will probably be finishing the WebGPU support in sokol_gfx.h and sokol_app.h. |
I think this would make sense anyway.
Sounds interesting! |
fwiw, this pr ocornut/imgui#4821 claims to address an issue in dear imgui that involves imgui suspending when a window is obscured on mac. wonder if there's any clues in there that might help here. "✅ Fix a performance / hang issue when a window is completely occluded, which resulted in nextDrawable hanging for about 1 second, causing ImGui to become unresponsive" exactly the same maybe? |
Oh, interesting. Yes this sounds like exactly the same issue I've been seeing. Thanks for pinging me! |
@floooh if the |
Thanks @stuartcarnie, I need to try this :) IFIR I had checked the occlusionState member before but found that this triggers too late, but maybe I did something wrong there. |
+1 for window resize method
Actually I was needing such feature in the browser, that is, to change the canvas size at runtime, so I think it makes sense in the browser. My workaround at the moment is to resize canvas using JS code. |
Has anyone developed a branch with this functionality? theres working code here for mac os: |
Hello,
I've noticed that it is possible to specify a size when a window is created, but I can't find a function to change it later.
Have I missed something or is this currently not possible?
The text was updated successfully, but these errors were encountered: