mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +00:00
Everywhere: Debug macros instead of constexpr.
This was done with the following script:
find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/dbgln<debug_([a-z_]+)>/dbgln<\U\1_DEBUG>/' {} \;
find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/if constexpr \(debug_([a-z0-9_]+)/if constexpr \(\U\1_DEBUG/' {} \;
This commit is contained in:
@@ -141,25 +141,25 @@ void WindowServerConnection::handle(const Messages::WindowClient::KeyDown& messa
|
||||
auto key_event = make<KeyEvent>(Event::KeyDown, (KeyCode)message.key(), message.modifiers(), message.code_point(), message.scancode());
|
||||
Action* action = nullptr;
|
||||
|
||||
dbgln<debug_keyboard_shortcuts>("Looking up action for {}", key_event->to_string());
|
||||
dbgln<KEYBOARD_SHORTCUTS_DEBUG>("Looking up action for {}", key_event->to_string());
|
||||
|
||||
if (auto* focused_widget = window->focused_widget()) {
|
||||
for (auto* widget = focused_widget; widget && !action; widget = widget->parent_widget()) {
|
||||
action = widget->action_for_key_event(*key_event);
|
||||
|
||||
dbgln<debug_keyboard_shortcuts>(" > Focused widget {} gave action: {}", *widget, action);
|
||||
dbgln<KEYBOARD_SHORTCUTS_DEBUG>(" > Focused widget {} gave action: {}", *widget, action);
|
||||
}
|
||||
}
|
||||
|
||||
if (!action) {
|
||||
action = window->action_for_key_event(*key_event);
|
||||
dbgln<debug_keyboard_shortcuts>(" > Asked window {}, got action: {}", *window, action);
|
||||
dbgln<KEYBOARD_SHORTCUTS_DEBUG>(" > Asked window {}, got action: {}", *window, action);
|
||||
}
|
||||
|
||||
// NOTE: Application-global shortcuts are ignored while a modal window is up.
|
||||
if (!action && !window->is_modal()) {
|
||||
action = Application::the()->action_for_key_event(*key_event);
|
||||
dbgln<debug_keyboard_shortcuts>(" > Asked application, got action: {}", action);
|
||||
dbgln<KEYBOARD_SHORTCUTS_DEBUG>(" > Asked application, got action: {}", action);
|
||||
}
|
||||
|
||||
if (action) {
|
||||
|
||||
Reference in New Issue
Block a user