archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
946 stars 269 forks source link

[Wayland] Double-click not working in Views #720

Closed Phillipus closed 3 years ago

Phillipus commented 3 years ago

Archi 4.8.1 Ubuntu 20.4 with Wayland

Double-clicking a diagram object is not working under Wayland. This affects opening the Properties tab and jumping to a View from a View Reference object using double-click.

Debugging this leads to org.eclipse.gef.tools.SelectionTool:

public void mouseDoubleClick(MouseEvent e, EditPartViewer viewer) {
    super.mouseDoubleClick(e, viewer);
    if (getDragTracker() != null)
        getDragTracker().mouseDoubleClick(e, viewer);
}

At this point getDragTracker() returns null and so the event is not forwarded.

I think that the field dragTracker is being set to null in setDragTracker() perhaps by a mouse up event just before the mouseDoubleClick event. Perhaps the order of mouse clicks is different on Wayland.

I also tested an Eclipse XSD editor that uses GEF/Draw2d and this has the same problem.

Edit - I have a workaround for this.

Phillipus commented 3 years ago

I've added a workaround.