1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:57:44 +00:00

LibGUI: Make Widget::HitTestResult::widget a WeakPtr

This commit is contained in:
Andreas Kling 2021-01-08 23:50:03 +01:00
parent c17fa67f51
commit 094b47971b

View file

@ -184,10 +184,12 @@ public:
void set_focus_policy(FocusPolicy policy);
FocusPolicy focus_policy() const;
enum class ShouldRespectGreediness { No = 0,
Yes };
enum class ShouldRespectGreediness {
No = 0,
Yes
};
struct HitTestResult {
Widget* widget { nullptr };
WeakPtr<Widget> widget;
Gfx::IntPoint local_position;
};
HitTestResult hit_test(const Gfx::IntPoint&, ShouldRespectGreediness = ShouldRespectGreediness::Yes);