Documented dragging issues caused by how Mac OS X handles mouse events; also determined that multiple buttons held at once only generates one mouseDragged: signal.

This commit is contained in:
Pietro Gagliardi 2014-05-10 14:27:29 -04:00
parent 605ea3123b
commit fefab429fc
2 changed files with 6 additions and 4 deletions

View File

@ -90,7 +90,7 @@ type MouseEvent struct {
// If the event was generated by a mouse button being released, Up contains the ID of that button.
// Otherwise, Up contains 0.
// If both Down and Up are 0, the event represents mouse movement (with optional held buttons; see below).
// If both Down and Up are 0, the event represents mouse movement (with optional held buttons for dragging; see below).
// Down and Up shall not both be nonzero.
Up uint
@ -106,6 +106,11 @@ type MouseEvent struct {
// Held will not include Down and Up.
// Held will be sorted.
// Only buttons 1, 2, and 3 are guaranteed to be detected by Held properly; whether or not any others are is implementation-defined.
//
// If Held is non-empty but Up and Down are both zero, the mouse is being dragged, with all the buttons in Held being held.
// Whether or not a drag into an Area generates MouseEvents is implementation-defined.
// Whether or not a drag over an Area when the program is inactive generates MouseEvents is also implementation-defined.
// Moving the mouse over an Area when the program is inactive and no buttons are held will, however, generate MouseEvents.
Held []uint
}

View File

@ -16,10 +16,7 @@ super ultra important things:
- OS X: handle Insert/Help key change in a sane and deterministic way
- will need old and new Mac keyboards...
- make sure MouseEvent's documentation has dragging described correctly (both Windows and GTK+ do)
- figure out what to do about dragging into or out of a window; will likely need to be undefined as well...
- pin down whether or not a click event gets sent if this click changes from a different window to the one with the Area
- determine if, on Mac OS X, dragging with two mouse buttons triggers both xxxMouseDragged: events
- figure out what happens if the mouse button is held on another application, then dragged over an Area without activating that window
- double-check to make sure MouseEvent.Held[] is sorted on all platforms
- cap click count to 2 on all platforms
- the windows build appears to be unstable: