-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Desktop] Can't capture native inputs in windows using windowHandle #4934
Comments
Interop blending is just putting Compose above the interop and makes it transparent. So since events are received to top-most view, yes, it's not the same to swing. For interop view compose redispatching events to right view manually via AWT/Swing API. So the situation is explainable but it's about implementation defaults of not only Compose but also AWT/Swing. |
Is there a way to get the handle for Compose view? |
Well Compose has a few views internally. Public |
Currently it's working fine. I'm accepting events from all views of the window but sometimes I'm getting some unwanted events (ex: events for window top bar) which is filtered now using Thank you! |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
I was trying capturing native input events in desktop to get some data related to stylus (pressure, tilt...) and I used
window.windowHandle
to access native window and it's working fine for macos. But for windows I realised that theHWND
created by thewindowHandle
is different than theHWND
coming with the events when the cursor is on top of my composables. But when I move the cursor on top of the window top bar or on top of swing components theHWND
coming with the events is the same as theHWND
from thewindowHandle
in case of interop blending is disabled but when I enable interop blending even hovering on top of swing components gives a differentHWND
than the events.I'm not sure what's happening exactly behind the scenes but I think that compose is getting rendered on a kind of invisible window on top of the swing window (Sometimes closing the app doesn't go well and only the compose content disappears but the window and swing components remains visible which increased my suspicion that there's two windows on top of each other).
Affected platforms
Versions
The text was updated successfully, but these errors were encountered: