[net.micro.amiga] Intuition strangeness

crunch@well.UUCP (John Draper) (05/30/86)

  I am trying to write a "mouse handler" to draw a rectangle on the
screen,   by pointing to an area,  pressing a button,   and while
holding the button down,  "Drawing out" the rectangle.   Lets assume
that "  \" is the mouse pointer,   when I press at "A",   I pull the
mouse down and to the right and want to end up at "B" with a rectangle
drawn as shown below:
   
      A
       ---------------
       |             |
       |             |
       |             |
       ---------------
                     B\   <-- The "slash" is the mouse pointer.


  However,  what I am getting is rather wierd.   It appears that Intuition
is passing back incorrect Delta X and Y's  I an using DELTAMOVE flag set.
The cursor does not seem to track the mouse.    Instead,   I am getting
the following:

     A
      ---------------
      |             |
      |      \      |
      |             |
      ---------------
                    B

  Note the "\" in the middle of the square?  It appears as I move the 
mouse button slowly to the right,  the box grows TWICE as fast,  the
mouse cursor being exactly in the center of the box.   The following
code is done everytime Intuition passes a MOUSEMOVE event message.
I come into this with "x" and "y" being the values in the IntuiMessage
structure,   As I have mentioned before,  the DELTAMOVE flag is set in
the IDCMPFlags.

-----------------------------------------------------
    if (rt_button) {              /* $$$ */
       if (erase) {
          draw_box(rp, OLeft, OTop, OWidth, OHeight);     /* Erase old */
       }
       Width += x;
       if (!siz_flag) Left += x;
 
       Height += y;
       if (!siz_flag) Top += y;
 
       draw_box(rp, Left, Top, Width, Height);
       OLeft = Left;   OTop = Top;
       OWidth = Width; OHeight = Height;
       erase = TRUE;
    }
--------------------------------------------------------------------
   Is the delta X and Y values getting passed from intuition so far off
from the mouse arrow pointer??   


Please help!!!  - It is really hanging me up in releasing the Gadget
editor.

jimm@amiga.UUCP (Jim Mackraz) (06/01/86)

John describes apparent brain damage using DELTAMOVE.  This may well
be possible, and I will investigate further.

My suspicion is that the "mouse ratio" as set in preferences is not
being taken into account (within Intuition.) 
John might try changing that setting and seeing if that has an effect.

Assuming that there is a bug, I will pick it up for the next external Beta
release, which will be called Beta 4.
(I have been told that Beta2 went out to lots of people on Thursday
and Friday May 29-30.  I hope it arrives soon into everyone's hands.)

John could also do his own DELTAMOVE calculations.  That would have been
my first try, to determine if it was in my code or Intuition.

Others: have you tried DELTAMOVE?  (note that you need at least late
alpha kickstarts, or some Beta 1.2.)

			jimm

randy@cbmvax.cbm.UUCP (Randy Weiner) (06/02/86)

In article <1181@well.UUCP> crunch@well.UUCP (John Draper) writes:
>
>
>  I am trying to write a "mouse handler" to draw a rectangle on the
>screen...
>...However,  what I am getting is rather wierd.   It appears that Intuition
>is passing back incorrect Delta X and Y's  I an using DELTAMOVE flag set.
>...
>Please help!!!  - It is really hanging me up in releasing the Gadget
>editor.

	The DELTAMOVE function in Intuition does not work correctly
in version 1.1. This bug has been fixed in version 1.2.




-- 
     + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 
Randy Weiner -- Commodore Business Machines <<Amiga Technical Support>>
		uucp: {ihnp4|seismo|caip}!cbmvax!randy
		arpa: cbmvax!randy@seismo
		(or)  randy@cbmvax.UUCP@{seismo | harvard}
		TEL:  215-431-9180