Mouse events in WebEngineView as a Wallpaper

I’ve been working on a web wallpaper plugin for a few days, and then just found out that all mouse events don’t work at all, they only work if there’s a focused element in the web view and then put the cursor on a Plasma panel.

I know that this might not be possible, but is there a way to make the pointer events work without having to edit anything from Plasma?

I’ve been also thinking on working on a custom mouse API instead of using document.addEventListener to listen to mouse events, but I also think it may make things harder if someone want to add mouse event listeners to other DOM elements.

This is the repository of the project if someone is interested in helping me: Edgar Lima / KDE Web-Based Wallpaper · GitLab