waycrate / exwlshelleventloop

winit like binding for layershell and sessionlock
MIT License
46 stars 10 forks source link

Ability to disable pointer interactivity for a layershell window #91

Open Exidex opened 3 days ago

Exidex commented 3 days ago

Sometimes it is useful for a window to be click through, e.g. osd/hud popup

Wayland protocol page says:

Layer surfaces receive pointer, touch, and tablet events normally. If you do not want to receive them, set the input region on your surface to an empty region.

But it looks like iced_layershell doesn't provide this functionality. It is however implemented in PopOS's iced fork, you can find code fragment here:

https://github.com/pop-os/iced/blob/256863574bacfb1d2797c2a48cba7a3388cbeb59/winit/src/platform_specific/wayland/event_loop/state.rs#L788-L795

Decodetalkers commented 2 days ago

I think the problem is how I can know the region when using the iced...

I have already supported this protocol in layershellev, but I do not quite know how to use it...

Decodetalkers commented 2 days ago

Can you take a try for this pr? and for some advices?

Exidex commented 6 hours ago

Thank you for such fast changes. I am not able to do the testing at the moment, so we can close the issue and I will report any problems I find in new issue