mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 00:42:44 +00:00 
			
		
		
		
	Userland: Make GUI::Window construction non-fallible
				
					
				
			This commit is contained in:
		
							parent
							
								
									b6b2c6f3e2
								
							
						
					
					
						commit
						0d7b13edac
					
				
					 55 changed files with 60 additions and 60 deletions
				
			
		|  | @ -14,7 +14,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     TRY(Core::System::pledge("stdio recvfd sendfd rpath")); |     TRY(Core::System::pledge("stdio recvfd sendfd rpath")); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Example Application"); |     window->set_title("Example Application"); | ||||||
|     window->resize(200, 200); |     window->resize(200, 200); | ||||||
|     window->set_resizable(false); |     window->set_resizable(false); | ||||||
|  |  | ||||||
|  | @ -240,7 +240,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     TRY(Core::System::unveil("/res", "r")); |     TRY(Core::System::unveil("/res", "r")); | ||||||
|     TRY(Core::System::unveil(nullptr, nullptr)); |     TRY(Core::System::unveil(nullptr, nullptr)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_has_alpha_channel(true); |     window->set_has_alpha_channel(true); | ||||||
|     window->set_title("Audio"); |     window->set_title("Audio"); | ||||||
|     window->set_window_type(GUI::WindowType::Applet); |     window->set_window_type(GUI::WindowType::Applet); | ||||||
|  |  | ||||||
|  | @ -38,7 +38,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     TRY(Core::System::unveil(nullptr, nullptr)); |     TRY(Core::System::unveil(nullptr, nullptr)); | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("edit-copy"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("edit-copy"sv)); | ||||||
| 
 | 
 | ||||||
|     auto main_window = TRY(GUI::Window::try_create()); |     auto main_window = GUI::Window::construct(); | ||||||
|     main_window->set_title("Clipboard History"); |     main_window->set_title("Clipboard History"); | ||||||
|     main_window->set_rect(670, 65, 325, 500); |     main_window->set_rect(670, 65, 325, 500); | ||||||
|     main_window->set_icon(app_icon.bitmap_for_size(16)); |     main_window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|  | @ -96,7 +96,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|         entry_context_menu->popup(event.screen_position()); |         entry_context_menu->popup(event.screen_position()); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     auto applet_window = TRY(GUI::Window::try_create()); |     auto applet_window = GUI::Window::construct(); | ||||||
|     applet_window->set_title("ClipboardHistory"); |     applet_window->set_title("ClipboardHistory"); | ||||||
|     applet_window->set_window_type(GUI::WindowType::Applet); |     applet_window->set_window_type(GUI::WindowType::Applet); | ||||||
|     applet_window->set_has_alpha_channel(true); |     applet_window->set_has_alpha_channel(true); | ||||||
|  |  | ||||||
|  | @ -182,7 +182,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     if (name.is_empty()) |     if (name.is_empty()) | ||||||
|         name = "Network"sv; |         name = "Network"sv; | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title(name); |     window->set_title(name); | ||||||
|     window->set_window_type(GUI::WindowType::Applet); |     window->set_window_type(GUI::WindowType::Applet); | ||||||
|     window->set_has_alpha_channel(true); |     window->set_has_alpha_channel(true); | ||||||
|  |  | ||||||
|  | @ -25,7 +25,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     TRY(Core::System::unveil(nullptr, nullptr)); |     TRY(Core::System::unveil(nullptr, nullptr)); | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-analog-clock"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-analog-clock"sv)); | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title(Core::DateTime::now().to_deprecated_string("%Y-%m-%d"sv)); |     window->set_title(Core::DateTime::now().to_deprecated_string("%Y-%m-%d"sv)); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|     window->resize(170, 170); |     window->resize(170, 170); | ||||||
|  |  | ||||||
|  | @ -30,7 +30,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = GUI::Icon::default_icon("app-calculator"sv); |     auto app_icon = GUI::Icon::default_icon("app-calculator"sv); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Calculator"); |     window->set_title("Calculator"); | ||||||
|     window->set_resizable(false); |     window->set_resizable(false); | ||||||
|     window->resize(250, 215); |     window->resize(250, 215); | ||||||
|  |  | ||||||
|  | @ -58,7 +58,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     TRY(Core::System::unveil(nullptr, nullptr)); |     TRY(Core::System::unveil(nullptr, nullptr)); | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-calendar"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-calendar"sv)); | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Calendar"); |     window->set_title("Calendar"); | ||||||
|     window->resize(600, 480); |     window->resize(600, 480); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|  |  | ||||||
|  | @ -64,7 +64,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-character-map"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-character-map"sv)); | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Character Map"); |     window->set_title("Character Map"); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|     window->resize(600, 400); |     window->resize(600, 400); | ||||||
|  |  | ||||||
|  | @ -192,7 +192,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = GUI::Icon::default_icon("app-crash-reporter"sv); |     auto app_icon = GUI::Icon::default_icon("app-crash-reporter"sv); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Crash Reporter"); |     window->set_title("Crash Reporter"); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|     window->resize(460, 190); |     window->resize(460, 190); | ||||||
|  |  | ||||||
|  | @ -81,7 +81,7 @@ ErrorOr<void> run_file_operation(FileOperation operation, Vector<DeprecatedStrin | ||||||
|         TRY(Core::System::close(pipe_fds[1])); |         TRY(Core::System::close(pipe_fds[1])); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     TRY(file_operation_windows.try_set(window)); |     TRY(file_operation_windows.try_set(window)); | ||||||
| 
 | 
 | ||||||
|     switch (operation) { |     switch (operation) { | ||||||
|  |  | ||||||
|  | @ -379,7 +379,7 @@ ErrorOr<int> run_in_desktop_mode() | ||||||
| { | { | ||||||
|     (void)Core::Process::set_name("FileManager (Desktop)"sv, Core::Process::SetThreadName::Yes); |     (void)Core::Process::set_name("FileManager (Desktop)"sv, Core::Process::SetThreadName::Yes); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Desktop Manager"); |     window->set_title("Desktop Manager"); | ||||||
|     window->set_window_type(GUI::WindowType::Desktop); |     window->set_window_type(GUI::WindowType::Desktop); | ||||||
|     window->set_has_alpha_channel(true); |     window->set_has_alpha_channel(true); | ||||||
|  | @ -606,7 +606,7 @@ ErrorOr<int> run_in_desktop_mode() | ||||||
| 
 | 
 | ||||||
| ErrorOr<int> run_in_windowed_mode(DeprecatedString const& initial_location, DeprecatedString const& entry_focused_on_init) | ErrorOr<int> run_in_windowed_mode(DeprecatedString const& initial_location, DeprecatedString const& entry_focused_on_init) | ||||||
| { | { | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("File Manager"); |     window->set_title("File Manager"); | ||||||
| 
 | 
 | ||||||
|     auto widget = TRY(window->set_main_widget<GUI::Widget>()); |     auto widget = TRY(window->set_main_widget<GUI::Widget>()); | ||||||
|  |  | ||||||
|  | @ -76,7 +76,7 @@ ErrorOr<NonnullRefPtr<MainWidget>> MainWidget::try_create() | ||||||
| 
 | 
 | ||||||
| ErrorOr<RefPtr<GUI::Window>> MainWidget::create_preview_window() | ErrorOr<RefPtr<GUI::Window>> MainWidget::create_preview_window() | ||||||
| { | { | ||||||
|     auto window = TRY(GUI::Window::try_create(this)); |     auto window = GUI::Window::construct(this); | ||||||
|     window->set_window_mode(GUI::WindowMode::RenderAbove); |     window->set_window_mode(GUI::WindowMode::RenderAbove); | ||||||
|     window->set_title("Preview"); |     window->set_title("Preview"); | ||||||
|     window->resize(400, 150); |     window->resize(400, 150); | ||||||
|  |  | ||||||
|  | @ -41,7 +41,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-font-editor"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-font-editor"sv)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|     window->resize(640, 470); |     window->resize(640, 470); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -55,7 +55,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = GUI::Icon::default_icon("app-help"sv); |     auto app_icon = GUI::Icon::default_icon("app-help"sv); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|     window->set_title("Help"); |     window->set_title("Help"); | ||||||
|     window->resize(570, 500); |     window->resize(570, 500); | ||||||
|  |  | ||||||
|  | @ -32,7 +32,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-hex-editor"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-hex-editor"sv)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Hex Editor"); |     window->set_title("Hex Editor"); | ||||||
|     window->resize(640, 400); |     window->resize(640, 400); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -64,7 +64,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     args_parser.add_positional_argument(path, "The image file to be displayed.", "file", Core::ArgsParser::Required::No); |     args_parser.add_positional_argument(path, "The image file to be displayed.", "file", Core::ArgsParser::Required::No); | ||||||
|     args_parser.parse(arguments); |     args_parser.parse(arguments); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_double_buffering_enabled(true); |     window->set_double_buffering_enabled(true); | ||||||
|     window->resize(300, 200); |     window->resize(300, 200); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|  |  | ||||||
|  | @ -29,7 +29,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     TRY(Core::System::unveil(nullptr, nullptr)); |     TRY(Core::System::unveil(nullptr, nullptr)); | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-maps"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-maps"sv)); | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Maps"); |     window->set_title("Maps"); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|     window->restore_size_and_position("Maps"sv, "Window"sv, { { 640, 480 } }); |     window->restore_size_and_position("Maps"sv, "Window"sv, { { 640, 480 } }); | ||||||
|  |  | ||||||
|  | @ -29,7 +29,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     Config::pledge_domain("PDFViewer"); |     Config::pledge_domain("PDFViewer"); | ||||||
|     app->set_config_domain("PDFViewer"_string); |     app->set_config_domain("PDFViewer"_string); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("PDF Viewer"); |     window->set_title("PDF Viewer"); | ||||||
|     window->resize(640, 400); |     window->resize(640, 400); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -47,7 +47,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-partition-editor"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-partition-editor"sv)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Partition Editor"); |     window->set_title("Partition Editor"); | ||||||
|     window->resize(640, 400); |     window->resize(640, 400); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|  |  | ||||||
|  | @ -43,7 +43,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     auto audio_loop = AudioPlayerLoop::construct(track_manager, need_to_write_wav, wav_percent_written, wav_writer); |     auto audio_loop = AudioPlayerLoop::construct(track_manager, need_to_write_wav, wav_percent_written, wav_writer); | ||||||
| 
 | 
 | ||||||
|     auto app_icon = GUI::Icon::default_icon("app-piano"sv); |     auto app_icon = GUI::Icon::default_icon("app-piano"sv); | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     auto main_widget = TRY(window->set_main_widget<MainWidget>(track_manager, audio_loop)); |     auto main_widget = TRY(window->set_main_widget<MainWidget>(track_manager, audio_loop)); | ||||||
|     window->set_title("Piano"); |     window->set_title("Piano"); | ||||||
|     window->resize(840, 600); |     window->resize(840, 600); | ||||||
|  |  | ||||||
|  | @ -24,7 +24,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     argument_parser.parse(arguments); |     argument_parser.parse(arguments); | ||||||
| 
 | 
 | ||||||
|     auto app = TRY(GUI::Application::create(arguments)); |     auto app = TRY(GUI::Application::create(arguments)); | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Presenter"); |     window->set_title("Presenter"); | ||||||
|     window->set_icon(GUI::Icon::default_icon("app-presenter"sv).bitmap_for_size(16)); |     window->set_icon(GUI::Icon::default_icon("app-presenter"sv).bitmap_for_size(16)); | ||||||
|     auto main_widget = TRY(window->set_main_widget<PresenterWidget>()); |     auto main_widget = TRY(window->set_main_widget<PresenterWidget>()); | ||||||
|  |  | ||||||
|  | @ -88,7 +88,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = GUI::Icon::default_icon("app-settings"sv); |     auto app_icon = GUI::Icon::default_icon("app-settings"sv); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Settings"); |     window->set_title("Settings"); | ||||||
|     window->resize(420, 265); |     window->resize(420, 265); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -47,7 +47,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = GUI::Icon::default_icon("app-sound-player"sv); |     auto app_icon = GUI::Icon::default_icon("app-sound-player"sv); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Sound Player"); |     window->set_title("Sound Player"); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -47,7 +47,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     // Configure application window.
 |     // Configure application window.
 | ||||||
|     auto app_icon = GUI::Icon::default_icon("app-space-analyzer"sv); |     auto app_icon = GUI::Icon::default_icon("app-space-analyzer"sv); | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title(APP_NAME.bytes_as_string_view()); |     window->set_title(APP_NAME.bytes_as_string_view()); | ||||||
|     window->resize(640, 480); |     window->resize(640, 480); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|  |  | ||||||
|  | @ -278,7 +278,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-system-monitor"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-system-monitor"sv)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("System Monitor"); |     window->set_title("System Monitor"); | ||||||
|     window->resize(560, 430); |     window->resize(560, 430); | ||||||
| 
 | 
 | ||||||
|  | @ -523,7 +523,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
| ErrorOr<NonnullRefPtr<GUI::Window>> build_process_window(pid_t pid) | ErrorOr<NonnullRefPtr<GUI::Window>> build_process_window(pid_t pid) | ||||||
| { | { | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->resize(480, 360); |     window->resize(480, 360); | ||||||
|     window->set_title(DeprecatedString::formatted("PID {} - System Monitor", pid)); |     window->set_title(DeprecatedString::formatted("PID {} - System Monitor", pid)); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -158,7 +158,7 @@ static ErrorOr<void> run_command(StringView command, bool keep_open) | ||||||
| 
 | 
 | ||||||
| static ErrorOr<NonnullRefPtr<GUI::Window>> create_find_window(VT::TerminalWidget& terminal) | static ErrorOr<NonnullRefPtr<GUI::Window>> create_find_window(VT::TerminalWidget& terminal) | ||||||
| { | { | ||||||
|     auto window = TRY(GUI::Window::try_create(&terminal)); |     auto window = GUI::Window::construct(&terminal); | ||||||
|     window->set_window_mode(GUI::WindowMode::RenderAbove); |     window->set_window_mode(GUI::WindowMode::RenderAbove); | ||||||
|     window->set_title("Find in Terminal"); |     window->set_title("Find in Terminal"); | ||||||
|     window->set_resizable(false); |     window->set_resizable(false); | ||||||
|  | @ -279,7 +279,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = GUI::Icon::default_icon("app-terminal"sv); |     auto app_icon = GUI::Icon::default_icon("app-terminal"sv); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Terminal"); |     window->set_title("Terminal"); | ||||||
|     window->set_obey_widget_min_size(false); |     window->set_obey_widget_min_size(false); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -41,7 +41,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = GUI::Icon::default_icon("app-text-editor"sv); |     auto app_icon = GUI::Icon::default_icon("app-text-editor"sv); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->resize(640, 400); |     window->resize(640, 400); | ||||||
| 
 | 
 | ||||||
|     auto text_widget = TRY(window->set_main_widget<MainWidget>()); |     auto text_widget = TRY(window->set_main_widget<MainWidget>()); | ||||||
|  |  | ||||||
|  | @ -26,7 +26,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     auto app = TRY(GUI::Application::create(arguments)); |     auto app = TRY(GUI::Application::create(arguments)); | ||||||
|     app->set_config_domain("VideoPlayer"_string); |     app->set_config_domain("VideoPlayer"_string); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->resize(640, 480); |     window->resize(640, 480); | ||||||
|     window->set_resizable(true); |     window->set_resizable(true); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -27,7 +27,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     TRY(Core::System::unveil(nullptr, nullptr)); |     TRY(Core::System::unveil(nullptr, nullptr)); | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-welcome"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-welcome"sv)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->resize(480, 250); |     window->resize(480, 250); | ||||||
|     window->center_on_screen(); |     window->center_on_screen(); | ||||||
|     window->set_title("Welcome"); |     window->set_title("Welcome"); | ||||||
|  |  | ||||||
|  | @ -31,7 +31,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     TRY(Core::System::unveil("/etc/passwd", "r")); |     TRY(Core::System::unveil("/etc/passwd", "r")); | ||||||
|     TRY(Core::System::unveil(nullptr, nullptr)); |     TRY(Core::System::unveil(nullptr, nullptr)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("CatDog Demo"); |     window->set_title("CatDog Demo"); | ||||||
|     window->resize(32, 32); |     window->resize(32, 32); | ||||||
|     window->set_frameless(true); |     window->set_frameless(true); | ||||||
|  | @ -53,7 +53,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     window->set_always_on_top(); |     window->set_always_on_top(); | ||||||
|     catdog_widget->start_timer(250, Core::TimerShouldFireWhenNotVisible::Yes); |     catdog_widget->start_timer(250, Core::TimerShouldFireWhenNotVisible::Yes); | ||||||
| 
 | 
 | ||||||
|     auto advice_window = TRY(GUI::Window::try_create()); |     auto advice_window = GUI::Window::construct(); | ||||||
|     advice_window->set_title("CatDog Advice"); |     advice_window->set_title("CatDog Advice"); | ||||||
|     advice_window->resize(225, 50); |     advice_window->resize(225, 50); | ||||||
|     advice_window->set_frameless(true); |     advice_window->set_frameless(true); | ||||||
|  |  | ||||||
|  | @ -63,7 +63,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-eyes"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-eyes"sv)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Eyes"); |     window->set_title("Eyes"); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|     window->resize(75 * (full_rows > 0 ? max_in_row : extra_columns), 100 * (full_rows + (extra_columns > 0 ? 1 : 0))); |     window->resize(75 * (full_rows > 0 ? max_in_row : extra_columns), 100 * (full_rows + (extra_columns > 0 ? 1 : 0))); | ||||||
|  |  | ||||||
|  | @ -191,7 +191,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     TRY(Core::System::unveil("/res", "r")); |     TRY(Core::System::unveil("/res", "r")); | ||||||
|     TRY(Core::System::unveil(nullptr, nullptr)); |     TRY(Core::System::unveil(nullptr, nullptr)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_double_buffering_enabled(true); |     window->set_double_buffering_enabled(true); | ||||||
|     window->set_title("LibGfx Demo"); |     window->set_title("LibGfx Demo"); | ||||||
|     window->set_resizable(false); |     window->set_resizable(false); | ||||||
|  |  | ||||||
|  | @ -111,7 +111,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     TRY(Core::System::unveil("/res", "r")); |     TRY(Core::System::unveil("/res", "r")); | ||||||
|     TRY(Core::System::unveil(nullptr, nullptr)); |     TRY(Core::System::unveil(nullptr, nullptr)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("LibGfx Scale Demo"); |     window->set_title("LibGfx Scale Demo"); | ||||||
|     window->set_resizable(false); |     window->set_resizable(false); | ||||||
|     window->resize(WIDTH * 2, HEIGHT * 3); |     window->resize(WIDTH * 2, HEIGHT * 3); | ||||||
|  |  | ||||||
|  | @ -405,7 +405,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     TRY(unveil(nullptr, nullptr)); |     TRY(unveil(nullptr, nullptr)); | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_double_buffering_enabled(false); |     window->set_double_buffering_enabled(false); | ||||||
|     window->set_title("Mandelbrot"); |     window->set_title("Mandelbrot"); | ||||||
|     window->set_obey_widget_min_size(false); |     window->set_obey_widget_min_size(false); | ||||||
|  |  | ||||||
|  | @ -24,7 +24,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-model-gallery"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-model-gallery"sv)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Model Gallery"); |     window->set_title("Model Gallery"); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|     window->resize(430, 480); |     window->resize(430, 480); | ||||||
|  |  | ||||||
|  | @ -72,7 +72,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = GUI::Icon::default_icon("app-screensaver"sv); |     auto app_icon = GUI::Icon::default_icon("app-screensaver"sv); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Screensaver"); |     window->set_title("Screensaver"); | ||||||
|     window->resize(360, 240); |     window->resize(360, 240); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -23,7 +23,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     TRY(Core::System::unveil(nullptr, nullptr)); |     TRY(Core::System::unveil(nullptr, nullptr)); | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-widget-gallery"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-widget-gallery"sv)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->resize(430, 480); |     window->resize(430, 480); | ||||||
|     window->set_title("Widget Gallery"); |     window->set_title("Widget Gallery"); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|  |  | ||||||
|  | @ -73,7 +73,7 @@ ErrorOr<NonnullRefPtr<MainWidget>> MainWidget::try_create(GUI::Icon const& icon) | ||||||
|     main_widget->m_preview_frame_widget = main_widget->find_descendant_of_type_named<GUI::Frame>("preview_frame"); |     main_widget->m_preview_frame_widget = main_widget->find_descendant_of_type_named<GUI::Frame>("preview_frame"); | ||||||
|     main_widget->m_statusbar = main_widget->find_descendant_of_type_named<GUI::Statusbar>("statusbar"); |     main_widget->m_statusbar = main_widget->find_descendant_of_type_named<GUI::Statusbar>("statusbar"); | ||||||
| 
 | 
 | ||||||
|     main_widget->m_preview_window = TRY(GUI::Window::try_create(main_widget)); |     main_widget->m_preview_window = GUI::Window::construct(main_widget); | ||||||
|     main_widget->m_preview_window->set_title("Preview - GML Playground"); |     main_widget->m_preview_window->set_title("Preview - GML Playground"); | ||||||
|     main_widget->m_preview_window->set_icon(icon.bitmap_for_size(16)); |     main_widget->m_preview_window->set_icon(icon.bitmap_for_size(16)); | ||||||
|     main_widget->m_preview_window_widget = TRY(main_widget->m_preview_window->set_main_widget<GUI::Widget>()); |     main_widget->m_preview_window_widget = TRY(main_widget->m_preview_window->set_main_widget<GUI::Widget>()); | ||||||
|  |  | ||||||
|  | @ -40,7 +40,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     args_parser.parse(arguments); |     args_parser.parse(arguments); | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-gml-playground"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-gml-playground"sv)); | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("GML Playground"); |     window->set_title("GML Playground"); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|     window->resize(800, 600); |     window->resize(800, 600); | ||||||
|  |  | ||||||
|  | @ -79,7 +79,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto& profile = profile_or_error.value(); |     auto& profile = profile_or_error.value(); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
| 
 | 
 | ||||||
|     TRY(Desktop::Launcher::add_allowed_handler_with_only_specific_urls("/bin/Help", { URL::create_with_file_scheme("/usr/share/man/man1/Applications/Profiler.md") })); |     TRY(Desktop::Launcher::add_allowed_handler_with_only_specific_urls("/bin/Help", { URL::create_with_file_scheme("/usr/share/man/man1/Applications/Profiler.md") })); | ||||||
|     TRY(Desktop::Launcher::seal_allowlist()); |     TRY(Desktop::Launcher::seal_allowlist()); | ||||||
|  |  | ||||||
|  | @ -25,7 +25,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = GUI::Icon::default_icon("app-sql-studio"sv); |     auto app_icon = GUI::Icon::default_icon("app-sql-studio"sv); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->resize(640, 480); |     window->resize(640, 480); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|     window->set_title("SQL Studio"); |     window->set_title("SQL Studio"); | ||||||
|  |  | ||||||
|  | @ -35,7 +35,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     auto app = TRY(GUI::Application::create(arguments)); |     auto app = TRY(GUI::Application::create(arguments)); | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-2048"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-2048"sv)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
| 
 | 
 | ||||||
|     Config::pledge_domain("2048"); |     Config::pledge_domain("2048"); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -42,7 +42,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-brickgame"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-brickgame"sv)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
| 
 | 
 | ||||||
|     window->set_double_buffering_enabled(false); |     window->set_double_buffering_enabled(false); | ||||||
|     window->set_title(title.bytes_as_string_view()); |     window->set_title(title.bytes_as_string_view()); | ||||||
|  |  | ||||||
|  | @ -62,7 +62,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-chess"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-chess"sv)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     auto widget = TRY(window->set_main_widget<ChessWidget>()); |     auto widget = TRY(window->set_main_widget<ChessWidget>()); | ||||||
| 
 | 
 | ||||||
|     auto engines = TRY(available_engines()); |     auto engines = TRY(available_engines()); | ||||||
|  |  | ||||||
|  | @ -41,7 +41,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-colorlines"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-colorlines"sv)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
| 
 | 
 | ||||||
|     window->set_double_buffering_enabled(false); |     window->set_double_buffering_enabled(false); | ||||||
|     window->set_title(title.bytes_as_string_view()); |     window->set_title(title.bytes_as_string_view()); | ||||||
|  |  | ||||||
|  | @ -36,7 +36,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     u32 high_score = Config::read_i32("FlappyBug"sv, "Game"sv, "HighScore"sv, 0); |     u32 high_score = Config::read_i32("FlappyBug"sv, "Game"sv, "HighScore"sv, 0); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->resize(FlappyBug::Game::game_width, FlappyBug::Game::game_height); |     window->resize(FlappyBug::Game::game_width, FlappyBug::Game::game_height); | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-flappybug"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-flappybug"sv)); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|  |  | ||||||
|  | @ -60,7 +60,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     auto app = TRY(GUI::Application::create(arguments)); |     auto app = TRY(GUI::Application::create(arguments)); | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-flood"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-flood"sv)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
| 
 | 
 | ||||||
|     Config::pledge_domain("Flood"); |     Config::pledge_domain("Flood"); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -43,7 +43,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-gameoflife"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-gameoflife"sv)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
| 
 | 
 | ||||||
|     size_t board_columns = 35; |     size_t board_columns = 35; | ||||||
|  |  | ||||||
|  | @ -47,7 +47,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     TRY(Core::System::unveil("/bin/GamesSettings", "x")); |     TRY(Core::System::unveil("/bin/GamesSettings", "x")); | ||||||
|     TRY(Core::System::unveil(nullptr, nullptr)); |     TRY(Core::System::unveil(nullptr, nullptr)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Hearts"); |     window->set_title("Hearts"); | ||||||
| 
 | 
 | ||||||
|     auto widget = TRY(window->set_main_widget<GUI::Widget>()); |     auto widget = TRY(window->set_main_widget<GUI::Widget>()); | ||||||
|  |  | ||||||
|  | @ -40,7 +40,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-masterword"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-masterword"sv)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_icon(app_icon.bitmap_for_size(16)); |     window->set_icon(app_icon.bitmap_for_size(16)); | ||||||
|     window->set_double_buffering_enabled(false); |     window->set_double_buffering_enabled(false); | ||||||
|     window->set_title("MasterWord"); |     window->set_title("MasterWord"); | ||||||
|  |  | ||||||
|  | @ -44,7 +44,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-minesweeper"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-minesweeper"sv)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_resizable(false); |     window->set_resizable(false); | ||||||
|     window->set_title("Minesweeper"); |     window->set_title("Minesweeper"); | ||||||
|     window->set_auto_shrink(true); |     window->set_auto_shrink(true); | ||||||
|  |  | ||||||
|  | @ -46,7 +46,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
| 
 | 
 | ||||||
|     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-snake"sv)); |     auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-snake"sv)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
| 
 | 
 | ||||||
|     window->set_double_buffering_enabled(false); |     window->set_double_buffering_enabled(false); | ||||||
|     window->set_title("Snake"); |     window->set_title("Snake"); | ||||||
|  |  | ||||||
|  | @ -47,7 +47,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     TRY(Core::System::unveil("/bin/GamesSettings", "x")); |     TRY(Core::System::unveil("/bin/GamesSettings", "x")); | ||||||
|     TRY(Core::System::unveil(nullptr, nullptr)); |     TRY(Core::System::unveil(nullptr, nullptr)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Solitaire"); |     window->set_title("Solitaire"); | ||||||
| 
 | 
 | ||||||
|     auto mode = static_cast<Solitaire::Mode>(Config::read_u32("Solitaire"sv, "Settings"sv, "Mode"sv, to_underlying(Solitaire::Mode::SingleCardDraw))); |     auto mode = static_cast<Solitaire::Mode>(Config::read_u32("Solitaire"sv, "Settings"sv, "Mode"sv, to_underlying(Solitaire::Mode::SingleCardDraw))); | ||||||
|  |  | ||||||
|  | @ -46,7 +46,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) | ||||||
|     TRY(Core::System::unveil("/bin/GamesSettings", "x")); |     TRY(Core::System::unveil("/bin/GamesSettings", "x")); | ||||||
|     TRY(Core::System::unveil(nullptr, nullptr)); |     TRY(Core::System::unveil(nullptr, nullptr)); | ||||||
| 
 | 
 | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_title("Spider"); |     window->set_title("Spider"); | ||||||
| 
 | 
 | ||||||
|     auto mode = static_cast<Spider::Mode>(Config::read_u32("Spider"sv, "Settings"sv, "Mode"sv, to_underlying(Spider::Mode::SingleSuit))); |     auto mode = static_cast<Spider::Mode>(Config::read_u32("Spider"sv, "Settings"sv, "Mode"sv, to_underlying(Spider::Mode::SingleSuit))); | ||||||
|  |  | ||||||
|  | @ -14,7 +14,7 @@ static constexpr int mouse_tracking_delay_milliseconds = 750; | ||||||
| 
 | 
 | ||||||
| ErrorOr<NonnullRefPtr<GUI::Window>> Screensaver::create_window(StringView title, StringView icon) | ErrorOr<NonnullRefPtr<GUI::Window>> Screensaver::create_window(StringView title, StringView icon) | ||||||
| { | { | ||||||
|     auto window = TRY(GUI::Window::try_create()); |     auto window = GUI::Window::construct(); | ||||||
|     window->set_double_buffering_enabled(false); |     window->set_double_buffering_enabled(false); | ||||||
|     window->set_frameless(true); |     window->set_frameless(true); | ||||||
|     window->set_fullscreen(true); |     window->set_fullscreen(true); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Ledbetter
						Tim Ledbetter