There could be more situations where windows 'snap'

Bug #1195949 reported by BryanFRitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
New
Undecided
Unassigned

Bug Description

(note I wrote most of this a while back, when my computer crashed, or something, I forgot what, and most of this come from a backup copy)

With 'Snapping Windows' the moving window will be snapped as it gets separated from a window it is overlapped with. However, "With the 'Wobbly Windows' plugin there isn't a pull apart snap at all. i.e. when windows are overlapping there isn't a snap when a window is pulled apart so that it isn't overlapping anymore. There's only a snap for when windows are moved closer together, even though it might be better if it could do both ways."

Both plugins are missing same side to same side snaps. Like the left side of the moving window to the left side of a stationary window.

There could also be corner to corner snaps.

ways of snapping totals to an object to another (assuming I didn't miss any)
moving window to snap to'd window.
4 corners to 4 corners each = 16 (?could subtract out same corner to same corner, as it would be included in the below?)
left-to-left
left-to-right
right-to-right
right-to-left
top-to-top
top-to-bottom
bottom-to-bottom
bottom-to-top
total = (4*4+4*2=24)-4=20

Possibilities for direction of travel, horizontal, and vertical (-, 0, +)*(-, 0, +), (3*3=9)possibilities of motions, 4 quadrants, 4 axis points, 1 origin.

Of course there could be ties based on distance as to which one is closer to snap to where both can't be done. In that case snap the window to the direction that would be closer to where the moving window is heading (aka if the window were to keep moving in it's direction which one would it hit first.), or if it's not heading either way don't snap either way. (the case where the moving window is going exactly between two or more windows it could snap to)

For these snap to calculations use the location where the window would be during the move if it weren't snapped, even if it is or gets snapped.

examples

When one windows moves away from window 'A' towards window 'B', and it is exactly between at a spot between the two where it could snap to either one. In this case snap to 'B' because that's the direction the window was heading.

When a window is moving vertically down along the exact center between spots where it could snap left or right, and there isn't any motion one way or the other towards a side. Don't snap at all horizontally in this case.

-

side ideas/ thoughts:

What does edge resistance, and edge attraction of 1 or 100 mean? 'pixels' '%' ?, it's behaving so weird at different (or extreme) values I'm not sure what it means. Try it, see what I mean.

Where the mouse pointer clicks on a window to start a drag should be where the mouse pointer ends on a window when a window move via drag is done, except in the case of where it ends up snapped. (all though there might be some other cases...)

This stuff could also be applied to a snap option during resizing windows too.

Put 'Move', and 'Snap' together as one plugin?

Option to include/exclude hidden* windows from these calculations
*This could be windows that are minimized, behind other windows, etc... (maybe even where windows are on other viewports like they are on the same viewport)? <-probably weird, but maybe someone could use it?)

Tags: snap
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.