diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-04-16 13:25:00 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-04-16 13:25:00 +0200 |
commit | 952f334de75285295cdc16ad683bff0eb9bdf8d9 (patch) | |
tree | 50845a209281978a34f9eddc629c01824c236acc /LibGUI/GWidget.h | |
parent | c812d63ea6d56be3c1d80753535e4c861c150c5e (diff) | |
download | serenity-952f334de75285295cdc16ad683bff0eb9bdf8d9.zip |
GWidget: Tidy up the hit-testing code somewhat.
Diffstat (limited to 'LibGUI/GWidget.h')
-rw-r--r-- | LibGUI/GWidget.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/LibGUI/GWidget.h b/LibGUI/GWidget.h index 1fa31f4bf9..5c34380c35 100644 --- a/LibGUI/GWidget.h +++ b/LibGUI/GWidget.h @@ -92,12 +92,10 @@ public: struct HitTestResult { GWidget* widget { nullptr }; - int localX { 0 }; - int localY { 0 }; + Point local_position; }; - HitTestResult hit_test(int x, int y); - - GWidget* child_at(const Point&); + HitTestResult hit_test(const Point&); + GWidget* child_at(const Point&) const; virtual const char* class_name() const override { return "GWidget"; } |