Files
openide/platform/platform-api
Sergei Tachenov fd9b4bf934 IJPL-156383 Disable dragging in trees while a double click is processed
The code in javax.swing.plaf.basic.BasicTreeUI.Handler.mouseReleasedDND
does really strange things for double clicks: on the second mouse press
the event is stored temporarily, and on the release it's retrieved and used.
However, if the event is consumed, then the stored event is stuck there,
and later, when the mouse is single-clicked somewhere else, this event
suddenly pops up and processed in a really weird way. During such
processing both the click count and the click location are wrong,
being reused from the old click which was somewhere else.

It only happens on double clicks because single click DnD
is handled in com.intellij.openapi.wm.impl.IdeGlassPaneImpl,
not by the tree itself. And because we don't need DnD on double clicks,
we can simply disable it in Tree temporarily to avoid all this weird stuff.

GitOrigin-RevId: 0d6ee6023119e15112cee4dc2c5946f331b549cc
2024-07-11 10:21:58 +00:00
..