-
Notifications
You must be signed in to change notification settings - Fork 929
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
Implement WindowEvent::Minimized
and WindowEvent::Restored
for Windows
#3200
Conversation
8e82d31
to
6c5dc6d
Compare
I haven't noticed the PR though I tried searching PRs with some words. I have two questions about the PR:
|
The
Apparently not. I was just leaving it here for reference. E.g. the way you implemented it is not how we used to intend to implement it. I would prefer to go down the route of something more comprehensive like Let's just wait and see what other maintainers have to say about this. Imo we should just proceed here, if/when this merges, I will also make a PR to add Web support. We can always re-discuss merging these events into something like |
I think adding minimized events is not really a good idea. We already have |
We had a similar discussion before here: #2980. I still don't understand why this remains a bad idea. I completely agree that
Would you mind elaborating on that? |
Minimize doesn't mean that you don't have to render, because compositor could show a preview. Like the preview you have when however over application in windows bar. |
Yeah, that's a more complicated problem though and honestly makes information like that even more important. |
The thing is that compositor can send |
Ah alright, nice! |
The thing is that only macOS/Wayland has this event delivered reliably iirc. On Web it should be as well. And that's the only event you can trust to pause rendering. |
Sure, I mean we can add this kind of information in the documentation. I'm surprised this doesn't work reliably on Windows (though I haven't used Windows in a very long time now). Pausing rendering should remain in |
yeah, but we have this sort of information on I just don't want to add more events... |
@daxpedda @kchibisov Thank you for the further comments. I understood the situation and the |
|
Ah, no, you were adding for |
Ah, I see. Then I think I need to wait for #2929. |
I may not get the discussion well. Should I modify this branch as follows?
|
No, you shouldn't. You need something like that https://learn.microsoft.com/en-us/windows/win32/api/dxgi1_2/nf-dxgi1_2-idxgifactory2-registerocclusionstatusevent or https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/waiting-when-occluded |
Thanks. I didn't know this D3D API. |
CHANGELOG.md
if knowledge of this change could be valuable to usersThis PR partially implements #1578 by adding new window events
WindowEvent::Minimized
andWindowEvent::Restored
.