0 Replies Latest reply on Sep 2, 2008 11:49 AM by Alexis_Ninem

    Using nativeWindow.startMove() in a custom chrome application

    Alexis_Ninem
      I am calling nativeWindow.startMove() on the mouseDown of my custom window header component. However there can be a few milliseconds between the moment the mouse was pressed and the dispatching of the mouseDown event. Which means sometimes the window is being dragged while the mouse pointer is not even on top of it.

      Sequence of actions (this can happen in less than half a second):
      · User presses mouse on the custom header
      · User starts moving mouse upwards
      · Mouse pointer moves say, 30 pixels up
      · Custom header component finally dispatches the mouseDown event and nativeWindow.startMove() is called

      So nativeWindow.startMove() is called too late, the mouse is already elsewhere now.

      Is there a quicker (maybe deeper level) event that I could listen for? I tried:

      NativeApplication.nativeApplication.addEventListener(MouseEvent.MOUSE_DOWN, onNativeApplicationMouseDown);

      then I would just check whether the mouse is above my custom header but that event never happens