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

Move window to new display with mouse #103

Closed
jessebett opened this issue Jul 8, 2019 · 11 comments
Closed

Move window to new display with mouse #103

jessebett opened this issue Jul 8, 2019 · 11 comments
Labels
enhancement New feature or request

Comments

@jessebett
Copy link

Discussed in #4, yabai supports moving and resizing windows with the mouse. However I am inconsistently able to move windows between displays with the mouse. (Though at the moment I am wholly unable, so I don't know if it was a bug that it worked previously).

When I drag a window with the mosue to a different display it snaps back to the original. Is there intended support for --display with mouse?

@koekeishiya
Copy link
Owner

However I am inconsistently able to move windows between displays with the mouse. (Though at the moment I am wholly unable, so I don't know if it was a bug that it worked previously).

Moving across display boundaries is currently not supported.

@dominiklohmann
Copy link
Collaborator

This (sadly) applies to window focus commands as well. This brings back #33. Maybe focusing windows should be possible on all "active spaces" (per the terminology discussed in that issue) instead of only the focused space?

@koekeishiya
Copy link
Owner

I currently have no interest in adding this. I like the fact that spaces operate separately for now, as this leads to less mental complexity in my arrangement. If I want to move around within a space - use this set of operations. To move across spaces - use this set of operations, etc.

@jessebett
Copy link
Author

@koekeishiya It seems that you closed this issue referencing the other issue I opened about focusing across spaces. I agree that that behaviour should not be the default, for the reasons you just described. However, those points are relevant in #104, and maybe we can discuss solutions there for improving the commands to focus across spaces instead of that current solution of catching errors.

But this issue was closed without commenting on why it shouldn't be supported. Rearranging windows with the mouse is sometimes quite nice to quickly set up a workspace. It is supported within a space, so it feels wrong that I shouldn't be able to drag to another space.

If I want to move around within a space - use this set of operations. To move across spaces - use this set of operations, etc.

To move across spaces, the set of operations supported should include mouse dragging to the other display.

If your previous comment is that it is currently not feasible to implement for the same reasons as #104, maybe it is possible to use whatever solutions come from that thread to enable this? In any case, I don't think this issue should be closed unresolved.

@koekeishiya
Copy link
Owner

koekeishiya commented Jul 9, 2019

This feature is very simple to support - I just don't want to, at this point. Maybe I'll change my opinion on this further down the road as discussion progresses in #104 as you mentioned. As I mentioned in #13 I am not as open to suggestions or features as I have been in my earlier projects if they conflict with what I prefer myself - at least not at this stage. You could argue that it could be a config option and it'll be fine, but in the end I don't want there to be too many options either.

If you would like to create a fork and implement this feature I would be happy to help you with that.

Supporting this particular feature across displays would by the looks of it require changing 4-5lines of code in https:/koekeishiya/yabai/blob/master/src/event.c#L850

@koekeishiya
Copy link
Owner

koekeishiya commented Jul 10, 2019

@jessebett

I re-read the last comment made by @dominiklohmann in #104, and noticed the following in particular:

Additionally, left click drag across monitors makes more sense as a warp action than a swap action, which should probably be available as an option.

Where as I previously stated that I don't think a swap across displays is something that I want to implement, I do agree that simply resetting the window back to its original display does not make for the best experience. Performing a warp action in this scenario does in fact make sense to me, and would make for a better experience. I do however not think this should be available as an option - it should be a part of the feature in my opinion. If there is no window to warp into on the destination display, the window should simply be tiled as it would be if you had issued a move to display command using a keyboard shortcut.

I want to apologize for closing this issue prematurely, thus not allowing a discussion to lead to this solution.

@koekeishiya koekeishiya reopened this Jul 10, 2019
@koekeishiya koekeishiya added enhancement New feature or request addressed on master; not released Fixed upstream, but not yet released labels Jul 10, 2019
koekeishiya added a commit that referenced this issue Jul 10, 2019
@koekeishiya
Copy link
Owner

Implemented on master.

@jessebett
Copy link
Author

@koekeishiya Thank you for your consideration! I absolutely understand not wanting to this project to get bloated or your time distracted by feature requests. Especially given that I have just started using the project, so my opinion on how things should behave may be suspect. Also, thanks @dominiklohmann for the warp vs swap observation.

I'll take a look once this is in release. Thanks again!

@dominiklohmann
Copy link
Collaborator

Found a slight bug with the implementation. Other than that it works really well.

I cannot drag out a chrome tab to another display. This is probably because the window is being created while the mouse drag action is happening.

@koekeishiya
Copy link
Owner

I cannot drag out a chrome tab to another display. This is probably because the window is being created while the mouse drag action is happening.

I tested this and can confirm your hypothesis. The window is created while the mouse-drag is happening. This is not something that is trivial to support. The mouse-integration relies on us being able to store all necessary information upon receiving the mouse-down event.

@dominiklohmann
Copy link
Collaborator

This is not something that is trivial to support.

Figured as much. I don't think this is a big deal, much like #16. It should probably be noted somewhere as a known issue.

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