rocksdanister / lively

Free and open-source software that allows users to set animated desktop wallpapers and screensavers powered by WinUI 3.
https://rocksdanister.com/lively
GNU General Public License v3.0
15.26k stars 1.07k forks source link

Mouse clicks events aren't being passed correctly #1838

Open jumpsplat120 opened 1 year ago

jumpsplat120 commented 1 year ago

Describe the bug When using an application wallpaper (Love2D in this case), mousepressed events are being fired at odd times. When a click has happened, the event fires once, then, fires again once the mouse has moved. This causes every click to effectively function like a double click. The program functions as expected when simply running as an application, and only starts misbehaving as a wallpaper.

To Reproduce Create a basic love2D project that implements love.mousepressed, then print the output on the screen.

Expected behavior I would expect the mousepressed event to only fire when I click.

Screenshots/Video evidence.webm

Desktop (please complete the following information):

lively_log_20230812_230726.zip

jumpsplat120 commented 3 months ago

Just wondering if there's any follow up on this. A few updates have gone by but this continues to be an issue.

rocksdanister commented 3 months ago

Can you make a sample live2d project for testing?

The project is becoming too difficult to manage everything by myself, this is the code that forwards mouse (Wallpaper application is behind desktop icons and does not receive inputs without implementing global hooks) to the application:

https://github.com/rocksdanister/lively/blob/d5ca68c17663242c15580b55962364ac4061f89e/src/Lively/Lively/Views/WindowMsg/RawInputMsgWindow.xaml.cs#L294-L332

https://github.com/rocksdanister/lively/blob/d5ca68c17663242c15580b55962364ac4061f89e/src/Lively/Lively/Views/WindowMsg/RawInputMsgWindow.xaml.cs#L172-L181