summaryrefslogtreecommitdiff
path: root/Userland/Utilities
diff options
context:
space:
mode:
authormjz19910 <matthias291999@gmail.com>2022-01-03 21:17:27 -0700
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-01-04 07:33:23 +0000
commit92493b210aa3b41060d8eb2d9e31572d1194320f (patch)
tree457d19c22e014ce5a55c20b0486d0ebd8dfed66c /Userland/Utilities
parentd4748c608cb24fe322f0c7460f063a2a0a4e6e28 (diff)
downloadserenity-92493b210aa3b41060d8eb2d9e31572d1194320f.zip
wsctl: Port to LibMain
Diffstat (limited to 'Userland/Utilities')
-rw-r--r--Userland/Utilities/CMakeLists.txt2
-rw-r--r--Userland/Utilities/wsctl.cpp9
2 files changed, 5 insertions, 6 deletions
diff --git a/Userland/Utilities/CMakeLists.txt b/Userland/Utilities/CMakeLists.txt
index dbb4323a0c..7e7087a940 100644
--- a/Userland/Utilities/CMakeLists.txt
+++ b/Userland/Utilities/CMakeLists.txt
@@ -164,6 +164,6 @@ target_link_libraries(w LibMain)
target_link_libraries(wasm LibWasm LibLine)
target_link_libraries(whoami LibMain)
target_link_libraries(watch LibMain)
-target_link_libraries(wsctl LibGUI)
+target_link_libraries(wsctl LibGUI LibMain)
target_link_libraries(xargs LibMain)
target_link_libraries(yes LibMain)
diff --git a/Userland/Utilities/wsctl.cpp b/Userland/Utilities/wsctl.cpp
index 6122ecb363..f0ab607f76 100644
--- a/Userland/Utilities/wsctl.cpp
+++ b/Userland/Utilities/wsctl.cpp
@@ -8,17 +8,16 @@
#include <LibGUI/Application.h>
#include <LibGUI/WindowServerConnection.h>
-int main(int argc, char** argv)
+ErrorOr<int> serenity_main(Main::Arguments arguments)
{
- auto app = GUI::Application::construct(argc, argv);
+ auto app = GUI::Application::construct(arguments);
int flash_flush = -1;
Core::ArgsParser args_parser;
args_parser.add_option(flash_flush, "Flash flush (repaint) rectangles", "flash-flush", 'f', "0/1");
- args_parser.parse(argc, argv);
+ args_parser.parse(arguments);
- if (flash_flush != -1) {
+ if (flash_flush != -1)
GUI::WindowServerConnection::the().async_set_flash_flush(flash_flush);
- }
return 0;
}