Bug 511902

Summary: [regression] clicking on the canvas to close pop-up palettes causes a stroke to be drawn
Product: [Applications] krita Reporter: Ming Chuan <ming>
Component: * UnknownAssignee: Krita Bugs <krita-bugs-null>
Status: REPORTED ---    
Severity: normal CC: halla
Priority: NOR Keywords: regression
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Ming Chuan 2025-11-10 09:08:46 UTC
SUMMARY

After syncing krita past the recent wayland color management patches I get this bug

https://invent.kde.org/graphics/krita/-/commit/25716e5536db5ecf1ac4fee03f72e801e5f08a35 looks like a recent change that touched pop-up palette closing logic, so maybe it's related? (I didn't test this specific commit to confirm)

Only happen in source build but not appimage, so maybe it's requires qt 6.10 to repro

STEPS TO REPRODUCE
1. Right click to open pop-up palette
2. Click on canvas to close the pop-up palette

OBSERVED RESULT

Pop-up palette closes, and a stroke is being drawn on canvas

EXPECTED RESULT

Pop-up palette closes, no stroke is being drawn on canvas

SOFTWARE/OS VERSIONS
Wayland (Hyprland)
Qt Version: 6.10

ADDITIONAL INFORMATION
Comment 1 Ming Chuan 2025-12-31 08:29:08 UTC
I can confirm that forcing the palette to be `Qt::FramelessWindowHint` fixes this issue https://invent.kde.org/graphics/krita/-/blob/0c400594cbb0e4c13215d98100b919fa62a872c9/libs/ui/kis_popup_palette.cpp#L112 (obviously it might break HDR on pop-up palette, but I'm OK with that)