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

Dragging with mouse modifier is not as smooth as native window movement #285

Closed
haze opened this issue Oct 17, 2019 · 4 comments
Closed
Labels
enhancement New feature or request

Comments

@haze
Copy link

haze commented Oct 17, 2019

See here
The first drag is using a click and drag on the window border, while the second is using the mouse modifier. Is there any way to make this smoother?

@koekeishiya
Copy link
Owner

I have an idea of how to do this better now, yeah. Will try to find time to implement it during this weekend.

@koekeishiya koekeishiya added the enhancement New feature or request label Oct 17, 2019
@haze
Copy link
Author

haze commented Oct 21, 2019

@koekeishiya is there also plans on improving the latency on resize + move event ingestion? it seems like it is throttled. Holding down the keybind turns transforms minutes of window lag.

@dominiklohmann
Copy link
Collaborator

defaults write -g NSWindowShouldDragOnGesture -bool true

Run the above, then reboot. You can now resize windows from anywhere by holding ctrl + cmd (which, if fn is not an option, is the only availabale two modifier key combination that's free for mouse actions).

Maybe there's a way to trigger this behavior with a custom shortcut?

koekeishiya added a commit that referenced this issue Nov 9, 2019
@koekeishiya
Copy link
Owner

Removed throttling for mouse-drag movement. This is possible because we can use the scripting-addition to move the window in this scenario. We avoid the conflicting issue where we try to use the AX API and the CGS API simultaneously (frame synch issues) that I noticed earlier when trying to get rid of the AX API for.

I've reduced the throttling applied when resizing a floating window drastically, and lowered it for tiled windows as well, but resizing through the AX API is inherently not a cheap operation. A potential solution would be to inspect all events sent to the window when performing a native corner resize, isolate the relevant events, and simulate said sequence of events from yabai.

Now there is some part here that we are not in control of, if that is what you are referring to.
When a window is moved or resized, we get notified by the operating system and act accordingly. This is mostly used for update the frame of window borders. The delay that you see here is not something that we are able to affect.

@koekeishiya koekeishiya added addressed on master; not released Fixed upstream, but not yet released and removed addressed on master; not released Fixed upstream, but not yet released labels Nov 9, 2019
brorbw pushed a commit to brorbw/yabai that referenced this issue Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants