summaryrefslogtreecommitdiffstats
path: root/src/window_manager.cpp
diff options
context:
space:
mode:
authorTadao Tanikawa <tanikawa.tadao@jp.panasonic.com>2018-08-02 07:24:38 +0000
committerTadao Tanikawa <tanikawa.tadao@jp.panasonic.com>2018-08-02 07:25:22 +0000
commit6bc7a273350721be300423b1509527f336dce50e (patch)
treecf48715616b36b76b38a07e1df9e74e2dd30c2d0 /src/window_manager.cpp
parent3d1703f9a5c9d6a356b561ea7528c70a1dc4fe2d (diff)
Revert "Enable scaling to fit various screen resolutions"
Abandon scaling support by AGL window manager 2017 Bug-AGL: SPEC-1611 This reverts commit 8ab10aaafc6fb3dc7bbad755dce9b4bdaa41f287. Change-Id: Id6afb263a6dc30929b922e469d906e2e5190f7b0
Diffstat (limited to 'src/window_manager.cpp')
-rw-r--r--src/window_manager.cpp24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/window_manager.cpp b/src/window_manager.cpp
index 98ebcf1..862341a 100644
--- a/src/window_manager.cpp
+++ b/src/window_manager.cpp
@@ -19,7 +19,6 @@
#include "window_manager.hpp"
#include "json_helper.hpp"
-#include "wm_config.hpp"
#include "applist.hpp"
extern "C"
@@ -147,7 +146,6 @@ WindowManager::WindowManager(wl::display *d)
int WindowManager::init()
{
- int ret;
if (!this->display->ok())
{
return -1;
@@ -203,8 +201,7 @@ int WindowManager::init()
// Third level objects
this->display->roundtrip();
- ret = init_layers();
- return ret;
+ return init_layers();
}
int WindowManager::dispatch_pending_events()
@@ -657,22 +654,12 @@ int WindowManager::init_layers()
return -1;
}
- WMConfig wm_config;
- wm_config.loadConfigs();
-
auto &c = this->controller;
auto &o = this->outputs.front();
auto &s = c->screens.begin()->second;
auto &layers = c->layers;
- this->layers.loadAreaDb();
- const compositor::rect base = this->layers.getAreaSize("fullscreen");
-
- const std::string aspect_setting = wm_config.getConfigAspect();
- const compositor::rect scale_rect =
- this->layers.getScaleDestRect(o->width, o->height, aspect_setting);
-
// Write output dimensions to ivi controller...
c->output_size = compositor::size{uint32_t(o->width), uint32_t(o->height)};
c->physical_size = compositor::size{uint32_t(o->physical_width),
@@ -687,11 +674,9 @@ int WindowManager::init_layers()
// Quick and dirty setup of layers
for (auto const &i : this->layers.mapping)
{
- c->layer_create(i.second.layer_id, scale_rect.w, scale_rect.h);
+ c->layer_create(i.second.layer_id, o->width, o->height);
auto &l = layers[i.second.layer_id];
- l->set_source_rectangle(0, 0, base.w, base.h);
- l->set_destination_rectangle(
- scale_rect.x, scale_rect.y, scale_rect.w, scale_rect.h);
+ l->set_destination_rectangle(0, 0, o->width, o->height);
l->set_visibility(1);
HMI_DEBUG("wm", "Setting up layer %s (%d) for surface role match \"%s\"",
i.second.name.c_str(), i.second.layer_id, i.second.role.c_str());
@@ -702,6 +687,9 @@ int WindowManager::init_layers()
this->layout_commit();
+ this->layers.loadAreaDb();
+ this->layers.setupArea(o->width, o->height);
+
return 0;
}