musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.12k stars 2.62k forks source link

Click-area for dismissing popups is incorrect #23288

Open avvvvve opened 3 months ago

avvvvve commented 3 months ago

Description

When a popup is open, it cannot be dismissed by clicking in a certain radius around it. It should be dismissed by clicking anywhere outside of the popup bounds.

Perhaps the shadow or area reserved for the triangle arrow is causing this issue.

https://github.com/musescore/MuseScore/assets/20806406/b41ef6c4-e1ae-4574-9b00-b6510c3956d4

cbjeukendrup commented 3 months ago

Perhaps the shadow or area reserved for the triangle arrow is causing this issue.

This is exactly the case. To the OS, the popup is just another window. We make the window a bit larger than the popup, so that we can use the remaining space to draw the shadow. But that remaining space still belongs to the popup window, so when clicking on the popup window, the click event will be sent to that window, and not to the window beneath it. Closing the popup when clicking on the shadow area is possible, but propagating that click event to the window beneath it will be far from trivial (and most likely even impossible in the case that the window beneath it belongs to a different app).

This bug became particularly apparent while working on #18436 (that is why I have already thought about it so much).