Skip to content
  • rk flx's avatar
    Fix issues with cursors and unwanted actions when right-clicking · 20d474e0
    rk flx authored
    Summary:
    After showing and closing the context menu by right-clicking in
    {nav View} mode, the cursor would be set to `ClosedHandCursor`. Only
    after another click the cursor would be set back to the regular
    `OpenHandCursor`.
    
    The issue can be fixed by not changing the cursor shape in the first
    place for showing the context menu, i.e. when right-clicking.
    
    While using the {nav Red Eye Reduction} tool, the patch will prevent
    the unwanted placement of corrections on the canvas when right-clicking.
    
    {nav Fullscreen} mode could be toggled by double-clicking the middle
    mouse button, but it should only work for the left button.
    
    Test Plan:
    Right-click on an image in {nav View} mode to show the context menu and
    dismiss it again. The cursor should look as before. Also try right-clicking
    over the Bird's eye view and in the {nav Crop} tool.
    
    In the {nav Red Eye Reduction} tool, right-clicking should not change the
    position of the correction anymore.
    
    Entering {nav Fullscreen} should only work for double-clicking with the left
    mouse button. Note that accidentally clicking on the {nav Fullscreen} checkbox
    of the context menu when right-clicking and moving the cursor slightly
    might still be possible, but having that action as the first entry is
    more important than the very minor imperfection in that case.
    
    Reviewers: #gwenview, huoni
    
    Reviewed By: #gwenview, huoni
    
    Subscribers: huoni
    
    Differential Revision: https://phabricator.kde.org/D13723
    20d474e0