summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/Painting
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-08-14 20:02:46 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-15 00:05:45 +0200
commit2614ef550c7b94dbe7c7e0b96622380d1186aea1 (patch)
treeb2c67008a27d332db906c8465a70c77c92364a59 /Libraries/LibWeb/Painting
parentc1e0047b4849acd9d45f7a28952421767fb46a37 (diff)
downloadserenity-2614ef550c7b94dbe7c7e0b96622380d1186aea1.zip
LibWeb: Only paint focus outline when browser window has focus
This is communicated through the PaintContext::has_focus() flag.
Diffstat (limited to 'Libraries/LibWeb/Painting')
-rw-r--r--Libraries/LibWeb/Painting/PaintContext.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Libraries/LibWeb/Painting/PaintContext.h b/Libraries/LibWeb/Painting/PaintContext.h
index 9daaa96467..530338e605 100644
--- a/Libraries/LibWeb/Painting/PaintContext.h
+++ b/Libraries/LibWeb/Painting/PaintContext.h
@@ -26,9 +26,9 @@
#pragma once
+#include <LibGfx/Forward.h>
#include <LibGfx/Palette.h>
#include <LibGfx/Rect.h>
-#include <LibGfx/Forward.h>
namespace Web {
@@ -52,12 +52,16 @@ public:
const Gfx::IntPoint& scroll_offset() const { return m_scroll_offset; }
+ bool has_focus() const { return m_focus; }
+ void set_has_focus(bool focus) { m_focus = focus; }
+
private:
Gfx::Painter& m_painter;
Palette m_palette;
Gfx::IntRect m_viewport_rect;
Gfx::IntPoint m_scroll_offset;
bool m_should_show_line_box_borders { false };
+ bool m_focus { false };
};
}