Re: Turning snap-window-position-to-edges into a policy


A couple of days ago I read Derek Upham's message on "hard screen
boundary" hack which was posted 17 February 2009, and it interested
me. It touches the snapping function, but I didn't know "snap" feature
altogether. I bet many don't know, so let me explain it first.

When you move a window and it comes close to another, sawfish adjusts
the position so that its edge fits to the other, or ``snaps''. (It may
be dubbed as ``interactive tiling'', if you dare) Snapping also takes
place agaisnt screen boundary.

At the bottom of the move/resize section in configurator, you can
change the value of "move-snap-epsilon" which is the distance in pixel
where snapping happens. The bigger the value, the more adhesive 
windows get.

Derek's code makes the screen edge "hard", so that dragged window
remains within the screen, regardless of how far the pointer goes, but
it drops the support of snapping against windows. (So he doesn't need
the usual snapping.)

Does anyone like snapping? (If it is useful, it is possible to
implement a new command, move-window-interactively-snap which is a
variant of move-window-interactively with temporarily big
move-snap-epsilon, so that you can easily tile windows with mouse.
But I don't give unwanted feature, in order to keep sawfish neat.)

Snapping style once was an option. Today move-snap-mode is implicitly
set to 'resistance, but others are still available. 'magnetism is more
aggersive, invoking snap both inside and outside of window. (In
resistance, only exterior edges get snapped.) One more mode
'attraction is there, but I didn't see any difference from resistance.
If this option is popular, then it can be resurrected. Otherwise,
there's no reason to do so.

On Tue, 17 Feb 2009 20:38:53 -0800, sand blarg net wrote:
> What would people think about turning the edge behavior into a
> configurable policy, beyond move-snap-epsilon?

Let me point out that snapping and hard boundary are separate,
independent things. So we can add the latter, if someone likes it.
Personally, I don't need hard boundary.

> (defvar move-force-off-edges nil
>   "Allow the window to move beyond the screen edges, even when
> MOVE-SNAP-EDGES is true.")

move-snap-edges is not used any more. It's completely eradicated,
and the only configurable option for snap is move-snap-epsilon.

Don't blame my hyper-slow response ;-)

Teika (Teika kazura)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]