ecore_evas/wayland: Fix non-resize rotation.
authorRafael Antognolli <rafael.antognolli@intel.com>
Tue, 26 Nov 2013 16:01:35 +0000 (14:01 -0200)
committerRafael Antognolli <rafael.antognolli@intel.com>
Tue, 26 Nov 2013 16:01:35 +0000 (14:01 -0200)
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.

src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c

index 53bc074..849b38e 100644 (file)
@@ -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
           {