ecore_wayland: added Ecore_Wl_Event_Window_Lower event to notify that window lower... 57/47657/1
authorGwanglim Lee <gl77.lee@samsung.com>
Mon, 7 Sep 2015 13:20:18 +0000 (22:20 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Mon, 7 Sep 2015 13:20:18 +0000 (22:20 +0900)
Change-Id: I2065dc4741f116cd158086055101983670948491

src/lib/ecore_wayland/Ecore_Wayland.h
src/lib/ecore_wayland/ecore_wl.c
src/lib/ecore_wayland/ecore_wl_window.c

index 87aebf116fa5fd7585ca2d41035c727409da782a..ebe2f89612ca0c23ca5d4858f8f179ae4eed99cb 100644 (file)
@@ -61,6 +61,7 @@ typedef struct _Ecore_Wl_Event_Window_Visibility_Change Ecore_Wl_Event_Window_Vi
 typedef struct _Ecore_Wl_Event_Window_Rotate Ecore_Wl_Event_Window_Rotate;
 typedef struct _Ecore_Wl_Event_Window_Show Ecore_Wl_Event_Window_Show;
 typedef struct _Ecore_Wl_Event_Window_Hide Ecore_Wl_Event_Window_Hide;
+typedef struct _Ecore_Wl_Event_Window_Lower Ecore_Wl_Event_Window_Lower;
 typedef struct _Ecore_Wl_Event_Dnd_Enter Ecore_Wl_Event_Dnd_Enter;
 typedef struct _Ecore_Wl_Event_Dnd_Position Ecore_Wl_Event_Dnd_Position;
 typedef struct _Ecore_Wl_Event_Dnd_Leave Ecore_Wl_Event_Dnd_Leave;
@@ -248,6 +249,12 @@ struct _Ecore_Wl_Event_Window_Hide
    unsigned int event_win;
 };
 
+struct _Ecore_Wl_Event_Window_Lower
+{
+   unsigned int win;
+   unsigned int timestamp;
+};
+
 struct _Ecore_Wl_Event_Dnd_Enter
 {
    unsigned int win, source;
@@ -366,6 +373,7 @@ EAPI extern int ECORE_WL_EVENT_WINDOW_DEACTIVATE;
 EAPI extern int ECORE_WL_EVENT_WINDOW_VISIBILITY_CHANGE;
 EAPI extern int ECORE_WL_EVENT_WINDOW_SHOW;
 EAPI extern int ECORE_WL_EVENT_WINDOW_HIDE;
+EAPI extern int ECORE_WL_EVENT_WINDOW_LOWER;
 EAPI extern int ECORE_WL_EVENT_WINDOW_ROTATE;
 EAPI extern int ECORE_WL_EVENT_DND_ENTER;
 EAPI extern int ECORE_WL_EVENT_DND_POSITION;
index 5f43c9f781ad596e8e57389c42beec8c64aff42e..45ff1604f5dce439d5f116c721a7a240feb8599d 100644 (file)
@@ -119,6 +119,7 @@ EAPI int ECORE_WL_EVENT_WINDOW_DEACTIVATE = 0;
 EAPI int ECORE_WL_EVENT_WINDOW_VISIBILITY_CHANGE = 0;
 EAPI int ECORE_WL_EVENT_WINDOW_SHOW = 0;
 EAPI int ECORE_WL_EVENT_WINDOW_HIDE = 0;
+EAPI int ECORE_WL_EVENT_WINDOW_LOWER = 0;
 EAPI int ECORE_WL_EVENT_WINDOW_ROTATE = 0;
 EAPI int ECORE_WL_EVENT_DND_ENTER = 0;
 EAPI int ECORE_WL_EVENT_DND_POSITION = 0;
@@ -196,6 +197,7 @@ ecore_wl_init(const char *name)
         ECORE_WL_EVENT_WINDOW_VISIBILITY_CHANGE = ecore_event_type_new();
         ECORE_WL_EVENT_WINDOW_SHOW = ecore_event_type_new();
         ECORE_WL_EVENT_WINDOW_HIDE = ecore_event_type_new();
+        ECORE_WL_EVENT_WINDOW_LOWER = ecore_event_type_new();
         ECORE_WL_EVENT_WINDOW_ROTATE = ecore_event_type_new();
         ECORE_WL_EVENT_DND_ENTER = ecore_event_type_new();
         ECORE_WL_EVENT_DND_POSITION = ecore_event_type_new();
index ba9643579a664f609532842f02165e6e19bcf16f..84ac9171af31d77ec9154a308168008878279548 100644 (file)
@@ -597,12 +597,21 @@ ecore_wl_window_raise(Ecore_Wl_Window *win)
 EAPI void 
 ecore_wl_window_lower(Ecore_Wl_Window *win)
 {
+   Ecore_Wl_Event_Window_Lower *ev;
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    if (!win) return;
    /* FIXME: This should lower the xdg surface also */
    if (_ecore_wl_disp->wl.tz_policy)
-     tizen_policy_lower(_ecore_wl_disp->wl.tz_policy, win->surface);
+     {
+        tizen_policy_lower(_ecore_wl_disp->wl.tz_policy, win->surface);
+
+        if (!(ev = calloc(1, sizeof(Ecore_Wl_Event_Window_Lower)))) return;
+
+        ev->win = win->id;
+        ecore_event_add(ECORE_WL_EVENT_WINDOW_LOWER, ev, NULL, NULL);
+     }
 }
 
 EAPI void