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

Navigate with mouse #102

Open
LGFae opened this issue Apr 21, 2022 · 1 comment
Open

Navigate with mouse #102

LGFae opened this issue Apr 21, 2022 · 1 comment

Comments

@LGFae
Copy link

LGFae commented Apr 21, 2022

Currently, the only to navigate in yofi is through the keyboard. This includes both scrolling and selecting an entry. It would be great if one could also scroll and select an entry with the mouse.

My current problem is that I want yofi to pop up when I click something in a taskbar, put then I need to let go of the mouse and type what I want, regardless of whether it's right there on the screen in front of me.

@l4l
Copy link
Owner

l4l commented Apr 22, 2022

I also was thinking about this problem (pushed skeleton for mouse support at https://github.com/l4l/yofi/tree/wip-mouse-support) and that's actually not a hard one to implement.

Essentially one need to accurately calculate list item index by y-offset as specified in list_view.rs for each wl_pointer::Event::Motion (though this one is quite hard to grasp) and apparently moving out to some common utility functions. With the offset it's possible to get an entry index (similar to selected_item) and then click (wl_pointer::Event::Button) is close to Enter (aka XKB_KEY_Return) handling.

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

No branches or pull requests

2 participants