summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-07-23 20:19:47 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-07-24 07:56:19 +0000
commit320122bc177cccd69509d284a4c68c79a23e1753 (patch)
treef21ec9e6e958c90fa4add2547dd5a8ad415f9b17
parentf25e25114ab2ef7e3019bfe4ff9b65ff93c41b90 (diff)
Fix XDG application shrinks
WM set surface source size output_size(1080X1920) in case of using runXDG. Then, XDG surface shrinks because dest size(1080X1488) is set and the surface is scaled. On the other hand, XDG application's source size is w = 0, h = 0 on startup from ivi-wm, so WM has to set source size in somewhere. So this patch fixes WM set XDG surface source size. This is short term solution because WM set source rectangle size every state changes. Bug-AGL: SPEC-1584 Change-Id: I128db0b7feaba6b51e13c467e91d5aff6adaf0a7 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
-rw-r--r--src/wayland_ivi_wm.cpp17
-rw-r--r--src/window_manager.cpp2
2 files changed, 7 insertions, 12 deletions
diff --git a/src/wayland_ivi_wm.cpp b/src/wayland_ivi_wm.cpp
index 75ecbbd..e0c395c 100644
--- a/src/wayland_ivi_wm.cpp
+++ b/src/wayland_ivi_wm.cpp
@@ -621,19 +621,12 @@ void controller::surface_created(uint32_t id)
this->surfaces[id] = std::make_unique<struct surface>(id, this);
this->chooks->surface_created(id);
- // TODO: If Clipping is necessary, this process should be modified.
- {
- // Set surface type:IVI_WM_SURFACE_TYPE_DESKTOP)
- // for resizing wayland surface when switching from split to full surface.
- ivi_wm_set_surface_type(this->proxy.get(), id, IVI_WM_SURFACE_TYPE_DESKTOP);
-
- // Set source reactangle even if we should not need to set it
- // for enable setting for destination region.
- this->surfaces[id]->set_source_rectangle(0, 0, this->output_size.w, this->output_size.h);
+ // Set surface type:IVI_WM_SURFACE_TYPE_DESKTOP)
+ // for resizing wayland surface when switching from split to full surface.
+ ivi_wm_set_surface_type(this->proxy.get(), id, IVI_WM_SURFACE_TYPE_DESKTOP);
- // Flush display
- this->display->flush();
- }
+ // Flush display
+ this->display->flush();
}
}
diff --git a/src/window_manager.cpp b/src/window_manager.cpp
index 5b86af8..15f55f0 100644
--- a/src/window_manager.cpp
+++ b/src/window_manager.cpp
@@ -738,6 +738,8 @@ void WindowManager::surface_set_layout(int surface_id, const std::string& area)
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