1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 00:55:08 +00:00

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. :^)
This commit is contained in:
Andreas Kling 2020-08-14 19:55:25 +02:00
parent 01022eb5d6
commit 110b3d89d3

View file

@ -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));
}
}