1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 19:45:08 +00:00

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
parent 25d045dee5
commit 2e370fa4d5
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;
}