Open itspectre opened 2 years ago
The forward parameter is already supported on the macos platform, you can view the example.
But I haven't found out how to implement it on windows platform
The forward parameter is already supported on the macos platform, you can view the example.
The problem is that adding "acceptsMouseMovedEvents" in the swift file probably is not enough for getting desired behavior. Or it could be made by something else. I have created two simple demo projects - one uses Electron.js and another - Flutter with the new version window_manager from this repository. You can watch videos in these repositories that demonstrate this problem.
In Electron I can continue getting mouse movement events after clicking on the application window with parameter "forward = true", but in Flutter window_manager it doesn't work, although before clicking I can get these events. In the Electron video, when the mouse enters the button's area, I can change window opacity and ignore mode. But I can't do it in window_manager because the app window doesn't get mouse movement events after clicking on it.
Also, there is some strange behavior - with "forward = false" when mouse leaves the window area and then returns - my window starts getting movement events. But in Electron.js I have found out similar situation.
This is for Flutter (including video): https://github.com/bdorlov/wm_test
This is for Electron (including video): https://github.com/bdorlov/ignore-mouse-events-electron-test
The code with Flutter demo here: https://github.com/bdorlov/wm_test/blob/master/lib/main.dart
I have also been troubled by this issue recently, and I hope it can be fixed
Do we have any update on this? I need to ignore mouse events but its position so I can check if is on top of a widget and then stop ignoring the events.
I have a similar problem when trying to create an overlay-type application. I hope you find a solution to allow mouse events to pass through but still be listened to.
Related to #89 Thank you for adding setIgnoreMouseEvents, it works, but there is the unused parameter «forward» in the declaration of this function. It exists but does nothing. In electron.js if it is «true» then the window will also be getting mouse movement events. It can be useful for detecting enter/leave mouse to some widgets in the app window for setIgnoreMouseEvents toggling, especially if the window is always on top.
I have tried to add «mainWindow.acceptsMouseMovedEvents = true» in setIgnoreMouseEvents In WindowManager.swift (I use MacOS). It started detection mouse movement in case setIgnoreMouseEvents(true) (I use Listener and MouseRegion with their movement handlers). But when I click on the app window and its focus is lost, that moving detection also stops. Although I see the app window above another window (isAlwaysOnTop is true). In electron.js this way works right. Is it possible to implement «forward» with such right behavior? I mean, the next situation: setIgnoreMouseEvents(true, forward: true) setAlwaysOnTop(true)
In these settings, we can click on the app window, it loses focus, but can get mouse moving events. (the window under it gets all mouse events). It would be really good if you could add «forward» with such behavior.
From Electron documentation: