Răsfoiți Sursa

device: defer showing window

This is mandatory for Wayland and also more correct generally.

Part-of: #165
Daniele Bartolini 1 săptămână în urmă
părinte
comite
309c72ee30
1 a modificat fișierele cu 5 adăugiri și 5 ștergeri
  1. 5 5
      src/device/device.cpp

+ 5 - 5
src/device/device.cpp

@@ -651,11 +651,6 @@ int Device::main_loop()
 		, _height
 		, _options._parent_window
 		);
-	_window->set_title(_boot_config.window_title.c_str());
-	_window->set_fullscreen(_boot_config.fullscreen);
-
-	if (!_options._hidden)
-		_window->show();
 
 	_bgfx_allocator = CE_NEW(_allocator, BgfxAllocator)(default_allocator());
 	_bgfx_callback  = CE_NEW(_allocator, BgfxCallback)(default_allocator());
@@ -706,6 +701,11 @@ int Device::main_loop()
 		return EXIT_FAILURE;
 	}
 
+	_window->set_title(_boot_config.window_title.c_str());
+	_window->set_fullscreen(_boot_config.fullscreen);
+	if (!_options._hidden)
+		_window->show();
+
 	_input_manager    = CE_NEW(_allocator, InputManager)(default_allocator());
 	_unit_manager     = CE_NEW(_allocator, UnitManager)(default_allocator());
 	_lua_environment  = CE_NEW(_allocator, LuaEnvironment)();