From 8e7913b3cda15abdda2c8e09c7883861cac4565c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Ekstr=C3=B6m?= Date: Wed, 19 Nov 2014 11:24:16 +0200 Subject: [PATCH] system-controller: commit and flush in dest. rect. cb. If we have to scale and/or move the rectangle, it is preferred to have it committed and flushed to weston as soon as possible. Change-Id: I579c205a924b54fcd7c927e13443b864a42a123e --- src/plugins/system-controller/wayland/glm-window-manager.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/plugins/system-controller/wayland/glm-window-manager.c b/src/plugins/system-controller/wayland/glm-window-manager.c index bba6a9a..3b88e5e 100644 --- a/src/plugins/system-controller/wayland/glm-window-manager.c +++ b/src/plugins/system-controller/wayland/glm-window-manager.c @@ -983,6 +983,7 @@ static void surface_destination_rectangle_callback(void *data, mrp_glm_window_manager_t *wm; mrp_wayland_window_update_t u; char buf[256]; + bool commit_needed = false; if (!(sf = mrp_htbl_lookup(surface_hash, data))) { mrp_log_error("system-controller: destination_rectangle callback " @@ -1033,6 +1034,8 @@ static void surface_destination_rectangle_callback(void *data, ivi_controller_surface_set_destination_rectangle(sf->ctrl_surface, sf->requested_x, sf->requested_y, sf->requested_width, sf->requested_height); + + commit_needed = true; } memset(&u, 0, sizeof(u)); @@ -1046,6 +1049,13 @@ static void surface_destination_rectangle_callback(void *data, u.height = sf->height; mrp_wayland_window_update(sf->win, MRP_WAYLAND_WINDOW_CONFIGURE, &u); + + if (commit_needed) { + mrp_debug("calling ivi_controller_commit_changes()"); + ivi_controller_commit_changes((struct ivi_controller *)wm->proxy); + } + + mrp_wayland_flush(wl); } } -- 2.7.4