diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp
index d4e152f5c0..7559270caf 100644
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -85,7 +85,7 @@ static constexpr NWidgetPart _nested_ai_config_widgets[] = {
 static WindowDesc _ai_config_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_GAME_OPTIONS, WC_NONE,
-	0,
+	{},
 	_nested_ai_config_widgets
 );
 
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp
index d8db177836..1927513e36 100644
--- a/src/airport_gui.cpp
+++ b/src/airport_gui.cpp
@@ -211,7 +211,7 @@ static constexpr NWidgetPart _nested_air_toolbar_widgets[] = {
 static WindowDesc _air_toolbar_desc(
 	WDP_ALIGN_TOOLBAR, "toolbar_air", 0, 0,
 	WC_BUILD_TOOLBAR, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_air_toolbar_widgets,
 	&BuildAirToolbarWindow::hotkeys
 );
@@ -620,7 +620,7 @@ static constexpr NWidgetPart _nested_build_airport_widgets[] = {
 static WindowDesc _build_airport_desc(
 	WDP_AUTO, nullptr, 0, 0,
 	WC_BUILD_STATION, WC_BUILD_TOOLBAR,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_airport_widgets
 );
 
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp
index 85ed67e295..21d6f432c6 100644
--- a/src/autoreplace_gui.cpp
+++ b/src/autoreplace_gui.cpp
@@ -764,7 +764,7 @@ static constexpr NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
 static WindowDesc _replace_rail_vehicle_desc(
 	WDP_AUTO, "replace_vehicle_train", 500, 140,
 	WC_REPLACE_VEHICLE, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_replace_rail_vehicle_widgets
 );
 
@@ -822,7 +822,7 @@ static constexpr NWidgetPart _nested_replace_road_vehicle_widgets[] = {
 static WindowDesc _replace_road_vehicle_desc(
 	WDP_AUTO, "replace_vehicle_road", 500, 140,
 	WC_REPLACE_VEHICLE, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_replace_road_vehicle_widgets
 );
 
@@ -876,7 +876,7 @@ static constexpr NWidgetPart _nested_replace_vehicle_widgets[] = {
 static WindowDesc _replace_vehicle_desc(
 	WDP_AUTO, "replace_vehicle", 456, 118,
 	WC_REPLACE_VEHICLE, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_replace_vehicle_widgets
 );
 
diff --git a/src/bootstrap_gui.cpp b/src/bootstrap_gui.cpp
index 434e0df46f..5982f14c58 100644
--- a/src/bootstrap_gui.cpp
+++ b/src/bootstrap_gui.cpp
@@ -43,7 +43,7 @@ static constexpr NWidgetPart _background_widgets[] = {
 static WindowDesc _background_desc(
 	WDP_MANUAL, nullptr, 0, 0,
 	WC_BOOTSTRAP, WC_NONE,
-	WDF_NO_CLOSE,
+	WindowDefaultFlag::NoClose,
 	_background_widgets
 );
 
@@ -79,7 +79,7 @@ static constexpr NWidgetPart _nested_bootstrap_errmsg_widgets[] = {
 static WindowDesc _bootstrap_errmsg_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_BOOTSTRAP, WC_NONE,
-	WDF_MODAL | WDF_NO_CLOSE,
+	{WindowDefaultFlag::Modal, WindowDefaultFlag::NoClose},
 	_nested_bootstrap_errmsg_widgets
 );
 
@@ -136,7 +136,7 @@ static constexpr NWidgetPart _nested_bootstrap_download_status_window_widgets[]
 static WindowDesc _bootstrap_download_status_window_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_NETWORK_STATUS_WINDOW, WC_NONE,
-	WDF_MODAL | WDF_NO_CLOSE,
+	{WindowDefaultFlag::Modal, WindowDefaultFlag::NoClose},
 	_nested_bootstrap_download_status_window_widgets
 );
 
@@ -188,7 +188,7 @@ static constexpr NWidgetPart _bootstrap_query_widgets[] = {
 static WindowDesc _bootstrap_query_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_CONFIRM_POPUP_QUERY, WC_NONE,
-	WDF_NO_CLOSE,
+	WindowDefaultFlag::NoClose,
 	_bootstrap_query_widgets
 );
 
diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp
index a1fad1be4c..5551dfd86d 100644
--- a/src/bridge_gui.cpp
+++ b/src/bridge_gui.cpp
@@ -337,7 +337,7 @@ static constexpr NWidgetPart _nested_build_bridge_widgets[] = {
 static WindowDesc _build_bridge_desc(
 	WDP_AUTO, "build_bridge", 200, 114,
 	WC_BUILD_BRIDGE, WC_BUILD_TOOLBAR,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_bridge_widgets
 );
 
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index 2a19733fd1..cb91798a7f 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -1921,7 +1921,7 @@ struct BuildVehicleWindow : Window {
 static WindowDesc _build_vehicle_desc(
 	WDP_AUTO, "build_vehicle", 240, 268,
 	WC_BUILD_VEHICLE, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_vehicle_widgets,
 	&BuildVehicleWindow::hotkeys
 );
diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp
index a28de79218..b8443857ab 100644
--- a/src/cheat_gui.cpp
+++ b/src/cheat_gui.cpp
@@ -644,7 +644,7 @@ struct CheatWindow : Window {
 static WindowDesc _cheats_desc(
 	WDP_AUTO, "cheats", 0, 0,
 	WC_CHEATS, WC_NONE,
-	0,
+	{},
 	_nested_cheat_widgets
 );
 
diff --git a/src/company_gui.cpp b/src/company_gui.cpp
index 90971fe180..594869d288 100644
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -556,7 +556,7 @@ Money CompanyFinancesWindow::max_money = INT32_MAX;
 static WindowDesc _company_finances_desc(
 	WDP_AUTO, "company_finances", 0, 0,
 	WC_FINANCES, WC_NONE,
-	0,
+	{},
 	_nested_company_finances_widgets
 );
 
@@ -1103,7 +1103,7 @@ static constexpr NWidgetPart _nested_select_company_livery_widgets[] = {
 static WindowDesc _select_company_livery_desc(
 	WDP_AUTO, "company_color_scheme", 0, 0,
 	WC_COMPANY_COLOUR, WC_NONE,
-	0,
+	{},
 	_nested_select_company_livery_widgets
 );
 
@@ -1728,7 +1728,7 @@ public:
 static WindowDesc _select_company_manager_face_desc(
 	WDP_AUTO, nullptr, 0, 0,
 	WC_COMPANY_MANAGER_FACE, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_select_company_manager_face_widgets
 );
 
@@ -2105,7 +2105,7 @@ struct CompanyInfrastructureWindow : Window
 static WindowDesc _company_infrastructure_desc(
 	WDP_AUTO, "company_infrastructure", 0, 0,
 	WC_COMPANY_INFRASTRUCTURE, WC_NONE,
-	0,
+	{},
 	_nested_company_infrastructure_widgets
 );
 
@@ -2584,7 +2584,7 @@ struct CompanyWindow : Window
 static WindowDesc _company_desc(
 	WDP_AUTO, "company", 0, 0,
 	WC_COMPANY, WC_NONE,
-	0,
+	{},
 	_nested_company_widgets
 );
 
@@ -2718,7 +2718,7 @@ static constexpr NWidgetPart _nested_buy_company_widgets[] = {
 static WindowDesc _buy_company_desc(
 	WDP_AUTO, nullptr, 0, 0,
 	WC_BUY_COMPANY, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_buy_company_widgets
 );
 
diff --git a/src/console_gui.cpp b/src/console_gui.cpp
index 13aa45f232..c4809b996c 100644
--- a/src/console_gui.cpp
+++ b/src/console_gui.cpp
@@ -139,7 +139,7 @@ static constexpr NWidgetPart _nested_console_window_widgets[] = {
 static WindowDesc _console_window_desc(
 	WDP_MANUAL, nullptr, 0, 0,
 	WC_CONSOLE, WC_NONE,
-	0,
+	{},
 	_nested_console_window_widgets
 );
 
diff --git a/src/date_gui.cpp b/src/date_gui.cpp
index 06b3e68b71..5f115730bf 100644
--- a/src/date_gui.cpp
+++ b/src/date_gui.cpp
@@ -199,7 +199,7 @@ static constexpr NWidgetPart _nested_set_date_widgets[] = {
 static WindowDesc _set_date_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_SET_DATE, WC_NONE,
-	0,
+	{},
 	_nested_set_date_widgets
 );
 
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp
index 797884929a..9096067294 100644
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -88,28 +88,28 @@ static constexpr NWidgetPart _nested_train_depot_widgets[] = {
 static WindowDesc _train_depot_desc(
 	WDP_AUTO, "depot_train", 362, 123,
 	WC_VEHICLE_DEPOT, WC_NONE,
-	0,
+	{},
 	_nested_train_depot_widgets
 );
 
 static WindowDesc _road_depot_desc(
 	WDP_AUTO, "depot_roadveh", 316, 97,
 	WC_VEHICLE_DEPOT, WC_NONE,
-	0,
+	{},
 	_nested_train_depot_widgets
 );
 
 static WindowDesc _ship_depot_desc(
 	WDP_AUTO, "depot_ship", 306, 99,
 	WC_VEHICLE_DEPOT, WC_NONE,
-	0,
+	{},
 	_nested_train_depot_widgets
 );
 
 static WindowDesc _aircraft_depot_desc(
 	WDP_AUTO, "depot_aircraft", 332, 99,
 	WC_VEHICLE_DEPOT, WC_NONE,
-	0,
+	{},
 	_nested_train_depot_widgets
 );
 
diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp
index ae45fcfd32..ac2c004cea 100644
--- a/src/dock_gui.cpp
+++ b/src/dock_gui.cpp
@@ -347,7 +347,7 @@ static constexpr NWidgetPart _nested_build_docks_toolbar_widgets[] = {
 static WindowDesc _build_docks_toolbar_desc(
 	WDP_ALIGN_TOOLBAR, "toolbar_water", 0, 0,
 	WC_BUILD_TOOLBAR, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_docks_toolbar_widgets,
 	&BuildDocksToolbarWindow::hotkeys
 );
@@ -391,7 +391,7 @@ static constexpr NWidgetPart _nested_build_docks_scen_toolbar_widgets[] = {
 static WindowDesc _build_docks_scen_toolbar_desc(
 	WDP_AUTO, "toolbar_water_scen", 0, 0,
 	WC_SCEN_BUILD_TOOLBAR, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_docks_scen_toolbar_widgets
 );
 
@@ -501,7 +501,7 @@ static constexpr NWidgetPart _nested_build_dock_station_widgets[] = {
 static WindowDesc _build_dock_station_desc(
 	WDP_AUTO, nullptr, 0, 0,
 	WC_BUILD_STATION, WC_BUILD_TOOLBAR,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_dock_station_widgets
 );
 
@@ -596,7 +596,7 @@ static constexpr NWidgetPart _nested_build_docks_depot_widgets[] = {
 static WindowDesc _build_docks_depot_desc(
 	WDP_AUTO, nullptr, 0, 0,
 	WC_BUILD_DEPOT, WC_BUILD_TOOLBAR,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_docks_depot_widgets
 );
 
diff --git a/src/dropdown.cpp b/src/dropdown.cpp
index fa9843773d..a328c69896 100644
--- a/src/dropdown.cpp
+++ b/src/dropdown.cpp
@@ -64,7 +64,7 @@ static constexpr NWidgetPart _nested_dropdown_menu_widgets[] = {
 static WindowDesc _dropdown_desc(
 	WDP_MANUAL, nullptr, 0, 0,
 	WC_DROPDOWN_MENU, WC_NONE,
-	WDF_NO_FOCUS,
+	WindowDefaultFlag::NoFocus,
 	_nested_dropdown_menu_widgets
 );
 
diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp
index bc615b0c93..2d9a12a8a4 100644
--- a/src/engine_gui.cpp
+++ b/src/engine_gui.cpp
@@ -147,7 +147,7 @@ struct EnginePreviewWindow : Window {
 static WindowDesc _engine_preview_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_ENGINE_PREVIEW, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_engine_preview_widgets
 );
 
diff --git a/src/error_gui.cpp b/src/error_gui.cpp
index 7636252b7d..824b3f9f26 100644
--- a/src/error_gui.cpp
+++ b/src/error_gui.cpp
@@ -46,7 +46,7 @@ static constexpr NWidgetPart _nested_errmsg_widgets[] = {
 static WindowDesc _errmsg_desc(
 	WDP_MANUAL, nullptr, 0, 0,
 	WC_ERRMSG, WC_NONE,
-	0,
+	{},
 	_nested_errmsg_widgets
 );
 
@@ -66,7 +66,7 @@ static constexpr NWidgetPart _nested_errmsg_face_widgets[] = {
 static WindowDesc _errmsg_face_desc(
 	WDP_MANUAL, nullptr, 0, 0,
 	WC_ERRMSG, WC_NONE,
-	0,
+	{},
 	_nested_errmsg_face_widgets
 );
 
diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp
index 8b6b1500a1..6511c625c8 100644
--- a/src/fios_gui.cpp
+++ b/src/fios_gui.cpp
@@ -950,7 +950,7 @@ public:
 static WindowDesc _load_dialog_desc(
 	WDP_CENTER, "load_game", 500, 294,
 	WC_SAVELOAD, WC_NONE,
-	0,
+	{},
 	_nested_load_dialog_widgets
 );
 
@@ -958,7 +958,7 @@ static WindowDesc _load_dialog_desc(
 static WindowDesc _load_heightmap_dialog_desc(
 	WDP_CENTER, "load_heightmap", 257, 320,
 	WC_SAVELOAD, WC_NONE,
-	0,
+	{},
 	_nested_load_heightmap_dialog_widgets
 );
 
@@ -966,7 +966,7 @@ static WindowDesc _load_heightmap_dialog_desc(
 static WindowDesc _load_town_data_dialog_desc(
 	WDP_CENTER, "load_town_data", 257, 320,
 	WC_SAVELOAD, WC_NONE,
-	0,
+	{},
 	_nested_load_town_data_dialog_widgets
 );
 
@@ -974,7 +974,7 @@ static WindowDesc _load_town_data_dialog_desc(
 static WindowDesc _save_dialog_desc(
 	WDP_CENTER, "save_game", 500, 294,
 	WC_SAVELOAD, WC_NONE,
-	0,
+	{},
 	_nested_save_dialog_widgets
 );
 
diff --git a/src/framerate_gui.cpp b/src/framerate_gui.cpp
index 8272df9487..b35e040060 100644
--- a/src/framerate_gui.cpp
+++ b/src/framerate_gui.cpp
@@ -723,7 +723,7 @@ struct FramerateWindow : Window {
 static WindowDesc _framerate_display_desc(
 	WDP_AUTO, "framerate_display", 0, 0,
 	WC_FRAMERATE_DISPLAY, WC_NONE,
-	0,
+	{},
 	_framerate_window_widgets
 );
 
@@ -1014,7 +1014,7 @@ struct FrametimeGraphWindow : Window {
 static WindowDesc _frametime_graph_window_desc(
 	WDP_AUTO, "frametime_graph", 140, 90,
 	WC_FRAMETIME_GRAPH, WC_NONE,
-	0,
+	{},
 	_frametime_graph_window_widgets
 );
 
diff --git a/src/game/game_gui.cpp b/src/game/game_gui.cpp
index 73fe5c500f..3867d4cd68 100644
--- a/src/game/game_gui.cpp
+++ b/src/game/game_gui.cpp
@@ -77,7 +77,7 @@ static constexpr NWidgetPart _nested_gs_config_widgets[] = {
 static WindowDesc _gs_config_desc(
 	WDP_CENTER, "settings_gs_config", 500, 350,
 	WC_GAME_OPTIONS, WC_NONE,
-	0,
+	{},
 	_nested_gs_config_widgets
 );
 
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp
index 8ead3bbd3c..935404c445 100644
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -1003,14 +1003,14 @@ struct GenerateLandscapeWindow : public Window {
 static WindowDesc _generate_landscape_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_GENERATE_LANDSCAPE, WC_NONE,
-	0,
+	{},
 	_nested_generate_landscape_widgets
 );
 
 static WindowDesc _heightmap_load_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_GENERATE_LANDSCAPE, WC_NONE,
-	0,
+	{},
 	_nested_heightmap_load_widgets
 );
 
@@ -1313,7 +1313,7 @@ static constexpr NWidgetPart _nested_create_scenario_widgets[] = {
 static WindowDesc _create_scenario_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_GENERATE_LANDSCAPE, WC_NONE,
-	0,
+	{},
 	_nested_create_scenario_widgets
 );
 
@@ -1339,7 +1339,7 @@ static constexpr NWidgetPart _nested_generate_progress_widgets[] = {
 static WindowDesc _generate_progress_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_MODAL_PROGRESS, WC_NONE,
-	WDF_NO_CLOSE,
+	WindowDefaultFlag::NoClose,
 	_nested_generate_progress_widgets
 );
 
diff --git a/src/goal_gui.cpp b/src/goal_gui.cpp
index 3780c9f290..5c914f5eb7 100644
--- a/src/goal_gui.cpp
+++ b/src/goal_gui.cpp
@@ -305,7 +305,7 @@ static constexpr NWidgetPart _nested_goals_list_widgets[] = {
 static WindowDesc _goals_list_desc(
 	WDP_AUTO, "list_goals", 500, 127,
 	WC_GOALS_LIST, WC_NONE,
-	0,
+	{},
 	_nested_goals_list_widgets
 );
 
@@ -449,25 +449,25 @@ static WindowDesc _goal_question_list_desc[] = {
 	{
 		WDP_CENTER, nullptr, 0, 0,
 		WC_GOAL_QUESTION, WC_NONE,
-		WDF_CONSTRUCTION,
+		WindowDefaultFlag::Construction,
 		_nested_goal_question_widgets_question,
 	},
 	{
 		WDP_CENTER, nullptr, 0, 0,
 		WC_GOAL_QUESTION, WC_NONE,
-		WDF_CONSTRUCTION,
+		WindowDefaultFlag::Construction,
 		_nested_goal_question_widgets_info,
 	},
 	{
 		WDP_CENTER, nullptr, 0, 0,
 		WC_GOAL_QUESTION, WC_NONE,
-		WDF_CONSTRUCTION,
+		WindowDefaultFlag::Construction,
 		_nested_goal_question_widgets_warning,
 	},
 	{
 		WDP_CENTER, nullptr, 0, 0,
 		WC_GOAL_QUESTION, WC_NONE,
-		WDF_CONSTRUCTION,
+		WindowDefaultFlag::Construction,
 		_nested_goal_question_widgets_error,
 	},
 };
diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp
index f0ba5f8225..7f14055e18 100644
--- a/src/graph_gui.cpp
+++ b/src/graph_gui.cpp
@@ -146,7 +146,7 @@ static constexpr NWidgetPart _nested_graph_legend_widgets[] = {
 static WindowDesc _graph_legend_desc(
 	WDP_AUTO, "graph_legend", 0, 0,
 	WC_GRAPH_LEGEND, WC_NONE,
-	0,
+	{},
 	_nested_graph_legend_widgets
 );
 
@@ -775,7 +775,7 @@ static constexpr NWidgetPart _nested_operating_profit_widgets[] = {
 static WindowDesc _operating_profit_desc(
 	WDP_AUTO, "graph_operating_profit", 0, 0,
 	WC_OPERATING_PROFIT, WC_NONE,
-	0,
+	{},
 	_nested_operating_profit_widgets
 );
 
@@ -834,7 +834,7 @@ static constexpr NWidgetPart _nested_income_graph_widgets[] = {
 static WindowDesc _income_graph_desc(
 	WDP_AUTO, "graph_income", 0, 0,
 	WC_INCOME_GRAPH, WC_NONE,
-	0,
+	{},
 	_nested_income_graph_widgets
 );
 
@@ -891,7 +891,7 @@ static constexpr NWidgetPart _nested_delivered_cargo_graph_widgets[] = {
 static WindowDesc _delivered_cargo_graph_desc(
 	WDP_AUTO, "graph_delivered_cargo", 0, 0,
 	WC_DELIVERED_CARGO, WC_NONE,
-	0,
+	{},
 	_nested_delivered_cargo_graph_widgets
 );
 
@@ -955,7 +955,7 @@ static constexpr NWidgetPart _nested_performance_history_widgets[] = {
 static WindowDesc _performance_history_desc(
 	WDP_AUTO, "graph_performance", 0, 0,
 	WC_PERFORMANCE_HISTORY, WC_NONE,
-	0,
+	{},
 	_nested_performance_history_widgets
 );
 
@@ -1012,7 +1012,7 @@ static constexpr NWidgetPart _nested_company_value_graph_widgets[] = {
 static WindowDesc _company_value_graph_desc(
 	WDP_AUTO, "graph_company_value", 0, 0,
 	WC_COMPANY_VALUE, WC_NONE,
-	0,
+	{},
 	_nested_company_value_graph_widgets
 );
 
@@ -1246,7 +1246,7 @@ static constexpr NWidgetPart _nested_cargo_payment_rates_widgets[] = {
 static WindowDesc _cargo_payment_rates_desc(
 	WDP_AUTO, "graph_cargo_payment_rates", 0, 0,
 	WC_PAYMENT_RATES, WC_NONE,
-	0,
+	{},
 	_nested_cargo_payment_rates_widgets
 );
 
@@ -1767,7 +1767,7 @@ static constexpr NWidgetPart _nested_industry_production_widgets[] = {
 static WindowDesc _industry_production_desc(
 	WDP_AUTO, "graph_industry_production", 0, 0,
 	WC_INDUSTRY_PRODUCTION, WC_INDUSTRY_VIEW,
-	0,
+	{},
 	_nested_industry_production_widgets
 );
 
@@ -1830,7 +1830,7 @@ static constexpr NWidgetPart _nested_performance_rating_detail_widgets[] = {
 static WindowDesc _performance_rating_detail_desc(
 	WDP_AUTO, "league_details", 0, 0,
 	WC_PERFORMANCE_DETAIL, WC_NONE,
-	0,
+	{},
 	_nested_performance_rating_detail_widgets
 );
 
diff --git a/src/group_gui.cpp b/src/group_gui.cpp
index 8894bf0199..c3839b7d52 100644
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -1154,25 +1154,25 @@ static WindowDesc _vehicle_group_desc[] = {
 	{
 		WDP_AUTO, "list_groups_train", 525, 246,
 		WC_TRAINS_LIST, WC_NONE,
-		0,
+		{},
 		_nested_group_widgets
 	},
 	{
 		WDP_AUTO, "list_groups_roadveh", 460, 246,
 		WC_ROADVEH_LIST, WC_NONE,
-		0,
+		{},
 		_nested_group_widgets
 	},
 	{
 		WDP_AUTO, "list_groups_ship", 460, 246,
 		WC_SHIPS_LIST, WC_NONE,
-		0,
+		{},
 		_nested_group_widgets
 	},
 	{
 		WDP_AUTO, "list_groups_aircraft", 460, 246,
 		WC_AIRCRAFT_LIST, WC_NONE,
-		0,
+		{},
 		_nested_group_widgets
 	},
 };
diff --git a/src/help_gui.cpp b/src/help_gui.cpp
index 55c5ed95f8..b86019569c 100644
--- a/src/help_gui.cpp
+++ b/src/help_gui.cpp
@@ -193,7 +193,7 @@ static constexpr NWidgetPart _nested_helpwin_widgets[] = {
 static WindowDesc _helpwin_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_HELPWIN, WC_NONE,
-	0,
+	{},
 	_nested_helpwin_widgets
 );
 
diff --git a/src/highscore_gui.cpp b/src/highscore_gui.cpp
index 20af68715b..417f2a849f 100644
--- a/src/highscore_gui.cpp
+++ b/src/highscore_gui.cpp
@@ -217,14 +217,14 @@ static constexpr NWidgetPart _nested_highscore_widgets[] = {
 static WindowDesc _highscore_desc(
 	WDP_MANUAL, nullptr, 0, 0,
 	WC_HIGHSCORE, WC_NONE,
-	0,
+	{},
 	_nested_highscore_widgets
 );
 
 static WindowDesc _endgame_desc(
 	WDP_MANUAL, nullptr, 0, 0,
 	WC_ENDSCREEN, WC_NONE,
-	0,
+	{},
 	_nested_highscore_widgets
 );
 
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index b859d6a06c..0416cc3efc 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -299,7 +299,7 @@ static constexpr NWidgetPart _nested_build_industry_widgets[] = {
 static WindowDesc _build_industry_desc(
 	WDP_AUTO, "build_industry", 170, 212,
 	WC_BUILD_INDUSTRY, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_industry_widgets
 );
 
@@ -1241,7 +1241,7 @@ static constexpr NWidgetPart _nested_industry_view_widgets[] = {
 static WindowDesc _industry_view_desc(
 	WDP_AUTO, "view_industry", 260, 120,
 	WC_INDUSTRY_VIEW, WC_NONE,
-	0,
+	{},
 	_nested_industry_view_widgets
 );
 
@@ -1942,7 +1942,7 @@ CargoType IndustryDirectoryWindow::produced_cargo_filter = CargoFilterCriteria::
 static WindowDesc _industry_directory_desc(
 	WDP_AUTO, "list_industries", 428, 190,
 	WC_INDUSTRY_DIRECTORY, WC_NONE,
-	0,
+	{},
 	_nested_industry_directory_widgets,
 	&IndustryDirectoryWindow::hotkeys
 );
@@ -1981,7 +1981,7 @@ static constexpr NWidgetPart _nested_industry_cargoes_widgets[] = {
 static WindowDesc _industry_cargoes_desc(
 	WDP_AUTO, "industry_cargoes", 300, 210,
 	WC_INDUSTRY_CARGOES, WC_NONE,
-	0,
+	{},
 	_nested_industry_cargoes_widgets
 );
 
diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp
index 3fa388327b..54989a71b8 100644
--- a/src/intro_gui.cpp
+++ b/src/intro_gui.cpp
@@ -459,7 +459,7 @@ static constexpr NWidgetPart _nested_select_game_widgets[] = {
 static WindowDesc _select_game_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_SELECT_GAME, WC_NONE,
-	WDF_NO_CLOSE,
+	WindowDefaultFlag::NoClose,
 	_nested_select_game_widgets
 );
 
diff --git a/src/league_gui.cpp b/src/league_gui.cpp
index c6b5daf32a..5841211758 100644
--- a/src/league_gui.cpp
+++ b/src/league_gui.cpp
@@ -203,7 +203,7 @@ static constexpr NWidgetPart _nested_performance_league_widgets[] = {
 static WindowDesc _performance_league_desc(
 	WDP_AUTO, "performance_league", 0, 0,
 	WC_COMPANY_LEAGUE, WC_NONE,
-	0,
+	{},
 	_nested_performance_league_widgets
 );
 
@@ -438,7 +438,7 @@ static constexpr NWidgetPart _nested_script_league_widgets[] = {
 static WindowDesc _script_league_desc(
 	WDP_AUTO, "script_league", 0, 0,
 	WC_COMPANY_LEAGUE, WC_NONE,
-	0,
+	{},
 	_nested_script_league_widgets
 );
 
diff --git a/src/linkgraph/linkgraph_gui.cpp b/src/linkgraph/linkgraph_gui.cpp
index 8c1454e8d1..fba5160971 100644
--- a/src/linkgraph/linkgraph_gui.cpp
+++ b/src/linkgraph/linkgraph_gui.cpp
@@ -539,7 +539,7 @@ static_assert(WID_LGL_SATURATION_LAST - WID_LGL_SATURATION_FIRST ==
 static WindowDesc _linkgraph_legend_desc(
 	WDP_AUTO, "toolbar_linkgraph", 0, 0,
 	WC_LINKGRAPH_LEGEND, WC_NONE,
-	0,
+	{},
 	_nested_linkgraph_legend_widgets
 );
 
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index f869225e52..0953228b9c 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -521,7 +521,7 @@ struct MainWindow : Window
 static WindowDesc _main_window_desc(
 	WDP_MANUAL, nullptr, 0, 0,
 	WC_MAIN_WINDOW, WC_NONE,
-	WDF_NO_CLOSE,
+	WindowDefaultFlag::NoClose,
 	_nested_main_window_widgets,
 	&MainWindow::hotkeys
 );
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index b6e6058b5d..ab685568cb 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -63,7 +63,7 @@ static constexpr NWidgetPart _nested_land_info_widgets[] = {
 static WindowDesc _land_info_desc(
 	WDP_AUTO, nullptr, 0, 0,
 	WC_LAND_INFO, WC_NONE,
-	0,
+	{},
 	_nested_land_info_widgets
 );
 
@@ -381,7 +381,7 @@ static constexpr NWidgetPart _nested_about_widgets[] = {
 static WindowDesc _about_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_GAME_OPTIONS, WC_NONE,
-	0,
+	{},
 	_nested_about_widgets
 );
 
@@ -640,7 +640,7 @@ static constexpr NWidgetPart _nested_tooltips_widgets[] = {
 static WindowDesc _tool_tips_desc(
 	WDP_MANUAL, nullptr, 0, 0, // Coordinates and sizes are not used,
 	WC_TOOLTIPS, WC_NONE,
-	WDF_NO_FOCUS | WDF_NO_CLOSE,
+	{WindowDefaultFlag::NoFocus, WindowDefaultFlag::NoClose},
 	_nested_tooltips_widgets
 );
 
@@ -1043,7 +1043,7 @@ static constexpr NWidgetPart _nested_query_string_widgets[] = {
 static WindowDesc _query_string_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_QUERY_STRING, WC_NONE,
-	0,
+	{},
 	_nested_query_string_widgets
 );
 
@@ -1186,7 +1186,7 @@ static constexpr NWidgetPart _nested_query_widgets[] = {
 static WindowDesc _query_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_CONFIRM_POPUP_QUERY, WC_NONE,
-	WDF_MODAL,
+	WindowDefaultFlag::Modal,
 	_nested_query_widgets
 );
 
diff --git a/src/music_gui.cpp b/src/music_gui.cpp
index c1d01ddc35..9da2ed0ace 100644
--- a/src/music_gui.cpp
+++ b/src/music_gui.cpp
@@ -670,7 +670,7 @@ static constexpr NWidgetPart _nested_music_track_selection_widgets[] = {
 static WindowDesc _music_track_selection_desc(
 	WDP_AUTO, nullptr, 0, 0,
 	WC_MUSIC_TRACK_SELECTION, WC_NONE,
-	0,
+	{},
 	_nested_music_track_selection_widgets
 );
 
@@ -929,7 +929,7 @@ static constexpr NWidgetPart _nested_music_window_widgets[] = {
 static WindowDesc _music_window_desc(
 	WDP_AUTO, "music", 0, 0,
 	WC_MUSIC_WINDOW, WC_NONE,
-	0,
+	{},
 	_nested_music_window_widgets
 );
 
diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp
index c6711776ad..5ed500e36f 100644
--- a/src/network/network_chat_gui.cpp
+++ b/src/network/network_chat_gui.cpp
@@ -432,7 +432,7 @@ static constexpr NWidgetPart _nested_chat_window_widgets[] = {
 static WindowDesc _chat_window_desc(
 	WDP_MANUAL, nullptr, 0, 0,
 	WC_SEND_NETWORK_MSG, WC_NONE,
-	0,
+	{},
 	_nested_chat_window_widgets
 );
 
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index 9fcf6f5017..f55ee420a8 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -97,7 +97,7 @@ static constexpr NWidgetPart _nested_network_content_download_status_window_widg
 static WindowDesc _network_content_download_status_window_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_NETWORK_STATUS_WINDOW, WC_NONE,
-	WDF_MODAL,
+	WindowDefaultFlag::Modal,
 	_nested_network_content_download_status_window_widgets
 );
 
@@ -1116,7 +1116,7 @@ static constexpr NWidgetPart _nested_network_content_list_widgets[] = {
 static WindowDesc _network_content_list_desc(
 	WDP_CENTER, "list_content", 630, 460,
 	WC_NETWORK_WINDOW, WC_NONE,
-	0,
+	{},
 	_nested_network_content_list_widgets
 );
 
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 5d9befeef2..72aa8e99e2 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -964,7 +964,7 @@ static constexpr NWidgetPart _nested_network_game_widgets[] = {
 static WindowDesc _network_game_window_desc(
 	WDP_CENTER, "list_servers", 1000, 730,
 	WC_NETWORK_WINDOW, WC_NONE,
-	0,
+	{},
 	_nested_network_game_widgets
 );
 
@@ -1231,7 +1231,7 @@ static constexpr NWidgetPart _nested_network_start_server_window_widgets[] = {
 static WindowDesc _network_start_server_window_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_NETWORK_WINDOW, WC_NONE,
-	0,
+	{},
 	_nested_network_start_server_window_widgets
 );
 
@@ -1305,7 +1305,7 @@ static constexpr NWidgetPart _nested_client_list_widgets[] = {
 static WindowDesc _client_list_desc(
 	WDP_AUTO, "list_clients", 220, 300,
 	WC_CLIENT_LIST, WC_NONE,
-	0,
+	{},
 	_nested_client_list_widgets
 );
 
@@ -2200,7 +2200,7 @@ static constexpr NWidgetPart _nested_network_join_status_window_widgets[] = {
 static WindowDesc _network_join_status_window_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_NETWORK_STATUS_WINDOW, WC_NONE,
-	WDF_MODAL,
+	WindowDefaultFlag::Modal,
 	_nested_network_join_status_window_widgets
 );
 
@@ -2317,7 +2317,7 @@ static constexpr NWidgetPart _nested_network_ask_relay_widgets[] = {
 static WindowDesc _network_ask_relay_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_NETWORK_ASK_RELAY, WC_NONE,
-	WDF_MODAL,
+	WindowDefaultFlag::Modal,
 	_nested_network_ask_relay_widgets
 );
 
@@ -2415,7 +2415,7 @@ static constexpr NWidgetPart _nested_network_ask_survey_widgets[] = {
 static WindowDesc _network_ask_survey_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_NETWORK_ASK_SURVEY, WC_NONE,
-	WDF_MODAL,
+	WindowDefaultFlag::Modal,
 	_nested_network_ask_survey_widgets
 );
 
diff --git a/src/newgrf_debug_gui.cpp b/src/newgrf_debug_gui.cpp
index 43826b230b..b063eb5a5e 100644
--- a/src/newgrf_debug_gui.cpp
+++ b/src/newgrf_debug_gui.cpp
@@ -672,14 +672,14 @@ static constexpr NWidgetPart _nested_newgrf_inspect_widgets[] = {
 static WindowDesc _newgrf_inspect_chain_desc(
 	WDP_AUTO, "newgrf_inspect_chain", 400, 300,
 	WC_NEWGRF_INSPECT, WC_NONE,
-	0,
+	{},
 	_nested_newgrf_inspect_chain_widgets
 );
 
 static WindowDesc _newgrf_inspect_desc(
 	WDP_AUTO, "newgrf_inspect", 400, 300,
 	WC_NEWGRF_INSPECT, WC_NONE,
-	0,
+	{},
 	_nested_newgrf_inspect_widgets
 );
 
@@ -1203,7 +1203,7 @@ static constexpr NWidgetPart _nested_sprite_aligner_widgets[] = {
 static WindowDesc _sprite_aligner_desc(
 	WDP_AUTO, "sprite_aligner", 400, 300,
 	WC_SPRITE_ALIGNER, WC_NONE,
-	0,
+	{},
 	_nested_sprite_aligner_widgets
 );
 
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index 77afeb08ab..f72cae6c37 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -541,7 +541,7 @@ static constexpr NWidgetPart _nested_newgrf_parameter_widgets[] = {
 static WindowDesc _newgrf_parameters_desc(
 	WDP_CENTER, "settings_newgrf_config", 500, 208,
 	WC_GRF_PARAMETERS, WC_NONE,
-	0,
+	{},
 	_nested_newgrf_parameter_widgets
 );
 
@@ -1965,7 +1965,7 @@ static constexpr NWidgetPart _nested_newgrf_widgets[] = {
 static WindowDesc _newgrf_desc(
 	WDP_CENTER, "settings_newgrf", 300, 263,
 	WC_GAME_OPTIONS, WC_NONE,
-	0,
+	{},
 	_nested_newgrf_widgets
 );
 
@@ -2049,7 +2049,7 @@ static constexpr NWidgetPart _nested_save_preset_widgets[] = {
 static WindowDesc _save_preset_desc(
 	WDP_CENTER, "save_preset", 140, 110,
 	WC_SAVE_PRESET, WC_GAME_OPTIONS,
-	WDF_MODAL,
+	WindowDefaultFlag::Modal,
 	_nested_save_preset_widgets
 );
 
@@ -2194,7 +2194,7 @@ static constexpr NWidgetPart _nested_scan_progress_widgets[] = {
 static WindowDesc _scan_progress_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_MODAL_PROGRESS, WC_NONE,
-	0,
+	{},
 	_nested_scan_progress_widgets
 );
 
diff --git a/src/news_gui.cpp b/src/news_gui.cpp
index 75551bec72..bef04fe83a 100644
--- a/src/news_gui.cpp
+++ b/src/news_gui.cpp
@@ -126,7 +126,7 @@ static constexpr NWidgetPart _nested_normal_news_widgets[] = {
 static WindowDesc _normal_news_desc(
 	WDP_MANUAL, nullptr, 0, 0,
 	WC_NEWS_WINDOW, WC_NONE,
-	0,
+	{},
 	_nested_normal_news_widgets
 );
 
@@ -173,7 +173,7 @@ static constexpr NWidgetPart _nested_vehicle_news_widgets[] = {
 static WindowDesc _vehicle_news_desc(
 	WDP_MANUAL, nullptr, 0, 0,
 	WC_NEWS_WINDOW, WC_NONE,
-	0,
+	{},
 	_nested_vehicle_news_widgets
 );
 
@@ -217,7 +217,7 @@ static constexpr NWidgetPart _nested_company_news_widgets[] = {
 static WindowDesc _company_news_desc(
 	WDP_MANUAL, nullptr, 0, 0,
 	WC_NEWS_WINDOW, WC_NONE,
-	0,
+	{},
 	_nested_company_news_widgets
 );
 
@@ -251,7 +251,7 @@ static constexpr NWidgetPart _nested_thin_news_widgets[] = {
 static WindowDesc _thin_news_desc(
 	WDP_MANUAL, nullptr, 0, 0,
 	WC_NEWS_WINDOW, WC_NONE,
-	0,
+	{},
 	_nested_thin_news_widgets
 );
 
@@ -286,7 +286,7 @@ static constexpr NWidgetPart _nested_small_news_widgets[] = {
 static WindowDesc _small_news_desc(
 	WDP_MANUAL, nullptr, 0, 0,
 	WC_NEWS_WINDOW, WC_NONE,
-	0,
+	{},
 	_nested_small_news_widgets
 );
 
@@ -1270,7 +1270,7 @@ static constexpr NWidgetPart _nested_message_history[] = {
 static WindowDesc _message_history_desc(
 	WDP_AUTO, "list_news", 400, 140,
 	WC_MESSAGE_HISTORY, WC_NONE,
-	0,
+	{},
 	_nested_message_history
 );
 
diff --git a/src/object_gui.cpp b/src/object_gui.cpp
index c48c332e8c..d2fa46ff4e 100644
--- a/src/object_gui.cpp
+++ b/src/object_gui.cpp
@@ -400,7 +400,7 @@ static constexpr NWidgetPart _nested_build_object_widgets[] = {
 static WindowDesc _build_object_desc(
 	WDP_AUTO, "build_object", 0, 0,
 	WC_BUILD_OBJECT, WC_BUILD_TOOLBAR,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_object_widgets,
 	&BuildObjectWindow::hotkeys
 );
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 3f9e39388f..c0091ae110 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -1685,7 +1685,7 @@ static constexpr NWidgetPart _nested_orders_train_widgets[] = {
 static WindowDesc _orders_train_desc(
 	WDP_AUTO, "view_vehicle_orders_train", 384, 100,
 	WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_orders_train_widgets,
 	&OrdersWindow::hotkeys
 );
@@ -1758,7 +1758,7 @@ static constexpr NWidgetPart _nested_orders_widgets[] = {
 static WindowDesc _orders_desc(
 	WDP_AUTO, "view_vehicle_orders", 384, 100,
 	WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_orders_widgets,
 	&OrdersWindow::hotkeys
 );
@@ -1785,7 +1785,7 @@ static constexpr NWidgetPart _nested_other_orders_widgets[] = {
 static WindowDesc _other_orders_desc(
 	WDP_AUTO, "view_vehicle_orders_competitor", 384, 86,
 	WC_VEHICLE_ORDERS, WC_VEHICLE_VIEW,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_other_orders_widgets,
 	&OrdersWindow::hotkeys
 );
diff --git a/src/osk_gui.cpp b/src/osk_gui.cpp
index feda688263..7769b8fa1a 100644
--- a/src/osk_gui.cpp
+++ b/src/osk_gui.cpp
@@ -338,7 +338,7 @@ static constexpr NWidgetPart _nested_osk_widgets[] = {
 static WindowDesc _osk_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_OSK, WC_NONE,
-	0,
+	{},
 	_nested_osk_widgets
 );
 
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index 42360c4dfc..52150d300f 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -901,7 +901,7 @@ static constexpr NWidgetPart _nested_build_rail_widgets[] = {
 static WindowDesc _build_rail_desc(
 	WDP_ALIGN_TOOLBAR, "toolbar_rail", 0, 0,
 	WC_BUILD_TOOLBAR, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_rail_widgets,
 	&BuildRailToolbarWindow::hotkeys
 );
@@ -1430,7 +1430,7 @@ static constexpr NWidgetPart _nested_station_builder_widgets[] = {
 static WindowDesc _station_builder_desc(
 	WDP_AUTO, "build_station_rail", 0, 0,
 	WC_BUILD_STATION, WC_BUILD_TOOLBAR,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_station_builder_widgets,
 	&BuildRailStationWindow::hotkeys
 );
@@ -1686,7 +1686,7 @@ static constexpr NWidgetPart _nested_signal_builder_widgets[] = {
 static WindowDesc _signal_builder_desc(
 	WDP_AUTO, nullptr, 0, 0,
 	WC_BUILD_SIGNAL, WC_BUILD_TOOLBAR,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_signal_builder_widgets
 );
 
@@ -1767,7 +1767,7 @@ static constexpr NWidgetPart _nested_build_depot_widgets[] = {
 static WindowDesc _build_depot_desc(
 	WDP_AUTO, nullptr, 0, 0,
 	WC_BUILD_DEPOT, WC_BUILD_TOOLBAR,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_depot_widgets
 );
 
@@ -1878,7 +1878,7 @@ static constexpr NWidgetPart _nested_build_waypoint_widgets[] = {
 static WindowDesc _build_waypoint_desc(
 	WDP_AUTO, "build_waypoint", 0, 0,
 	WC_BUILD_WAYPOINT, WC_BUILD_TOOLBAR,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_waypoint_widgets,
 	&BuildRailWaypointWindow::hotkeys
 );
diff --git a/src/road_gui.cpp b/src/road_gui.cpp
index f63f15a159..0403bb5400 100644
--- a/src/road_gui.cpp
+++ b/src/road_gui.cpp
@@ -940,7 +940,7 @@ static constexpr NWidgetPart _nested_build_road_widgets[] = {
 static WindowDesc _build_road_desc(
 	WDP_ALIGN_TOOLBAR, "toolbar_road", 0, 0,
 	WC_BUILD_TOOLBAR, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_road_widgets,
 	&BuildRoadToolbarWindow::road_hotkeys
 );
@@ -983,7 +983,7 @@ static constexpr NWidgetPart _nested_build_tramway_widgets[] = {
 static WindowDesc _build_tramway_desc(
 	WDP_ALIGN_TOOLBAR, "toolbar_tramway", 0, 0,
 	WC_BUILD_TOOLBAR, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_tramway_widgets,
 	&BuildRoadToolbarWindow::tram_hotkeys
 );
@@ -1038,7 +1038,7 @@ static constexpr NWidgetPart _nested_build_road_scen_widgets[] = {
 static WindowDesc _build_road_scen_desc(
 	WDP_AUTO, "toolbar_road_scen", 0, 0,
 	WC_SCEN_BUILD_TOOLBAR, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_road_scen_widgets,
 	&BuildRoadToolbarWindow::road_hotkeys
 );
@@ -1073,7 +1073,7 @@ static constexpr NWidgetPart _nested_build_tramway_scen_widgets[] = {
 static WindowDesc _build_tramway_scen_desc(
 	WDP_AUTO, "toolbar_tram_scen", 0, 0,
 	WC_SCEN_BUILD_TOOLBAR, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_tramway_scen_widgets,
 	&BuildRoadToolbarWindow::tram_hotkeys
 );
@@ -1170,7 +1170,7 @@ static constexpr NWidgetPart _nested_build_road_depot_widgets[] = {
 static WindowDesc _build_road_depot_desc(
 	WDP_AUTO, nullptr, 0, 0,
 	WC_BUILD_DEPOT, WC_BUILD_TOOLBAR,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_road_depot_widgets
 );
 
@@ -1548,7 +1548,7 @@ static constexpr NWidgetPart _nested_road_station_picker_widgets[] = {
 static WindowDesc _road_station_picker_desc(
 	WDP_AUTO, "build_station_road", 0, 0,
 	WC_BUS_STATION, WC_BUILD_TOOLBAR,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_road_station_picker_widgets,
 	&BuildRoadStationWindow::road_hotkeys
 );
@@ -1588,7 +1588,7 @@ static constexpr NWidgetPart _nested_tram_station_picker_widgets[] = {
 static WindowDesc _tram_station_picker_desc(
 	WDP_AUTO, "build_station_tram", 0, 0,
 	WC_BUS_STATION, WC_BUILD_TOOLBAR,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_tram_station_picker_widgets,
 	&BuildRoadStationWindow::tram_hotkeys
 );
@@ -1701,7 +1701,7 @@ static constexpr NWidgetPart _nested_build_road_waypoint_widgets[] = {
 static WindowDesc _build_road_waypoint_desc(
 	WDP_AUTO, "build_road_waypoint", 0, 0,
 	WC_BUILD_WAYPOINT, WC_BUILD_TOOLBAR,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_road_waypoint_widgets,
 	&BuildRoadWaypointWindow::hotkeys
 );
diff --git a/src/screenshot_gui.cpp b/src/screenshot_gui.cpp
index f6111621f4..ab56668a88 100644
--- a/src/screenshot_gui.cpp
+++ b/src/screenshot_gui.cpp
@@ -67,7 +67,7 @@ static constexpr NWidgetPart _nested_screenshot[] = {
 static WindowDesc _screenshot_window_desc(
 	WDP_AUTO, "take_a_screenshot", 200, 100,
 	WC_SCREENSHOT, WC_NONE,
-	0,
+	{},
 	_nested_screenshot
 );
 
diff --git a/src/script/script_gui.cpp b/src/script/script_gui.cpp
index c05d3df1f5..71b262fd64 100644
--- a/src/script/script_gui.cpp
+++ b/src/script/script_gui.cpp
@@ -265,7 +265,7 @@ static constexpr NWidgetPart _nested_script_list_widgets[] = {
 static WindowDesc _script_list_desc(
 	WDP_CENTER, "settings_script_list", 200, 234,
 	WC_SCRIPT_LIST, WC_NONE,
-	0,
+	{},
 	_nested_script_list_widgets
 );
 
@@ -608,7 +608,7 @@ static constexpr NWidgetPart _nested_script_settings_widgets[] = {
 static WindowDesc _script_settings_desc(
 	WDP_CENTER, "settings_script", 500, 208,
 	WC_SCRIPT_SETTINGS, WC_NONE,
-	0,
+	{},
 	_nested_script_settings_widgets
 );
 
@@ -1290,7 +1290,7 @@ EndContainer(),
 static WindowDesc _script_debug_desc(
 	WDP_AUTO, "script_debug", 600, 450,
 	WC_SCRIPT_DEBUG, WC_NONE,
-	0,
+	{},
 	_nested_script_debug_widgets,
 	&ScriptDebugWindow::hotkeys
 );
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index c36c727948..8e2cb27847 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -1192,7 +1192,7 @@ static constexpr NWidgetPart _nested_game_options_widgets[] = {
 static WindowDesc _game_options_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_GAME_OPTIONS, WC_NONE,
-	0,
+	{},
 	_nested_game_options_widgets
 );
 
@@ -2902,7 +2902,7 @@ static constexpr NWidgetPart _nested_settings_selection_widgets[] = {
 static WindowDesc _settings_selection_desc(
 	WDP_CENTER, "settings", 510, 450,
 	WC_GAME_OPTIONS, WC_NONE,
-	0,
+	{},
 	_nested_settings_selection_widgets
 );
 
@@ -3210,7 +3210,7 @@ static constexpr NWidgetPart _nested_cust_currency_widgets[] = {
 static WindowDesc _cust_currency_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_CUSTOM_CURRENCY, WC_NONE,
-	0,
+	{},
 	_nested_cust_currency_widgets
 );
 
diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp
index 2f7eb4a720..574d42bbc3 100644
--- a/src/signs_gui.cpp
+++ b/src/signs_gui.cpp
@@ -379,7 +379,7 @@ static constexpr NWidgetPart _nested_sign_list_widgets[] = {
 static WindowDesc _sign_list_desc(
 	WDP_AUTO, "list_signs", 358, 138,
 	WC_SIGN_LIST, WC_NONE,
-	0,
+	{},
 	_nested_sign_list_widgets,
 	&SignListWindow::hotkeys
 );
@@ -545,7 +545,7 @@ static constexpr NWidgetPart _nested_query_sign_edit_widgets[] = {
 static WindowDesc _query_sign_edit_desc(
 	WDP_CENTER, nullptr, 0, 0,
 	WC_QUERY_STRING, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_query_sign_edit_widgets
 );
 
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp
index 8e736c3c8c..94162a8bfd 100644
--- a/src/smallmap_gui.cpp
+++ b/src/smallmap_gui.cpp
@@ -2054,7 +2054,7 @@ static constexpr NWidgetPart _nested_smallmap_widgets[] = {
 static WindowDesc _smallmap_desc(
 	WDP_AUTO, "smallmap", 484, 314,
 	WC_SMALLMAP, WC_NONE,
-	0,
+	{},
 	_nested_smallmap_widgets
 );
 
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index eb63bb0f96..89d1b6d6d7 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -802,7 +802,7 @@ static constexpr NWidgetPart _nested_company_stations_widgets[] = {
 static WindowDesc _company_stations_desc(
 	WDP_AUTO, "list_stations", 358, 162,
 	WC_STATION_LIST, WC_NONE,
-	0,
+	{},
 	_nested_company_stations_widgets
 );
 
@@ -2175,7 +2175,7 @@ struct StationViewWindow : public Window {
 static WindowDesc _station_view_desc(
 	WDP_AUTO, "view_station", 249, 117,
 	WC_STATION_VIEW, WC_NONE,
-	0,
+	{},
 	_nested_station_view_widgets
 );
 
@@ -2433,7 +2433,7 @@ struct SelectStationWindow : Window {
 static WindowDesc _select_station_desc(
 	WDP_AUTO, "build_station_join", 200, 180,
 	WC_SELECT_STATION, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_select_station_widgets
 );
 
diff --git a/src/statusbar_gui.cpp b/src/statusbar_gui.cpp
index 2562afbc72..0da5c27794 100644
--- a/src/statusbar_gui.cpp
+++ b/src/statusbar_gui.cpp
@@ -231,7 +231,7 @@ static constexpr NWidgetPart _nested_main_status_widgets[] = {
 static WindowDesc _main_status_desc(
 	WDP_MANUAL, nullptr, 0, 0,
 	WC_STATUS_BAR, WC_NONE,
-	WDF_NO_FOCUS | WDF_NO_CLOSE,
+	{WindowDefaultFlag::NoFocus, WindowDefaultFlag::NoClose},
 	_nested_main_status_widgets
 );
 
diff --git a/src/story_gui.cpp b/src/story_gui.cpp
index 2d9b45a2d6..89761aabcb 100644
--- a/src/story_gui.cpp
+++ b/src/story_gui.cpp
@@ -969,14 +969,14 @@ static constexpr NWidgetPart _nested_story_book_widgets[] = {
 static WindowDesc _story_book_desc(
 	WDP_AUTO, "view_story", 400, 300,
 	WC_STORY_BOOK, WC_NONE,
-	0,
+	{},
 	_nested_story_book_widgets
 );
 
 static WindowDesc _story_book_gs_desc(
 	WDP_CENTER, "view_story_gs", 400, 300,
 	WC_STORY_BOOK, WC_NONE,
-	0,
+	{},
 	_nested_story_book_widgets
 );
 
diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp
index e884332ec9..ea8be3a14e 100644
--- a/src/subsidy_gui.cpp
+++ b/src/subsidy_gui.cpp
@@ -270,7 +270,7 @@ static constexpr NWidgetPart _nested_subsidies_list_widgets[] = {
 static WindowDesc _subsidies_list_desc(
 	WDP_AUTO, "list_subsidies", 500, 127,
 	WC_SUBSIDIES_LIST, WC_NONE,
-	0,
+	{},
 	_nested_subsidies_list_widgets
 );
 
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp
index beb31aed1e..21cb3062e3 100644
--- a/src/terraform_gui.cpp
+++ b/src/terraform_gui.cpp
@@ -355,7 +355,7 @@ static constexpr NWidgetPart _nested_terraform_widgets[] = {
 static WindowDesc _terraform_desc(
 	WDP_MANUAL, "toolbar_landscape", 0, 0,
 	WC_SCEN_LAND_GEN, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_terraform_widgets,
 	&TerraformToolbarWindow::hotkeys
 );
@@ -739,7 +739,7 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
 static WindowDesc _scen_edit_land_gen_desc(
 	WDP_AUTO, "toolbar_landscape_scen", 0, 0,
 	WC_SCEN_LAND_GEN, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_scen_edit_land_gen_widgets,
 	&ScenarioEditorLandscapeGenerationWindow::hotkeys
 );
diff --git a/src/textfile_gui.cpp b/src/textfile_gui.cpp
index ba9c455c87..6a9d70ffa8 100644
--- a/src/textfile_gui.cpp
+++ b/src/textfile_gui.cpp
@@ -78,7 +78,7 @@ static constexpr NWidgetPart _nested_textfile_widgets[] = {
 static WindowDesc _textfile_desc(
 	WDP_CENTER, "textfile", 630, 460,
 	WC_TEXTFILE, WC_NONE,
-	0,
+	{},
 	_nested_textfile_widgets
 );
 
diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp
index 7d5cb2ad39..d622eae17c 100644
--- a/src/timetable_gui.cpp
+++ b/src/timetable_gui.cpp
@@ -861,7 +861,7 @@ static constexpr NWidgetPart _nested_timetable_widgets[] = {
 static WindowDesc _timetable_desc(
 	WDP_AUTO, "view_vehicle_timetable", 400, 130,
 	WC_VEHICLE_TIMETABLE, WC_VEHICLE_VIEW,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_timetable_widgets
 );
 
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp
index 4c81eb9075..0ee17fb047 100644
--- a/src/toolbar_gui.cpp
+++ b/src/toolbar_gui.cpp
@@ -2240,7 +2240,7 @@ static constexpr NWidgetPart _nested_toolbar_normal_widgets[] = {
 static WindowDesc _toolb_normal_desc(
 	WDP_MANUAL, nullptr, 0, 0,
 	WC_MAIN_TOOLBAR, WC_NONE,
-	WDF_NO_FOCUS | WDF_NO_CLOSE,
+	{WindowDefaultFlag::NoFocus, WindowDefaultFlag::NoClose},
 	_nested_toolbar_normal_widgets,
 	&MainToolbarWindow::hotkeys
 );
@@ -2580,7 +2580,7 @@ static constexpr NWidgetPart _nested_toolb_scen_widgets[] = {
 static WindowDesc _toolb_scen_desc(
 	WDP_MANUAL, nullptr, 0, 0,
 	WC_MAIN_TOOLBAR, WC_NONE,
-	WDF_NO_FOCUS | WDF_NO_CLOSE,
+	{WindowDefaultFlag::NoFocus, WindowDefaultFlag::NoClose},
 	_nested_toolb_scen_widgets,
 	&ScenarioEditorToolbarWindow::hotkeys
 );
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index 732a1359a9..515e8bf941 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -350,7 +350,7 @@ public:
 static WindowDesc _town_authority_desc(
 	WDP_AUTO, "view_town_authority", 317, 222,
 	WC_TOWN_AUTHORITY, WC_NONE,
-	0,
+	{},
 	_nested_town_authority_widgets
 );
 
@@ -651,7 +651,7 @@ static constexpr NWidgetPart _nested_town_game_view_widgets[] = {
 static WindowDesc _town_game_view_desc(
 	WDP_AUTO, "view_town", 260, TownViewWindow::WID_TV_HEIGHT_NORMAL,
 	WC_TOWN_VIEW, WC_NONE,
-	0,
+	{},
 	_nested_town_game_view_widgets
 );
 
@@ -682,7 +682,7 @@ static constexpr NWidgetPart _nested_town_editor_view_widgets[] = {
 static WindowDesc _town_editor_view_desc(
 	WDP_AUTO, "view_town_scen", 260, TownViewWindow::WID_TV_HEIGHT_NORMAL,
 	WC_TOWN_VIEW, WC_NONE,
-	0,
+	{},
 	_nested_town_editor_view_widgets
 );
 
@@ -1076,7 +1076,7 @@ const std::initializer_list<GUITownList::SortFunction * const> TownDirectoryWind
 static WindowDesc _town_directory_desc(
 	WDP_AUTO, "list_towns", 208, 202,
 	WC_TOWN_DIRECTORY, WC_NONE,
-	0,
+	{},
 	_nested_town_directory_widgets,
 	&TownDirectoryWindow::hotkeys
 );
@@ -1341,7 +1341,7 @@ public:
 static WindowDesc _found_town_desc(
 	WDP_AUTO, "build_town", 160, 162,
 	WC_FOUND_TOWN, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_found_town_widgets
 );
 
@@ -1779,7 +1779,7 @@ static constexpr NWidgetPart _nested_build_house_widgets[] = {
 static WindowDesc _build_house_desc(
 	WDP_AUTO, "build_house", 0, 0,
 	WC_BUILD_HOUSE, WC_BUILD_TOOLBAR,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_house_widgets,
 	&BuildHouseWindow::hotkeys
 );
diff --git a/src/transparency_gui.cpp b/src/transparency_gui.cpp
index 256a4e7e1a..31cd44812e 100644
--- a/src/transparency_gui.cpp
+++ b/src/transparency_gui.cpp
@@ -152,7 +152,7 @@ static constexpr NWidgetPart _nested_transparency_widgets[] = {
 static WindowDesc _transparency_desc(
 	WDP_MANUAL, "toolbar_transparency", 0, 0,
 	WC_TRANSPARENCY_TOOLBAR, WC_NONE,
-	0,
+	{},
 	_nested_transparency_widgets
 );
 
diff --git a/src/tree_gui.cpp b/src/tree_gui.cpp
index 3b6f6b811a..74c2842d22 100644
--- a/src/tree_gui.cpp
+++ b/src/tree_gui.cpp
@@ -313,7 +313,7 @@ static constexpr NWidgetPart _nested_build_trees_widgets[] = {
 static WindowDesc _build_trees_desc(
 	WDP_AUTO, "build_tree", 0, 0,
 	WC_BUILD_TREES, WC_NONE,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_build_trees_widgets
 );
 
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index 8f429a3846..d71d3e2414 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -1354,7 +1354,7 @@ static constexpr NWidgetPart _nested_vehicle_refit_widgets[] = {
 static WindowDesc _vehicle_refit_desc(
 	WDP_AUTO, "view_vehicle_refit", 240, 174,
 	WC_VEHICLE_REFIT, WC_VEHICLE_VIEW,
-	WDF_CONSTRUCTION,
+	WindowDefaultFlag::Construction,
 	_nested_vehicle_refit_widgets
 );
 
@@ -2304,25 +2304,25 @@ static WindowDesc _vehicle_list_desc[] = {
 	{
 		WDP_AUTO, "list_vehicles_train", 325, 246,
 		WC_TRAINS_LIST, WC_NONE,
-		0,
+		{},
 		_nested_vehicle_list
 	},
 	{
 		WDP_AUTO, "list_vehicles_roadveh", 260, 246,
 		WC_INVALID, WC_NONE,
-		0,
+		{},
 		_nested_vehicle_list
 	},
 	{
 		WDP_AUTO, "list_vehicles_ship", 260, 246,
 		WC_INVALID, WC_NONE,
-		0,
+		{},
 		_nested_vehicle_list
 	},
 	{
 		WDP_AUTO, "list_vehicles_aircraft", 260, 246,
 		WC_INVALID, WC_NONE,
-		0,
+		{},
 		_nested_vehicle_list
 	}
 };
@@ -2874,7 +2874,7 @@ struct VehicleDetailsWindow : Window {
 static WindowDesc _train_vehicle_details_desc(
 	WDP_AUTO, "view_vehicle_details_train", 405, 178,
 	WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW,
-	0,
+	{},
 	_nested_train_vehicle_details_widgets
 );
 
@@ -2882,7 +2882,7 @@ static WindowDesc _train_vehicle_details_desc(
 static WindowDesc _nontrain_vehicle_details_desc(
 	WDP_AUTO, "view_vehicle_details", 405, 113,
 	WC_VEHICLE_DETAILS, WC_VEHICLE_VIEW,
-	0,
+	{},
 	_nested_nontrain_vehicle_details_widgets
 );
 
@@ -3494,7 +3494,7 @@ public:
 static WindowDesc _vehicle_view_desc(
 	WDP_AUTO, "view_vehicle", 250, 116,
 	WC_VEHICLE_VIEW, WC_NONE,
-	0,
+	{},
 	_nested_vehicle_view_widgets,
 	&VehicleViewWindow::hotkeys
 );
@@ -3506,7 +3506,7 @@ static WindowDesc _vehicle_view_desc(
 static WindowDesc _train_view_desc(
 	WDP_AUTO, "view_vehicle_train", 250, 134,
 	WC_VEHICLE_VIEW, WC_NONE,
-	0,
+	{},
 	_nested_vehicle_view_widgets,
 	&VehicleViewWindow::hotkeys
 );
diff --git a/src/viewport_gui.cpp b/src/viewport_gui.cpp
index 9228c9a0da..a85031412a 100644
--- a/src/viewport_gui.cpp
+++ b/src/viewport_gui.cpp
@@ -145,7 +145,7 @@ public:
 static WindowDesc _extra_viewport_desc(
 	WDP_AUTO, "extra_viewport", 300, 268,
 	WC_EXTRA_VIEWPORT, WC_NONE,
-	0,
+	{},
 	_nested_extra_viewport_widgets
 );
 
diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp
index a697bc7be1..4217368564 100644
--- a/src/waypoint_gui.cpp
+++ b/src/waypoint_gui.cpp
@@ -212,7 +212,7 @@ static constexpr NWidgetPart _nested_waypoint_view_widgets[] = {
 static WindowDesc _waypoint_view_desc(
 	WDP_AUTO, "view_waypoint", 260, 118,
 	WC_WAYPOINT_VIEW, WC_NONE,
-	0,
+	{},
 	_nested_waypoint_view_widgets
 );
 
diff --git a/src/window.cpp b/src/window.cpp
index 3b3ed92a51..ad61dce045 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -103,7 +103,7 @@ std::string _windows_file;
 
 /** Window description constructor. */
 WindowDesc::WindowDesc(WindowPosition def_pos, const char *ini_key, int16_t def_width_trad, int16_t def_height_trad,
-			WindowClass window_class, WindowClass parent_class, uint32_t flags,
+			WindowClass window_class, WindowClass parent_class, WindowDefaultFlags flags,
 			const std::span<const NWidgetPart> nwid_parts, HotkeyList *hotkeys,
 			const std::source_location location) :
 	source_location(location),
@@ -612,7 +612,7 @@ static void DispatchLeftClickEvent(Window *w, int x, int y, int click_count)
 	bool focused_widget_changed = false;
 	/* If clicked on a window that previously did not have focus */
 	if (_focused_window != w &&                 // We already have focus, right?
-			(w->window_desc.flags & WDF_NO_FOCUS) == 0 &&  // Don't lose focus to toolbars
+			!w->window_desc.flags.Test(WindowDefaultFlag::NoFocus) &&  // Don't lose focus to toolbars
 			widget_type != WWT_CLOSEBOX) {          // Don't change focused window if 'X' (close button) was clicked
 		focused_widget_changed = true;
 		SetFocusedWindow(w);
@@ -748,9 +748,9 @@ static void DispatchRightClickEvent(Window *w, int x, int y)
 	}
 
 	/* Right-click close is enabled and there is a closebox. */
-	if (_settings_client.gui.right_click_wnd_close == RCC_YES && (w->window_desc.flags & WDF_NO_CLOSE) == 0) {
+	if (_settings_client.gui.right_click_wnd_close == RCC_YES && !w->window_desc.flags.Test(WindowDefaultFlag::NoClose)) {
 		w->Close();
-	} else if (_settings_client.gui.right_click_wnd_close == RCC_YES_EXCEPT_STICKY && !w->flags.Test(WindowFlag::Sticky) && (w->window_desc.flags & WDF_NO_CLOSE) == 0) {
+	} else if (_settings_client.gui.right_click_wnd_close == RCC_YES_EXCEPT_STICKY && !w->flags.Test(WindowFlag::Sticky) && !w->window_desc.flags.Test(WindowDefaultFlag::NoClose)) {
 		/* Right-click close is enabled, but excluding sticky windows. */
 		w->Close();
 	} else if (_settings_client.gui.hover_delay_ms == 0 && !w->OnTooltip(pt, wid->GetIndex(), TCC_RIGHT_CLICK) && wid->GetToolTip() != STR_NULL) {
@@ -2439,7 +2439,7 @@ static bool MaybeBringWindowToFront(Window *w)
 	for (; !it.IsEnd(); ++it) {
 		Window *u = *it;
 		/* A modal child will prevent the activation of the parent window */
-		if (u->parent == w && (u->window_desc.flags & WDF_MODAL)) {
+		if (u->parent == w && u->window_desc.flags.Test(WindowDefaultFlag::Modal)) {
 			u->SetWhiteBorder();
 			u->SetDirty();
 			return false;
@@ -3260,7 +3260,7 @@ void CloseNonVitalWindows()
 {
 	/* Note: the container remains stable, even when deleting windows. */
 	for (Window *w : Window::Iterate()) {
-		if ((w->window_desc.flags & WDF_NO_CLOSE) == 0 &&
+		if (!w->window_desc.flags.Test(WindowDefaultFlag::NoClose) &&
 				!w->flags.Test(WindowFlag::Sticky)) { // do not delete windows which are 'pinned'
 
 			w->Close();
@@ -3279,7 +3279,7 @@ void CloseAllNonVitalWindows()
 {
 	/* Note: the container remains stable, even when closing windows. */
 	for (Window *w : Window::Iterate()) {
-		if ((w->window_desc.flags & WDF_NO_CLOSE) == 0) {
+		if (!w->window_desc.flags.Test(WindowDefaultFlag::NoClose)) {
 			w->Close();
 		}
 	}
@@ -3304,7 +3304,7 @@ void CloseConstructionWindows()
 {
 	/* Note: the container remains stable, even when deleting windows. */
 	for (Window *w : Window::Iterate()) {
-		if (w->window_desc.flags & WDF_CONSTRUCTION) {
+		if (w->window_desc.flags.Test(WindowDefaultFlag::Construction)) {
 			w->Close();
 		}
 	}
diff --git a/src/window_gui.h b/src/window_gui.h
index 9bfa6026e7..d49a9b7d39 100644
--- a/src/window_gui.h
+++ b/src/window_gui.h
@@ -149,6 +149,17 @@ enum WindowPosition : uint8_t {
 	WDP_ALIGN_TOOLBAR, ///< Align toward the toolbar
 };
 
+/**
+ * Window default widget/window handling flags
+ */
+enum class WindowDefaultFlag : uint8_t {
+	Construction, ///< This window is used for construction; close it whenever changing company.
+	Modal, ///< The window is a modal child of some other window, meaning the parent is 'inactive'
+	NoFocus, ///< This window won't get focus/make any other window lose focus when click
+	NoClose, ///< This window can't be interactively closed
+};
+using WindowDefaultFlags = EnumBitSet<WindowDefaultFlag, uint8_t>;
+
 Point GetToolbarAlignedWindowPosition(int window_width);
 
 struct HotkeyList;
@@ -159,7 +170,7 @@ struct HotkeyList;
 struct WindowDesc {
 
 	WindowDesc(WindowPosition default_pos, const char *ini_key, int16_t def_width_trad, int16_t def_height_trad,
-			WindowClass window_class, WindowClass parent_class, uint32_t flags,
+			WindowClass window_class, WindowClass parent_class, WindowDefaultFlags flags,
 			const std::span<const NWidgetPart> nwid_parts, HotkeyList *hotkeys = nullptr,
 			const std::source_location location = std::source_location::current());
 
@@ -170,7 +181,7 @@ struct WindowDesc {
 	const WindowClass cls; ///< Class of the window, @see WindowClass.
 	const WindowClass parent_cls; ///< Class of the parent window. @see WindowClass
 	const char *ini_key; ///< Key to store window defaults in openttd.cfg. \c nullptr if nothing shall be stored.
-	const uint32_t flags; ///< Flags. @see WindowDefaultFlag
+	const WindowDefaultFlags flags; ///< Flags. @see WindowDefaultFlag
 	const std::span<const NWidgetPart> nwid_parts; ///< Span of nested widget parts describing the window.
 	const HotkeyList *hotkeys; ///< Hotkeys for the window.
 
@@ -196,16 +207,6 @@ private:
 	WindowDesc& operator=(const WindowDesc &) = delete;
 };
 
-/**
- * Window default widget/window handling flags
- */
-enum WindowDefaultFlag : uint8_t {
-	WDF_CONSTRUCTION    =   1 << 0, ///< This window is used for construction; close it whenever changing company.
-	WDF_MODAL           =   1 << 1, ///< The window is a modal child of some other window, meaning the parent is 'inactive'
-	WDF_NO_FOCUS        =   1 << 2, ///< This window won't get focus/make any other window lose focus when click
-	WDF_NO_CLOSE        =   1 << 3, ///< This window can't be interactively closed
-};
-
 /**
  * Data structure for resizing a window
  */