yofi icon indicating copy to clipboard operation
yofi copied to clipboard

Close window on outer region click

Open l4l opened this issue 4 years ago • 2 comments

It would be nice to handle mouse clicks and touchpad devices touches so the app is closed on clicking/touching the outer region. There's no need for special handling, just calling exit(0) will do the thing.

l4l avatar Dec 29 '20 11:12 l4l

Hey, is there still some interest in implementing this feature? I had a quick look and added listeners for touch and pointer events here.

However, I don't think there's an easy solution to get these events if they happen outside the surfaces yofi owns, i.e. I can only check clicks on yofi itself. One idea I had is to create a big 'background' surface over the whole screen so we can listen to all click events, but that doesn't seem quite right to me.. Do you have any suggestions?

KuabeM avatar Feb 10 '23 09:02 KuabeM

I didn't dig deep into that issue myself so don't have much details to share. What you are saying seems expected as wayland by default does not allow capture events outside the window easily and the zwlr_layer_shell provides only keyboard interactivity. I think setting the window size as full screen is fine and then damaging only its part on redraw.

l4l avatar Feb 12 '23 03:02 l4l