mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
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