[go: up one dir, main page]

Rework how GTK4 mouse gestures are mapped to simpler mouse events.

Use separate gestures and unpaired release to ensure mouse changes aren't lost due the way gesture system works.

This is another attempt at dealing with #4749 without having to reimplement a bunch of builtin GTK logic or rewriting how mouse input is handled by all tools.

Reduces need for lost button workaround in tool-base.cpp thus resulting in more accurate release position/moment. Might be possible to remove it completely now, but for now kept it.

Disable lost button workaround for tablets. Due to a different GTK bug, secondary tablet buttons aren't included in mouse move button mask. This in combination with lost button workaround made it impossible to do middle click panning with tablet.

Reorder base tool event forwarding while doing view dragging. This was necessary for correct behavior when doing: start selection rectangle with left mouse down, press middle click and drag view, release left button (should stop selection rectangle), release middle button. Similar thing can be done with other similar tools like creating a rectangle.

Restores ability to middle click drag while doing left click drag. It worked in 1.4. Before this MR it failed first time you did a middle click explained in the comment for using separate gestures.

Need to retest it and that wasn't intention but it might also mitigate the lost macOS button problem inbox#12679. Ideally should still fix that bug in GTK as well.

Merge request reports

Loading