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:
parent
25d045dee5
commit
2e370fa4d5
5 changed files with 24 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue