From dbb9cf9765904a8b16022e9828414da3334e86f6 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Tue, 26 Nov 2013 14:01:35 -0200 Subject: [PATCH] ecore_evas/wayland: Fix non-resize rotation. Fix phab T392. Notice that it should reopen T359, as it wasn't really fixed, but a rotation with resize was being used when a non-resized rotation was requested. The cause of the "protruding surfaces" is likely the fact that Elementary is setting the opaque regions manually, instead of leaving it to Ecore_Evas. This must be fixed either inside Elementary itself, or adding the "surface extents" (shadow/non-visible surface parts) info to Ecore_Evas too. --- .../wayland/ecore_evas_wayland_common.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index 53bc074cc7..849b38e9eb 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -276,6 +276,7 @@ _rotation_do(Ecore_Evas *ee, int rotation, int resize) if (!resize) { int fw, fh; + int ww, hh; /* grab framespace width & height */ evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh); @@ -284,14 +285,8 @@ _rotation_do(Ecore_Evas *ee, int rotation, int resize) if (!ee->prop.fullscreen) { /* resize the ecore_wayland window */ - ecore_wl_window_resize(wdata->win, + ecore_wl_window_resize(wdata->win, ee->req.h + fw, ee->req.w + fh, 0); - - /* resize the canvas */ - evas_output_size_set(ee->evas, ee->req.h + fw, - ee->req.w + fh); - evas_output_viewport_set(ee->evas, 0, 0, - ee->req.h + fw, ee->req.w + fh); } else { @@ -320,14 +315,17 @@ _rotation_do(Ecore_Evas *ee, int rotation, int resize) } } - /* call the ecore_evas' resize function */ - if (ee->func.fn_resize) ee->func.fn_resize(ee); - /* add canvas damage */ if ((ee->rotation == 0) || (ee->rotation == 180)) evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h); else evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.h, ee->req.w); + ww = ee->h; + hh = ee->w; + ee->w = ww; + ee->h = hh; + ee->req.w = ww; + ee->req.h = hh; } else {