DESCRIPTION

lttng/o.e.l.ftm.ui/TimeGraphControl.java: disable zoom on selection when a menuListener is registered


COMMENTS

author: Bryce Kline
date: 2012-12-07 08:15:52.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2012-12-07 08:15:59.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/sandbox/job/linuxtools/742/ 

-------------------------------------
author: Brenden Conley
date: 2012-12-07 08:42:49.000000000

Patch Set 2: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/linuxtools/742/ : SUCCESS

-------------------------------------
author: Luciana Barry
date: 2012-12-10 16:51:41.000000000

Patch Set 2: I would prefer that you didn't submit this

(5 inline comments)



Line:7, /COMMIT_MSG -> ftm -> tmf, and rename title to reflect the updated patch behavior

Line:2028, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java -> if (e.detail == SWT.MENU_MOUSE) {
    if (fPendingMenuDetectEvent == null) {
        /* Feature in Linux. The MenuDetectEvent is received before mouseDown.
         * Store the event and trigger it later just before handling mouseUp.
         * This allows for the method to detect if mouse is used to drag zoom.
         */
        fPendingMenuDetectEvent = e;
        return;
    }
    fPendingMenuDetectEvent = null;
    if (_dragState != DRAG_ZOOM || _dragX != _dragX0) {
        return;
    }
} else {
    if (_dragState != DRAG_NONE) {
        return;
    }
}

Line:1657, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java -> In the corner case where the left mouse button is currently being used to drag (DRAG_TRACE_ITEM), and the mouse is returned to exactly the start position, and then the right mouse button is clicked, this will handle the menuDetected event and abort the left mouse drag. Instead the right mouse click should have been ignored.

Line:2037, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java -> This prevents menuDetected triggered by the Menu key (e.detail == SWT.MENU_KEYBOARD), as mouseUp will not follow (neither will keyReleased).

Line:2044, lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java -> There was a mishandled corner case in my previous proposal. If the Menu key is pressed while either left or right mouse button is currently being used to drag, the menuDetected event is handled (should be ignored). Then if the mouse button is released while on top of the popup menu, the widget does not receive the mouseUp event and gets stuck in drag mode while no button is pressed. See updated proposal for menuDetected() on left side.

-------------------------------------
