Letting the mouse pass through Windows Flutter
101
You can do it using the setIgnoreMouseEvents method of window_manager
https://github.com/leanflutter/window_manager
https://twitter.com/lijy91/status/1502115704677433353
Author by
Anas-Qasem
Updated on January 03, 2023Comments
-
Anas-Qasem 10 months
I am working on a Flutter Desktop screen Annotation Application where I want to ignore the mouse events and let is pass through the window (so I can click on desktop application shortcut) when the icon(Red Box) Activated, and ignore it when one of the options in the blue box is activated. I am using flutter_acrylic to make the window transparent, and I know that I should use win32 to handle this functionality. but I really don't know the way to do that :(
Thanks in advance for the help.
-
IInspectable over 1 yearUse a layered window instead: "Hit testing of a layered window is based on the shape and transparency of the window. This means that the areas of the window that are color-keyed or whose alpha value is zero will let the mouse messages through."
-
jtxkopt over 1 yearI am not sure but 'WS_EX_TRANSPARENT' may be another option.
-
IInspectable over 1 year
WS_EX_TRANSPARENT
won't do. Like the cake, WS_EX_TRANSPARENT is a lie, or at least not the entire truth. -
Anas-Qasem over 1 yearHow I can get the hWnd inside flutter files ?
-
Jeaninez - MSFT over 1 year@Anas-Qasem You could refer to the thread: stackoverflow.com/a/59440034/11872808
-