-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
niri msg pick-window
#1031
base: main
Are you sure you want to change the base?
niri msg pick-window
#1031
Conversation
2a25a6d
to
368d47d
Compare
See commit message:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally I tried to indicate picking was occurring by turning the cursor into a crosshair, in the same way as the screenshot UI in the seat handler but that means we're forgetting what the original cursor was, I think doing it here will work but still feels a bit hacky, so I removed it for now.
I would say that having a crosshair cursor is more important than remembering the original cursor. So if there's no easy way to restore the original cursor, just make it crosshair with a FIXME comment.
I think some visual indication of what window you're about to pick would also be good. But I guess that can be done separately.
WIP: Currently the ipc server gets stuck waiting for niri to return the
picked window, and if the ipc client closes it doesn't realize that until
niri returns the picked window leading to "ghost" window picking.
Hmm, yeah, maybe some kind of future::select()
can be used to also check for the client disconnecting?
|
On the other hand, maybe it's not that big a deal? Picking is a quick operation either way |
a130828
to
c0ae10f
Compare
808571b
to
15bec65
Compare
Added some minor fixes. However, I'm now realizing that this should be a pointer grab. Because you don't want the mouse events to go to windows while you're picking. See how spatial movement grab works for example. It also shows how to change and restore the cursor without the condition in the cursor rendering code. |
What should happen when there's already a grab when a request to pick a window is invoked? Should it instantly return |
I think it should cancel the ongoing grab. This is stuff like popup grabs, or ongoing DnD.
Get the current location I guess. |
8e9b56b
to
9c31798
Compare
I don't like that the cancellation logic is now very hidden in the ungrab handler and the code makes the assumption that |
recording.mp4
Originally I tried to indicate picking was occurring by turning the cursor into a crosshair, in the same way as the screenshot UI in the seat handler but that means we're forgetting what the original cursor was, I think doing it here will work but still feels a bit hacky, so I removed it for now.
Fixes #589.