test/nitpicker: fix interaction in non-alpha mode

Commit "gui_session,nitpicker,testnit: update coding style" broke the
user-input handling of the test when configured w/o alpha.
This commit is contained in:
Norman Feske 2024-08-05 14:08:45 +02:00 committed by Christian Helmuth
parent d40f9b712e
commit 89446084f3

View File

@ -149,8 +149,10 @@ class Test::View_stack : Noncopyable
*/ */
bool hit(Gui::Point const at) const bool hit(Gui::Point const at) const
{ {
return ptr if (!ptr)
&& Rect(Point(0, 0), size).contains(at) return true;
return Rect(Point(0, 0), size).contains(at)
&& ptr[size.w*at.y + at.x]; && ptr[size.w*at.y + at.x];
} }
}; };