aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2013-02-05 14:16:27 +0000
committerRafael Antognolli <rafael.antognolli@linux.intel.com>2013-02-19 10:18:03 -0300
commitcf67e69b50698acf16e10004af0c8432d1c366d1 (patch)
treef65bd05d3b67867bd1f51d7ce78ea919c8348704 /src
parent232ea5b875f7b173fbf88ef53f54ceb10b8fae3a (diff)
downloadefl-cf67e69b50698acf16e10004af0c8432d1c366d1.tar.gz
efl-cf67e69b50698acf16e10004af0c8432d1c366d1.tar.xz
efl-cf67e69b50698acf16e10004af0c8432d1c366d1.zip
Fix swapper to take resize edges into account.
Signed-off-by: Christopher Michael <cp.michael@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_swapper.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_swapper.c b/src/modules/evas/engines/wayland_shm/evas_swapper.c
index f5b925627..34f1b66cb 100644
--- a/src/modules/evas/engines/wayland_shm/evas_swapper.c
+++ b/src/modules/evas/engines/wayland_shm/evas_swapper.c
@@ -17,7 +17,7 @@
typedef struct _Wl_Buffer Wl_Buffer;
struct _Wl_Buffer
{
- int w, h;
+ int x, y, w, h;
struct wl_buffer *buffer;
void *data;
int offset;
@@ -28,7 +28,7 @@ struct _Wl_Buffer
struct _Wl_Swapper
{
Wl_Buffer buff[3];
- int w, h, depth;
+ int x, y, w, h, depth;
int buff_cur, buff_num;
struct wl_shm *shm;
struct wl_surface *surface;
@@ -56,7 +56,7 @@ static const struct wl_buffer_listener _evas_swapper_buffer_listener =
/* local variables */
Wl_Swapper *
-evas_swapper_setup(int w, int h, Outbuf_Depth depth, Eina_Bool alpha, struct wl_shm *shm, struct wl_surface *surface)
+evas_swapper_setup(int x, int y, int w, int h, Outbuf_Depth depth, Eina_Bool alpha, struct wl_shm *shm, struct wl_surface *surface)
{
Wl_Swapper *ws;
int i = 0;
@@ -69,6 +69,8 @@ evas_swapper_setup(int w, int h, Outbuf_Depth depth, Eina_Bool alpha, struct wl_
return NULL;
/* set some properties */
+ ws->x = x;
+ ws->y = y;
ws->w = w;
ws->h = h;
ws->depth = depth;
@@ -318,6 +320,8 @@ _evas_swapper_buffer_new(Wl_Swapper *ws, Wl_Buffer *wb)
/* make sure swapper has a shm */
if (!ws->shm) return EINA_FALSE;
+ wb->x = ws->x;
+ wb->y = ws->y;
wb->w = ws->w;
wb->h = ws->h;
@@ -417,7 +421,9 @@ _evas_swapper_buffer_put(Wl_Swapper *ws, Wl_Buffer *wb, Eina_Rectangle *rects, u
/* surface attach */
if (sent != wb->buffer)
{
- wl_surface_attach(ws->surface, wb->buffer, 0, 0);
+ wl_surface_attach(ws->surface, wb->buffer, wb->x, wb->y);
+ wb->x = 0;
+ wb->y = 0;
sent = wb->buffer;
}
@@ -425,12 +431,9 @@ _evas_swapper_buffer_put(Wl_Swapper *ws, Wl_Buffer *wb, Eina_Rectangle *rects, u
/* printf("Damage Surface: %d %d %d %d\n", rect->x, rect->y, rect->w, rect->h); */
wl_surface_damage(ws->surface, rect->x, rect->y, rect->w, rect->h);
- /* wl_surface_damage(ws->surface, 0, 0, rect->w, rect->h); */
/* surface commit */
wl_surface_commit(ws->surface);
-
- /* wb->valid = EINA_FALSE; */
}
static void