[FIX] (minor) resize repeatedly redraws the window

Joerg Beekmann jbeekmann at equinix.com
Wed Feb 21 17:33:09 UTC 2001


After a drag with fast drag enabled the cursor is left in the wrong position
between the time the button is released and the next mouse move. To
replication do the following:
- make sure fastDragForMorphic is enabled
- drag a window corner and release being very careful not to move the mouse
when or after releasing
- notice the handle morph is drawn at the original position; on Unix
platform the window is reportedly redrawn continuously.
- now move the mouse and see it jump to the correct position

This occurs because the dragging loop is looking at mouse move events and
the SystemWindow>>doFastFrameDrag swallows the mouseUp. As a consequence the
resize is not terminated until the next mouse move comes through and the
NewHandleMorph>> step method notices the current move event does not have
any mouse buttons down. A similar bug appears when resizing browser panes.

The simplest way to fix this is to change the:
    evt anyButtonPressed
                to
    Sensor anyButtonPressed
This is the change set attached. A better way to do this might be to ensure
the mouseUp event makes it through but that seems more trouble than its
worth.

A third way to fix this is to delete the NewHandleMorph after
doFastFrameDrag returns. This requires 3 changes to catch all the cases.
Also obscures the semantics of the code since your deleting the morph from
within a callback block.

As this is my first bug fix submission let me know if I'm not following
correct procedure.


Joerg

-----------------------------------------------------
Joerg Beekmann
jbeekmann at attglobal.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: WindowResize.1.cs
Type: application/octet-stream
Size: 605 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010221/753fe429/WindowResize.1.obj


More information about the Squeak-dev mailing list