diff options
Diffstat (limited to 'src/wm_layer_control.cpp')
-rw-r--r-- | src/wm_layer_control.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/wm_layer_control.cpp b/src/wm_layer_control.cpp index 10e99b9..80dc0c9 100644 --- a/src/wm_layer_control.cpp +++ b/src/wm_layer_control.cpp @@ -554,7 +554,19 @@ WMError LayerControl::layoutChange(const WMAction& action) auto rect = this->getAreaSize(action.area); HMI_DEBUG("Set layout %d, %d, %d, %d",rect.x, rect.y, rect.w, rect.h); - ilm_commitChanges(); + + // TO BE FIXED: + // Sometimes, ivi_wm_surface_size signal doesn't reach window manager, + // then, Window Manager can't set source size. + // This fixes it but it takes about 200ns(on R-Car M3) wastefully + ilmSurfaceProperties sp; + ilm_getPropertiesOfSurface(surface, &sp); + if(sp.origSourceHeight != sp.sourceHeight) { + HMI_SEQ_NOTICE(action.req_num, "WORK AROUND: set source size w:%d h%d", sp.origSourceWidth, sp.origSourceHeight); + ilm_surfaceSetSourceRectangle(surface, 0, 0, sp.origSourceWidth, sp.origSourceHeight); + ilm_commitChanges(); + } + ilm_surfaceSetDestinationRectangle(surface, rect.x, rect.y, rect.w, rect.h); ilm_commitChanges(); for(auto &wm_layer: this->wm_layers) |