diff --git a/src/process.cpp b/src/process.cpp index b7159fdb..c9ef4975 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -541,8 +541,14 @@ namespace proc { #endif } - // Restore output name to its original value - config::video.output_name = initial_display; + // Load the configured output_name first + // to prevent the value being write to empty when the initial terminate happens + if (proc.initial_display.empty()) { + proc.initial_display = config::video.output_name; + } else { + // Restore output name to its original value + config::video.output_name = initial_display; + } _app_id = -1; display_name.clear(); diff --git a/src/video.cpp b/src/video.cpp index 27e15538..16899aa3 100644 --- a/src/video.cpp +++ b/src/video.cpp @@ -1027,7 +1027,7 @@ namespace video { current_display_index = 0; if (current_display_name.empty()) { - current_display_name = config::video.output_name; + current_display_name = display_device::map_output_name(config::video.output_name); } // If we had a name previously, let's try to find it in the new list