1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:28:14 +00:00

LibWeb: Only paint focus outline when browser window has focus

This is communicated through the PaintContext::has_focus() flag.
This commit is contained in:
Andreas Kling 2020-08-14 20:02:46 +02:00
parent c1e0047b48
commit 2614ef550c
3 changed files with 8 additions and 2 deletions

View file

@ -105,7 +105,8 @@ void LayoutDocument::paint_all_phases(PaintContext& context)
paint(context, PaintPhase::Background);
paint(context, PaintPhase::Border);
paint(context, PaintPhase::Foreground);
paint(context, PaintPhase::FocusOutline);
if (context.has_focus())
paint(context, PaintPhase::FocusOutline);
paint(context, PaintPhase::Overlay);
}