From 6d11d35f86649511e6a5b4b8ab6b6ae13cb4d556 Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Thu, 2 Aug 2018 15:34:24 +0900 Subject: Fix source rectangle changes every state change 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 --- src/wayland_ivi_wm.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/wayland_ivi_wm.cpp') diff --git a/src/wayland_ivi_wm.cpp b/src/wayland_ivi_wm.cpp index 522295d..2a27d8c 100644 --- a/src/wayland_ivi_wm.cpp +++ b/src/wayland_ivi_wm.cpp @@ -536,6 +536,11 @@ void controller::create_screen(struct wl_output *output) this->screen = std::make_unique(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); @@ -596,6 +601,7 @@ void controller::surface_size_changed(uint32_t id, int32_t width, 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) -- cgit 1.2.3-korg