summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/Application.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-08-14 19:55:25 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-15 00:05:45 +0200
commit110b3d89d3da62a1c9acde24a143b5e6871301b0 (patch)
tree368bc69d056c0993ac92463285a2788f5c1bd0ba /Libraries/LibGUI/Application.cpp
parent01022eb5d69753d55edcbd538ae8a5a3aabf199c (diff)
downloadserenity-110b3d89d3da62a1c9acde24a143b5e6871301b0.zip
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. :^)
Diffstat (limited to 'Libraries/LibGUI/Application.cpp')
-rw-r--r--Libraries/LibGUI/Application.cpp8
1 files 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];
- for (int i = 1; i < argc; i++) {
- String arg(argv[i]);
- if (arg == "--gui-focus-debug")
- m_focus_debugging_enabled = true;
+ if (getenv("GUI_FOCUS_DEBUG"))
+ m_focus_debugging_enabled = true;
+ for (int i = 1; i < argc; i++) {
+ String arg(argv[i]);
m_args.append(move(arg));
}
}