summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/OutOfProcessWebView.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-10-30 10:58:27 +0100
committerAndreas Kling <kling@serenityos.org>2020-10-30 17:03:28 +0100
commitaef56159a84a3e88422f7e7ebc11fe145ffe9075 (patch)
tree1ac8a8f2c652a2c3f0f9e39ff247e98909a09619 /Libraries/LibWeb/OutOfProcessWebView.cpp
parent34014fa838cbc7e427ae00818fdf8f665f0e7801 (diff)
downloadserenity-aef56159a84a3e88422f7e7ebc11fe145ffe9075.zip
LibGUI: Add Widget focus policies
Every widget now has a GUI::FocusPolicy that determines how it can receive focus: - NoFocus: The widget is not focusable (default) - TabFocus: The widget can be focused using the tab key. - ClickFocus: The widget can be focused by clicking on it. - StrongFocus: Both of the above. For widgets that have a focus proxy, getting/setting the focus policy will affect the proxy instead.
Diffstat (limited to 'Libraries/LibWeb/OutOfProcessWebView.cpp')
-rw-r--r--Libraries/LibWeb/OutOfProcessWebView.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibWeb/OutOfProcessWebView.cpp b/Libraries/LibWeb/OutOfProcessWebView.cpp
index ec62289ece..a8063092ac 100644
--- a/Libraries/LibWeb/OutOfProcessWebView.cpp
+++ b/Libraries/LibWeb/OutOfProcessWebView.cpp
@@ -40,6 +40,7 @@ namespace Web {
OutOfProcessWebView::OutOfProcessWebView()
{
set_should_hide_unnecessary_scrollbars(true);
+ set_focus_policy(GUI::FocusPolicy::StrongFocus);
m_client = WebContentClient::construct(*this);
client().post_message(Messages::WebContentServer::UpdateSystemTheme(Gfx::current_system_theme_buffer_id()));
}