Closed Nemo157 closed 3 months ago
One thing I need to change, this results in a success return value.
Nice! Unfortunately it's not working on sway 1.8.1. I'll try to have a look at how Hyprland handles this internally and see if this kind of "feature" has been requested on sway as well.
@Nemo157 I don't consistently get (0,0) when clicking outside of the menu on hyprland either. A bit strange... Sometimes it works at the first click, otherwise a few clicks later.
Interesting, I don't use it that often as I mostly use the keyboard, but I haven't noticed any times it's failed. I guess I should go spelunking in hyprland to see if I can figure out exactly how it's meant to behave.
At least on Hyprland this works, having an overlay appears to capture all mouse events even outside the rendered view and reports any outside as coordinate 0,0.
This is a bug in Hyprland (https://github.com/hyprwm/Hyprland/issues/2017) which I have a fix for at https://github.com/hyprwm/Hyprland/pull/4401
Ah, I see. Is there any correct way to get exclusive mouse focus too then? (I guess maybe rendering as the full resolution with a transparent background covering the rest of the screen).
Hello! Please merge this PR. I'am waiting for it for several months.
Until something like this gets merged you can use -kb-cancel Escape,MouseMiddle
to close rofi by clicking the middle mouse button (for example) anywhere on rofi's window. Works well enough for me, anyway.
I should probably close this now since the approach is wrong (though I'm still personally using this as I haven't updated to a version of Hyprland where it's broken yet :grin:). I took a brief look at doing a transparent fullscreen overlay, but it didn't seem easy to fit into how the rendering is structured, and it may have other side-effects when combined with compositor features like blur.
At least on Hyprland this works, having an overlay appears to capture all mouse events even outside the rendered view and reports any outside as coordinate 0,0. (This does mean clicking exactly on 0,0 would also exit, but that seems an acceptably small target to me :upside_down_face:).
fixes #22