devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b02d5a1922743a546a663958afdb39e76c804f66

commit b02d5a1922743a546a663958afdb39e76c804f66
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Mon Sep 28 11:18:23 2015 -0400

    ecore-wl2: Add API function to set window geometry
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_wl2/Ecore_Wl2.h        |  3 +++
 src/lib/ecore_wl2/ecore_wl2_window.c | 18 ++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index f500970..ff66248 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -412,6 +412,9 @@ EAPI void ecore_wl2_window_class_name_set(Ecore_Wl2_Window 
*window, const char *
 /* TODO: doxy */
 EAPI void ecore_wl2_window_geometry_get(Ecore_Wl2_Window *window, int *x, int 
*y, int *w, int *h);
 
+/* TODO: doxy */
+EAPI void ecore_wl2_window_geometry_set(Ecore_Wl2_Window *window, int x, int 
y, int w, int h);
+
 /* # ifdef __cplusplus */
 /* } */
 /* # endif */
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index df5c48e..1e0e26a 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -650,3 +650,21 @@ ecore_wl2_window_geometry_get(Ecore_Wl2_Window *window, 
int *x, int *y, int *w,
    if (w) *w = window->geometry.w;
    if (h) *h = window->geometry.h;
 }
+
+EAPI void
+ecore_wl2_window_geometry_set(Ecore_Wl2_Window *window, int x, int y, int w, 
int h)
+{
+   EINA_SAFETY_ON_NULL_RETURN(window);
+
+   if ((window->geometry.x == x) && (window->geometry.y == y) &&
+       (window->geometry.w == w) && (window->geometry.h == h))
+     return;
+
+   window->geometry.x = x;
+   window->geometry.y = y;
+   window->geometry.w = w;
+   window->geometry.h = h;
+
+   if (window->xdg_surface)
+     xdg_surface_set_window_geometry(window->xdg_surface, x, y, w, h);
+}

-- 


Reply via email to