mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Windowing: Reinstate old WindowFromPoint behaviour in ComponentPeer::contains
This reverts 515e9b9f89.
In order to avoid recursive calls through WM_NCHITTEST, we remove calls
to Component::contains in DocumentWindow::findControlAtPoint.
This commit is contained in:
parent
ad5a755b10
commit
fdf74a7477
3 changed files with 6 additions and 5 deletions
|
|
@ -926,6 +926,11 @@ public:
|
|||
stretch a window vertically, and the window tiling flyout that appears when hovering the
|
||||
mouse over the maximise button.
|
||||
|
||||
It's dangerous to call Component::contains from an overriding function, because this might
|
||||
call into the peer to do system hit-testing - but the system hit-test could in turn call
|
||||
findControlAtPoint, leading to infinite recursion. It's better to use functions like
|
||||
Rectangle::contains or Path::contains to test for the window control areas.
|
||||
|
||||
This is called by the peer. Component subclasses may override this but should not call it directly.
|
||||
*/
|
||||
virtual WindowControlKind findControlAtPoint (Point<float>) const { return WindowControlKind::client; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue