-
-
Notifications
You must be signed in to change notification settings - Fork 177
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 DeviceEventFilter on Windows #465
Conversation
if msg != WM_PAINT { | ||
RedrawWindow(window, ptr::null(), HRGN::default(), RDW_INTERNALPAINT); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the reason for removing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling RedrawWindow
will trigger intense WM_PAINT
signals which is one of the reason for webview2 delay.
I moved them to each match arm when we really need to handle something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not the same behavior as before and I am afraid it might bring drawbacks and issues for integrations like egui that depend on drawing events. I don't understand drawing events of the event_loop pretty well but I think we should be careful with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This signal is more used for sending clear events. In its WM_PAINT
arm, it checks if there are events still need to handle.
Other windows should also have their own WM_PAINT
arm to handle drawing event.
I'll open an issue on winit to ask about if this is safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now that the event filter is set for device events properly in 5ac18b4, do we still need this change? should I revert it
winit just merged the device event filter for windows, rust-windowing/winit#2409 |
That's the just the PR author testing, it should work fine for |
I'm a little busy on mobile support at the moment. I can resume this work once it's done. Or anyone is interested can take it too. |
I can take this |
Co-authored-by: ajtribick <ajtribick@googlemail.com>
@amrbashir I rebased the PR to resolve merge conflict. Might need your approve since this is my PR. |
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information