diff --git a/compositorcontroller.cpp b/compositorcontroller.cpp index 4e52638..9bef703 100644 --- a/compositorcontroller.cpp +++ b/compositorcontroller.cpp @@ -818,7 +818,7 @@ namespace RdkShell } } - bool CompositorController::createDisplay(const std::string& client, const std::string& displayName) + bool CompositorController::createDisplay(const std::string& client, const std::string& displayName, uint32_t displayWidth, uint32_t displayHeight) { std::string clientDisplayName = standardizeName(client); std::string compositorDisplayName = displayName; @@ -840,6 +840,14 @@ namespace RdkShell uint32_t width = 0; uint32_t height = 0; RdkShell::EssosInstance::instance()->resolution(width, height); + if (displayWidth > 0) + { + width = displayWidth; + } + if (displayHeight > 0) + { + height = displayHeight; + } bool ret = compositorInfo.compositor->createDisplay(compositorDisplayName, width, height); if (ret) { diff --git a/compositorcontroller.h b/compositorcontroller.h index b484d3d..ba8c5d8 100644 --- a/compositorcontroller.h +++ b/compositorcontroller.h @@ -62,7 +62,7 @@ namespace RdkShell static bool scaleToFit(const std::string& client, const int32_t x, const int32_t y, const uint32_t width, const uint32_t height); static void onKeyPress(uint32_t keycode, uint32_t flags, uint64_t metadata); static void onKeyRelease(uint32_t keycode, uint32_t flags, uint64_t metadata); - static bool createDisplay(const std::string& client, const std::string& displayName); + static bool createDisplay(const std::string& client, const std::string& displayName, uint32_t displayWidth=0, uint32_t displayHeight=0); static bool addAnimation(const std::string& client, double duration, std::map &animationProperties); static bool removeAnimation(const std::string& client); static bool addListener(const std::string& client, std::shared_ptr listener);