0 Replies Latest reply on Jun 30, 2008 4:24 PM by (Jono_Spiro)

    [svn] 2312: CursorManager: New functionality and a fix for SDK-15029

      Revision: 2312
      Author: jspiro@adobe.com
      Date: 2008-06-30 17:24:01 -0700 (Mon, 30 Jun 2008)

      Log Message:
      CursorManager: New functionality and a fix for SDK-15029
      * NEW: When the mouse leaves a window/stage where a cursor is set, the cursor no longer sits on the edge of the screen until the mouse comes back into the window, it disappears.
      * NEW: In AIR, when the mouse leaves an active window and glides over an inactive window (without giving it focus) where a cursor is set, the system pointer will be hidden and the custom cursor will appear while gliding over that window, and disappear when you leave that window.
      * FIX: When a cursor is set in a child Window, and the mouse moves over another Window or WindowedApplication, the cursor no longer disappears -- the correct system pointer or custom cursor will display.
      * Fixed listener leaks when switching systemManagers (neither Jason nor I can tell when/why it would happen in CursorManager, however).

      Reviewer: Jason
      Bugs: SDK-15029
      Doc: No
      QA: Yes, here's an exhaustive list of ideas:
      * We'll need tests for the new behaviors.
      * For all tests, we need to try behavior in air AND behavior in (sa)player, and test regressions.
      * Please test SDK-15583 again, all other cursor tests.
      * Take the test case for SDK-15029 and open up TWO MyWindows. Test how the cursors change across all three app windows when they are overlapped like a Venn diagram, with different combinations of custom cursors on and off -- we should have test cases for all of this behavior.
      * Test that custom cursors work properly when the mouse leaves a non-rectangular stage with transparency.
      * Test mouse drag situations -- drag off stage, release, move back to stage; drag off and back onto stage, etc.
      * In my tests, I found a lot of bad behavior in AIR, and player seemed to be fine. Do we have drag and drop use cases for AIR with custom cursors?

      A list of some bugs I encountered:
      * BUG (cosmetic): If the mouse is outside the stage when a cursor changes for the first time (say you toggle a checkbox which sets the cursor using the keyboard), the cursor will appear on the stage in the last known mouse position. When the mouse returns to the stage, everything will start working correctly again.
      * BUG (cosmetic): In AIR, if you drag out, and back into the window, then release, a MOUSE_OUT is fired again over the stage, which is wrong. The mouse coords given are (-1,-1), also wrong. This causes the system cursor to show instead of the custom cursor.
      * BUG: In AIR: if you drag off the edge of a Window with a custom cursor, the cursor will vanish. The MOUSE_OUT event correctly event fires while dragging off the window. Even though the handler tells the system mouse cursor to appear, it doesn't -- might be an AIR issue, since the mouse is still dragging when told to show. If you move back over the active window without dragging, the cursor goes back to normal.
      * BUG: In AIR: if you drag over another window with a cursor, MOUSE_MOVE events don't fire on that other window until you let go. Therefore, a custom cursor in that window does not get drawn, nor does a system cursor. If you move back over the active window without dragging, the cursor goes back to normal.
      * BUG: In AIR: When dragging, off a window, Event.MOUSE_LEAVE only fires after the mouse is let go (unlike MOUSE_OUT), EVEN IF the mouse is dragged back over the window and released over the window. So you're told the mouse left when it didn't.
      * BUG: In Player: I could never get Event.MOUSE_LEAVE to fire when added to the stage in saplayer or browser.

      Ticket Links:

      Modified Paths:
      flex/sdk/branches/3.0.x/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.a s