提交 9b703fed 编写于 作者: S Simon Fels

Forward selected display size as window size in single window mode

上级 9e6909c6
......@@ -151,7 +151,7 @@ anbox::cmds::SessionManager::SessionManager(const BusFactory &bus_factory)
std::shared_ptr<wm::Manager> window_manager;
if (single_window_)
window_manager = std::make_shared<wm::SingleWindowManager>(policy, app_mgr);
window_manager = std::make_shared<wm::SingleWindowManager>(policy, display_frame, app_mgr);
else
window_manager = std::make_shared<wm::MultiWindowManager>(policy, android_api_stub, app_mgr);
......
......@@ -27,13 +27,14 @@
namespace anbox {
namespace wm {
SingleWindowManager::SingleWindowManager(const std::shared_ptr<platform::Policy> &policy,
const graphics::Rect &window_size
const std::shared_ptr<application::Database> &app_db)
: platform_policy_(policy), app_db_(app_db) {}
: platform_policy_(policy), window_size_(window_size), app_db_(app_db) {}
SingleWindowManager::~SingleWindowManager() {}
void SingleWindowManager::setup() {
window_ = platform_policy_->create_window(0, {0, 0, 1024, 768}, "Android");
window_ = platform_policy_->create_window(0, window_size_, "Anbox - Android in a Box");
if (!window_->attach())
WARNING("Failed to attach window to renderer");
}
......
......@@ -36,6 +36,7 @@ class Window;
class SingleWindowManager : public Manager {
public:
SingleWindowManager(const std::shared_ptr<platform::Policy> &policy,
const graphics::Rect &window_size
const std::shared_ptr<application::Database> &app_db);
~SingleWindowManager();
......@@ -52,6 +53,7 @@ class SingleWindowManager : public Manager {
private:
std::shared_ptr<platform::Policy> platform_policy_;
graphics::Rect window_size_;
std::shared_ptr<application::Database> app_db_;
std::shared_ptr<Window> window_;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册