mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:57:35 +00:00
WindowServer: Don't include frame when determining hovered window
We only consider a window "hovered" if its *content area* is hovered.
This commit is contained in:
parent
1537172a6b
commit
82f1ac7390
3 changed files with 9 additions and 3 deletions
|
@ -38,11 +38,13 @@ void WindowStack::move_to_front(Window& window)
|
|||
m_windows.append(window);
|
||||
}
|
||||
|
||||
Window* WindowStack::window_at(Gfx::IntPoint const& position) const
|
||||
Window* WindowStack::window_at(Gfx::IntPoint const& position, IncludeWindowFrame include_window_frame) const
|
||||
{
|
||||
auto result = hit_test(position);
|
||||
if (!result.has_value())
|
||||
return nullptr;
|
||||
if (include_window_frame == IncludeWindowFrame::No && result->is_frame_hit)
|
||||
return nullptr;
|
||||
return result->window;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue