Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for click-to-exit on wayland #95

Closed
wants to merge 1 commit into from

Conversation

Nemo157
Copy link

@Nemo157 Nemo157 commented Oct 26, 2023

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 🙃).

fixes #22

@Nemo157
Copy link
Author

Nemo157 commented Oct 27, 2023

One thing I need to change, this results in a success return value.

@lbonn
Copy link
Owner

lbonn commented Oct 28, 2023

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.

@lbonn
Copy link
Owner

lbonn commented Jan 7, 2024

@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.

@Nemo157
Copy link
Author

Nemo157 commented Jan 8, 2024

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.

@earboxer
Copy link

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 (hyprwm/Hyprland#2017)
which I have a fix for at hyprwm/Hyprland#4401

@Nemo157
Copy link
Author

Nemo157 commented Jan 12, 2024

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).

@loki1368
Copy link

Hello! Please merge this PR. I'am waiting for it for several months.

@wjoel
Copy link

wjoel commented Apr 16, 2024

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.

@Nemo157
Copy link
Author

Nemo157 commented Apr 16, 2024

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 😁). 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.

@Nemo157 Nemo157 closed this Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] -click-to-exit not working
5 participants