e_plane: set the default value of the cursor position.
authorSooChan Lim <sc1.lim@samsung.com>
Tue, 2 Jan 2018 07:04:28 +0000 (16:04 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Tue, 2 Jan 2018 07:06:55 +0000 (16:06 +0900)
Set the default dst positions when the cursor position is out of bound.

Change-Id: I72f87e82b6671388a4eb84867c4a074f14807b81

src/bin/e_plane.c

index ddab7dc..b277ad9 100644 (file)
@@ -339,6 +339,10 @@ _e_plane_surface_set(E_Plane *plane, tbm_surface_h tsurface)
              dst_y = ec->y;
           }
 
+        /* set the default values when the dst_x and dst_y is out of bound */
+        if (dst_x < 0 || dst_x > output->config.geom.w) dst_x = output->config.geom.x;
+        if (dst_y < 0 || dst_y > output->config.geom.h) dst_y = output->config.geom.y;
+
         /* if output is transformed, the position of a buffer on screen should be also
          * transformed.
          */