From 110b3d89d3da62a1c9acde24a143b5e6871301b0 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 14 Aug 2020 19:55:25 +0200 Subject: [PATCH] LibGUI: Export GUI_FOCUS_DEBUG to visualize the focused widget Using a command-line argument for this clashed with ArgsParser so let's use an environment variable instead. I feel like Sergey told me to do this at some point anyway. :^) --- Libraries/LibGUI/Application.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Libraries/LibGUI/Application.cpp b/Libraries/LibGUI/Application.cpp index a92559e38d..042b512cd8 100644 --- a/Libraries/LibGUI/Application.cpp +++ b/Libraries/LibGUI/Application.cpp @@ -55,12 +55,12 @@ Application::Application(int argc, char** argv) Clipboard::initialize({}); if (argc > 0) m_invoked_as = argv[0]; + + if (getenv("GUI_FOCUS_DEBUG")) + m_focus_debugging_enabled = true; + for (int i = 1; i < argc; i++) { String arg(argv[i]); - - if (arg == "--gui-focus-debug") - m_focus_debugging_enabled = true; - m_args.append(move(arg)); } }