Window Manager changes source rectangle size every state change.
This patch changes it to set source rectangle first
when the surface is created.
Related commit: https://gerrit.automotivelinux.org/gerrit/#/c/15595/
Bug-AGL: SPEC-1584
Change-Id: Ia7429956053cfa18e6e82060f84f3b6fe755c0b1
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
struct controller_hooks
{
struct controller_hooks
{
void surface_created(uint32_t surface_id);
void surface_created(uint32_t surface_id);
void surface_removed(uint32_t surface_id);
void surface_visibility(uint32_t surface_id, uint32_t v);
void surface_destination_rectangle(uint32_t surface_id, uint32_t x, uint32_t y, uint32_t w, uint32_t h);
void surface_removed(uint32_t surface_id);
void surface_visibility(uint32_t surface_id, uint32_t v);
void surface_destination_rectangle(uint32_t surface_id, uint32_t x, uint32_t y, uint32_t w, uint32_t h);
this->screen = std::make_unique<struct screen>(0, this, output);
}
this->screen = std::make_unique<struct screen>(0, this, output);
}
+void controller::get_surface_properties(uint32_t surface_id, int param)
+{
+ ivi_wm_surface_get(this->proxy.get(), surface_id, param);
+}
+
void controller::layer_created(uint32_t id)
{
HMI_DEBUG("wm", "compositor::controller @ %p layer %u (%x)", this->proxy.get(), id, id);
void controller::layer_created(uint32_t id)
{
HMI_DEBUG("wm", "compositor::controller @ %p layer %u (%x)", this->proxy.get(), id, id);
HMI_DEBUG("wm", "compositor::surface %s @ %d w %i h %i", __func__, id,
width, height);
this->sprops[id].size = size{uint32_t(width), uint32_t(height)};
HMI_DEBUG("wm", "compositor::surface %s @ %d w %i h %i", __func__, id,
width, height);
this->sprops[id].size = size{uint32_t(width), uint32_t(height)};
+ this->surfaces[id]->set_source_rectangle(0, 0, width, height);
}
void controller::surface_added_to_layer(uint32_t layer_id, uint32_t surface_id)
}
void controller::surface_added_to_layer(uint32_t layer_id, uint32_t surface_id)
void layer_create(uint32_t id, int32_t w, int32_t h);
void surface_create(uint32_t id);
void create_screen(struct wl_output *output);
void layer_create(uint32_t id, int32_t w, int32_t h);
void surface_create(uint32_t id);
void create_screen(struct wl_output *output);
+ void get_surface_properties(uint32_t surface_id, int param = 0);
// Events
void surface_visibility_changed(uint32_t id, int32_t visibility);
// Events
void surface_visibility_changed(uint32_t id, int32_t visibility);
*/
void WindowManager::surface_created(uint32_t surface_id)
{
*/
void WindowManager::surface_created(uint32_t surface_id)
{
+ this->controller->get_surface_properties(surface_id, IVI_WM_PARAM_SIZE);
+
auto layer_id = this->layers.get_layer_id(surface_id);
if (!layer_id)
{
auto layer_id = this->layers.get_layer_id(surface_id);
if (!layer_id)
{
layer_id);
// set destination to the display rectangle
layer_id);
// set destination to the display rectangle
- s->set_source_rectangle(0, 0, w, h);
- this->layout_commit();
s->set_destination_rectangle(x, y, w, h);
// update area information
s->set_destination_rectangle(x, y, w, h);
// update area information
HMI_SEQ_DEBUG(req_num, "visible %s", act.role.c_str());
//this->lm_enddraw(act.role.c_str());
}
HMI_SEQ_DEBUG(req_num, "visible %s", act.role.c_str());
//this->lm_enddraw(act.role.c_str());
}
// Change current state
this->changeCurrentState(req_num);
// Change current state
this->changeCurrentState(req_num);
*/
void controller_hooks::surface_created(uint32_t surface_id)
{
*/
void controller_hooks::surface_created(uint32_t surface_id)
{
- this->app->surface_created(surface_id);
+ this->wmgr->surface_created(surface_id);
}
void controller_hooks::surface_removed(uint32_t surface_id)
{
}
void controller_hooks::surface_removed(uint32_t surface_id)
{
- this->app->surface_removed(surface_id);
+ this->wmgr->surface_removed(surface_id);
}
void controller_hooks::surface_visibility(uint32_t /*surface_id*/,
}
void controller_hooks::surface_visibility(uint32_t /*surface_id*/,