Bug 471361 - Mouse Mark effect remove previous mark works only after second stroke
Summary: Mouse Mark effect remove previous mark works only after second stroke
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-23 03:23 UTC by Andrew Shark
Modified: 2023-07-05 12:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Shark 2023-06-23 03:23:04 UTC
When removing previous mark, the first stroke does not remove mark.

STEPS TO REPRODUCE
1. Draw some mark (shift + meta + move mouse), then release all buttons.
2. Try to remove previous mark (press and hold shift + meta, then press and release F12).
Observed: Mark not deleted. Expected: Mark should be deleted.
3. While still holding shift + meta, try to remove mark again (press and release F12).
Observed: Mark is deleted.

Well, actually, first F12 stroke _does_ remove mark. You can see it, if you did not yet finished marking, and press F12, it will delete current mark. However, if you are not currently drawing, and just want to delete previous mark, hitting shift + meta before F12 already creates a mark (it is yet zero length). And from user perspective of view, it feels like first stroke did not work.

My guess is that here https://invent.kde.org/plasma/kwin/-/blob/master/src/plugins/mousemark/mousemark.cpp#L193
the check `!drawing.isEmpty()` maybe should be something like `len(drawing) == 1`.

KDE Plasma Version: 5.27.6
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.10
Graphics Platform: Wayland

ADDITIONAL INFORMATION
When deleting that zero length stroke, you can see the other marks become a bit smoother.