-
Notifications
You must be signed in to change notification settings - Fork 932
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
Add ActiveEventLoopExtWindows::rwh_06_window_handle
#4083
base: master
Are you sure you want to change the base?
Add ActiveEventLoopExtWindows::rwh_06_window_handle
#4083
Conversation
If the intention is to be able to subclass the window target window, I think it would be better to expose that functionality directly. Maybe just with an "add_subclass" function, in addition to this code: |
I'm worried that the current code is more of an implementation detail rather than how it'll always be, from what I can see, since there were issues with this design wrt loop blocking during resize, so I'm not sure whether exposing it makes sense, since we could always change that and supporting API for what we don't need internally would be rather strange. |
any reason to do this? I mean it will basically be the same, get |
Do you mean that winit maybe, in the future, decide to not depend on a hidden window for the event loop? if that does happen, It will probably include a breaking change and won't be a problem to remove this method as well. |
I think getting a window handle out of event loop is rather confusing, since there's no window semantically. So juts an API that gets you HWND could be actually better in that case. |
Exposing the |
changelog
module if knowledge of this change could be valuable to usersThis can be helpful when I need to listen to a few native win32 messages by using
SetWindowSubclass
on the winit event loop window targetHWND
.Alternative would be for me to create a hidden win32 and listen on messages on it but for simple use cases this is an overkill IMO.