This is about an accident during elastic paging development, but
it feels "good" to me.  I've secretly always hated the "snapping"
effect of snap attraction.  Windows jumping around is confusing,
especially if the distance is big, e.g. if you use a "100" edge
resistance.  So here is the new idea:

When one window is pushed against another window's border or some
other barrier (screen edge, whatever):

  A         +----    B     +----      C   +----
       *    |              |*             |   *
  -----+    |        -----+|          -----+
       |    +----         |+----          +|---
  -----+             -----+           -----+
         ->               ->              ->

It stops in that position while the pointer moves on (* in the
image), image B.  When the pointer finally moves too far, the
window does not jump towards the pointer position but simply
resumes moving as if this "blocking" never happened (image C).

When moving the window back to the left, it just moves freely
without being blocked in any place.

Think of the other windows border as a jammed door:  To get
through, you have to push.  This causes pressure, and when that's
hight enough, the door opens.  Going back is easy because the door
is already open.  And if you can give up pushing at any time and
just walk back.


To push a window past the screen edge, just keep pushing.  Once
the edge's resistance is overcome, the window moves as if nothing
had happened.  When you pull it back, it won't snap back to the
screen unless you push it aginst the border again.


This is now all possible because the elastic paging code keeps the
pointer in the middle of the screen (invisible).

There may be some tricky situations when top and bottom border are
both near obstacles.


To get a feeling for the new code (maybe 40% complete), check the
latest version of the branch "dv/elastic-paging-prototype".

It doesn't have paging yet or the new "snap" method.  But do try
to move windows over screen edges and try pressing Shift/Control
during mouse movement.  With Shift the window moves much faster
(factor 8) and with Conrol slower (factor 0.5).  Now that the
fixed offset between pointer and window position doesn't exist
anymore, it's easy to do things like this.


Dominik ^_^  ^_^


Dominik Vogt

Reply via email to