LibGUI: Don't consider a GWidget focused if the window is inactive.

This commit is contained in:
Andreas Kling 2019-01-26 21:58:43 +01:00
commit 2e370fa4d5
Notes: sideshowbarker 2024-07-19 15:56:16 +09:00
5 changed files with 24 additions and 5 deletions

View file

@ -145,6 +145,8 @@ bool GWidget::is_focused() const
auto* win = window();
if (!win)
return false;
if (!win->is_active())
return false;
return win->focused_widget() == this;
}