wsctl: Port to LibMain
This commit is contained in:
parent
d4748c608c
commit
92493b210a
Notes:
sideshowbarker
2024-07-17 21:43:41 +09:00
Author: https://github.com/mjz19910 Commit: https://github.com/SerenityOS/serenity/commit/92493b210aa Pull-request: https://github.com/SerenityOS/serenity/pull/11607 Reviewed-by: https://github.com/bgianfo
2 changed files with 5 additions and 6 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue