Fix /size: /w: /h: with /monitor: (Fix custom sizes)
Fix weird rectangle by removing checks
*
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
* Copyright 2017 David Fort <contact@hardening-consulting.com>
+ * Copyright 2018 Kai Harms <kharms@rangee.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -281,6 +282,11 @@ BOOL xf_detect_monitors(xfContext* xfc, UINT32* pMaxWidth, UINT32* pMaxHeight)
*pMaxHeight = (xfc->workArea.height * settings->PercentScreen) / 100;
}
}
+ else if (settings->DesktopWidth && settings->DesktopHeight)
+ {
+ *pMaxWidth = settings->DesktopWidth;
+ *pMaxHeight = settings->DesktopHeight;
+ }
if (!settings->Fullscreen && !settings->Workarea && !settings->UseMultimon)
goto out;
