-
Notifications
You must be signed in to change notification settings - Fork 20
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
Cursor warp and focus options not respected #115
Comments
I read the Wiki to try to understand what that does, and it says it applies to floating windows. Does it mean it is a rule applied when you turn a window floating? You will need to explain to me what it does and give me an example. I am not able to create one, I don't know what to expect. As for |
I have added support for |
Everything works perfectly now. This also nearly solves another issue where |
Sorry, I don't use the mouse for window management, and use floating windows very rarely. So it would be very helpful if you told me exactly what doesn't work and how to reproduce it...as if I had no idea about using Hyprland...which I basically don't, because I always have the plugin on :-) Please, tell me what you want me to test, what happens when hyprscroller is the working layout, and what you'd expect to happen (or what the standard layouts do in that case). Thanks. |
OK, the window dragging issue seems to be related to the changes I made in #113 I will try to find a way to fix both things at the same time. There are lots of edge cases. |
Window dragging should be fixed in e590a24 Please, let me know about the other issues. |
Yeah, after e590a24, this behaves more like In both tiling layouts, when a window is released above another, they switch places and assume the other's size. This wouldn't be ideal for hyprscroller. For starters, they should at least preserve their size after dragging: |
That is not possible without "memory". When you drag a window, it is removed from the layout, and when dropped back, it is re-inserted again. If there is no memory of removed windows, the window has to be treated as new, so the size will be a default size. That is also what happens with Master or Dwindle, you drop the window on a certain "slot", and its size simply has to take the size assigned to the "slot". A layout shouldn't keep a "memory" of old windows. It can be done, but it is dangerous. |
Unfortunate, I know floating windows recall their size. Here's what I'm thinking... on release of a dragged window Ideally, the method for determining where a window gets inserted would split the target window into zones, e.g. if your cursor is in the bottom half of window Up to you whether this placement method is also used in case (2) for consistency. |
Hyprland stores the size of floating windows in the Window structure, because they belong to Hyprland instead of the layout. But it doesn't store any information that belongs to the layout alone. What you propose doesn't solve thee issue of size. The new window will always have the default size of inserted windows. When you drag:
If you want to move windows, there are plenty of options what keep size without using the mouse. you can:
There are plenty of ways to move things around without having to keep memory of "old" windows. Those diapatchers work because the windows they move never leave hyprscroller. I mean I can hack something for this particular case to work (most of the time), but then someone would complain they also want to override the mode (insert the dragged window in a column even if they are in row mode), then they would want this hack to work for floating windows that "come back" etc. Once I open the door to "memory" it won't end. The way it works right now, is exactly like Master or Dwindle do. |
That is how it should work.
|
I saw what you did with |
It is the same. The difference is what they consider the point of insertion of the new window. There has to be one, and it is arbitrarily decided by the layout. Dwindle uses nodes in a tree, so the focus changes to a point in the subtree. When you drop the window, it inserts it as if you created a new one with that subtree node focused. hyprscroller does the same; it is just our insertion position is after instead of varying depending on where the window is. What you want is to modify that, and have an insertion position that is variable: before in the example above. But how would you then be able to insert the window after if that is what you wanted? You want an insertion point that depends on things other than the active window, the number of windows etc. You want something that depends on mouse position, doesn't depend on the current mode etc. It is not as simple. There would need to be a specification that covers all edge cases. Right now, it is completely predictable, and follows the rules of inserting windows. I think it would even support |
LOL I was messing with list.h and yeah I can't be bothered. Should've read what you said... thanks for explaining. |
No problem. Is there anything else to fix for this issue to be closed? |
Given the constraints, lgtm |
I'm trying to use
windowrule = move onscreen cursor -50% -50%, <window>
, but the window always spawns centered above the tiled window beneath because my mouse warps there. This is especially strange since myfollow_mouse
is set to 0.This also means that
cursor:persistent_warps
is broken (focusing a window always warps the cursor to the center).Can confirm this works as expected if I set
general:layout = master
The text was updated successfully, but these errors were encountered: