mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Add Web::UIEvents::KeyCode and KeyModifier enums, drop Kernel
This was the last Kernel header we had. Move the definitions we need into a UIEvents header similar to MouseButton.
This commit is contained in:
committed by
Andreas Kling
parent
0c9dced888
commit
d90a9ab70c
@@ -653,7 +653,7 @@ void BrowserWindow::initialize_tab(Tab* tab)
|
||||
|
||||
tab->view().on_link_click = [this](auto url, auto target, unsigned modifiers) {
|
||||
// TODO: maybe activate tabs according to some configuration, this is just normal current browser behavior
|
||||
if (modifiers == Mod_Ctrl) {
|
||||
if (modifiers == Web::UIEvents::Mod_Ctrl) {
|
||||
m_current_tab->view().on_tab_open_request(url, Web::HTML::ActivateTab::No);
|
||||
} else if (target == "_blank") {
|
||||
m_current_tab->view().on_tab_open_request(url, Web::HTML::ActivateTab::Yes);
|
||||
@@ -663,7 +663,7 @@ void BrowserWindow::initialize_tab(Tab* tab)
|
||||
};
|
||||
|
||||
tab->view().on_link_middle_click = [this](auto url, auto target, unsigned modifiers) {
|
||||
m_current_tab->view().on_link_click(url, target, Mod_Ctrl);
|
||||
m_current_tab->view().on_link_click(url, target, Web::UIEvents::Mod_Ctrl);
|
||||
(void)modifiers;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user