Skip to content

Is there a cross platform way to achieve mouse penetration? #17836

Answered by thevortexcloud
metaone01 asked this question in Q&A
Discussion options

You must be logged in to vote

This question has been asked several times. There is no built in way in Avalonia to do this. It can be done though if you are willing to write the native interop code yourself. Avalonia generally exposes things like the native window handle which should be all you need to modify the window behaviour with native APIs. But not all platforms necessarily allow for clicking through windows.

For Linux you can use the XShape API. But there are almost no C# examples for it and the examples that do exist are in C++/C.

https://en.wikipedia.org/wiki/Shape_extension

For Windows you just need to set some window flags from memory. But I don't remember which ones.

https://learn.microsoft.com/en-us/windo…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@metaone01
Comment options

Answer selected by metaone01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants