vncserver: fix display :0 being ignored on CLI

This commit is contained in:
Dmitry Maksyoma 2021-10-28 22:56:32 +13:00
parent 8cd49ebbf8
commit 303fde284e

View File

@ -1118,8 +1118,11 @@ sub ParseAndProcessCliOptions {
ParseOptionsAndRemoveMatchesFromARGV(@supportedOptions);
ProcessCliOptions();
CheckGeometryAndDepthAreSensible();
$displayNumber = DetectDisplayNumberFromCliArgs() ||
GetLowestAvailableDisplayNumber();
$displayNumber = DetectDisplayNumberFromCliArgs();
if (!defined($displayNumber)) {
$displayNumber = GetLowestAvailableDisplayNumber();
}
CheckCliOptionsForBeingValid();
}