Bug 504546

Summary: In wayland, "Mirror View Around Cursor" action only uses mouse's last position but not tablet's
Product: [Applications] krita Reporter: Ming Chuan <ming>
Component: * UnknownAssignee: Krita Bugs <krita-bugs-null>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: NixOS   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Ming Chuan 2025-05-19 21:03:22 UTC
SUMMARY

When running krita in X11 mode, the "Mirror View Around Cursor" action always flips the canvas around the axis that tablet pen is currently pointing at. However, when running krita in wayland natively, it flips around the position where the mouse pointed at last time before tablet is used.

Perhaps 

STEPS TO REPRODUCE
1. Move the mouse cursor close to the left of screen
2. Use drawing tablet pen to move the cursor to the middle of the screen (tablet operating in absolute position mode)
3. Execute "Mirror View Around Cursor" action. Observe that the canvas is flipped around the left of the screen

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Linux NixOS hyprland
Qt Version: 6.9.0
Krita git hash: master branch at 2025-05-16 (e29803b8f4d858148c6268805812c24557e2e4c9)

ADDITIONAL INFORMATION

If failed to repro in other wayland compositor, this bug could be specific to Hyprland, due to the way mouse pointer and tablet pointer logic is handled (somehow mouse pointer position won't be updated to the tablet pen's position in krita). If that's the case I can inspect further.

If this is a general wayland issue, maybe "Mirror View Around Cursor" could be updated to also take tablet pen's position into account, as that's most like what users want and expect
Comment 1 Ming Chuan 2025-05-19 21:43:59 UTC
Note that in reproduction step 1, the mouse should be moved close the left edge of canvas, but not all the way to the left and hover over krita's toolbox UI. If the mouse is hovering over toolbox UI befure drawing tablet pen is used, the canvas flip action is still wrong but it's wrong in some less obvious way.