mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +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:
parent
bb483f7ef4
commit
8465683dcf
98 changed files with 414 additions and 972 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue