summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Peresipkyn <r.peresipkyn@samsung.com>2016-07-28 18:00:55 +0300
committerJunkyeong Kim <jk0430.kim@samsung.com>2016-08-04 18:19:41 -0700
commitea762c2596025c232ca7e534cab714f4be4ce1b0 (patch)
tree7559de8429ab497a94a567667d25afaa3495f35b
parent8f3774e99bad1a7e7ca9ac4ebbc3b6ae175acbd8 (diff)
downloade-mod-tizen-eom-ea762c2596025c232ca7e534cab714f4be4ce1b0.tar.gz
e-mod-tizen-eom-ea762c2596025c232ca7e534cab714f4be4ce1b0.tar.bz2
e-mod-tizen-eom-ea762c2596025c232ca7e534cab714f4be4ce1b0.zip
Send status of setting window to clietnt
Change-Id: Ic78d25499c6231e9d68671a3c05a77b24657b1e2
-rw-r--r--protocol/eom-client-protocol.h10
-rw-r--r--protocol/eom-protocol.c3
-rw-r--r--protocol/eom-server-protocol.h8
-rw-r--r--protocol/eom.xml5
-rw-r--r--src/e_mod_main.c7
5 files changed, 30 insertions, 3 deletions
diff --git a/protocol/eom-client-protocol.h b/protocol/eom-client-protocol.h
index 7172c5f..1fcd29d 100644
--- a/protocol/eom-client-protocol.h
+++ b/protocol/eom-client-protocol.h
@@ -152,6 +152,7 @@ enum wl_eom_attribute_state {
* @output_type: (none)
* @output_mode: (none)
* @output_attribute: (none)
+ * @output_set_window: (none)
*
* ***** TODO ******
*/
@@ -217,6 +218,15 @@ struct wl_eom_listener {
uint32_t attribute,
uint32_t attribute_state,
uint32_t error);
+ /**
+ * output_set_window - (none)
+ * @output_id: (none)
+ * @error: (none)
+ */
+ void (*output_set_window)(void *data,
+ struct wl_eom *wl_eom,
+ uint32_t output_id,
+ uint32_t error);
};
static inline int
diff --git a/protocol/eom-protocol.c b/protocol/eom-protocol.c
index 3db1593..c032027 100644
--- a/protocol/eom-protocol.c
+++ b/protocol/eom-protocol.c
@@ -33,11 +33,12 @@ static const struct wl_message wl_eom_events[] = {
{ "output_type", "uuu", types + 0 },
{ "output_mode", "uu", types + 0 },
{ "output_attribute", "uuuu", types + 0 },
+ { "output_set_window", "uu", types + 0 },
};
WL_EXPORT const struct wl_interface wl_eom_interface = {
"wl_eom", 1,
4, wl_eom_requests,
- 5, wl_eom_events,
+ 6, wl_eom_events,
};
diff --git a/protocol/eom-server-protocol.h b/protocol/eom-server-protocol.h
index 58400a7..333d0cd 100644
--- a/protocol/eom-server-protocol.h
+++ b/protocol/eom-server-protocol.h
@@ -196,12 +196,14 @@ struct wl_eom_interface {
#define WL_EOM_OUTPUT_TYPE 2
#define WL_EOM_OUTPUT_MODE 3
#define WL_EOM_OUTPUT_ATTRIBUTE 4
+#define WL_EOM_OUTPUT_SET_WINDOW 5
#define WL_EOM_OUTPUT_COUNT_SINCE_VERSION 1
#define WL_EOM_OUTPUT_INFO_SINCE_VERSION 1
#define WL_EOM_OUTPUT_TYPE_SINCE_VERSION 1
#define WL_EOM_OUTPUT_MODE_SINCE_VERSION 1
#define WL_EOM_OUTPUT_ATTRIBUTE_SINCE_VERSION 1
+#define WL_EOM_OUTPUT_SET_WINDOW_SINCE_VERSION 1
static inline void
wl_eom_send_output_count(struct wl_resource *resource_, uint32_t count)
@@ -233,6 +235,12 @@ wl_eom_send_output_attribute(struct wl_resource *resource_, uint32_t output_id,
wl_resource_post_event(resource_, WL_EOM_OUTPUT_ATTRIBUTE, output_id, attribute, attribute_state, error);
}
+static inline void
+wl_eom_send_output_set_window(struct wl_resource *resource_, uint32_t output_id, uint32_t error)
+{
+ wl_resource_post_event(resource_, WL_EOM_OUTPUT_SET_WINDOW, output_id, error);
+}
+
#ifdef __cplusplus
}
#endif
diff --git a/protocol/eom.xml b/protocol/eom.xml
index 699d499..ff50650 100644
--- a/protocol/eom.xml
+++ b/protocol/eom.xml
@@ -124,6 +124,11 @@
<arg name="error" type="uint"/>
</event>
+ <event name="output_set_window">
+ <arg name="output_id" type="uint"/>
+ <arg name="error" type="uint"/>
+ </event>
+
</interface>
</protocol>
diff --git a/src/e_mod_main.c b/src/e_mod_main.c
index 5d193ad..37aa0e2 100644
--- a/src/e_mod_main.c
+++ b/src/e_mod_main.c
@@ -1434,8 +1434,6 @@ _e_eom_window_set_internal(struct wl_resource *resource, int output_id, E_Client
eom_client = _e_eom_client_get_by_resource(resource);
RETURNIFTRUE(eom_client == NULL, "eom_client is NULL");
- RETURNIFTRUE(eom_client->current == EINA_FALSE, "not current client is going to set its window");
-
eom_output = _e_eom_output_get_by_id(output_id);
RETURNIFTRUE(eom_output == NULL, "eom_output is NULL");
@@ -1450,6 +1448,11 @@ _e_eom_window_set_internal(struct wl_resource *resource, int output_id, E_Client
/* ec is used in buffer_change callback for distinguishing external ec and its buffers */
eom_client->ec = ec;
+
+ if (eom_client->current == EINA_TRUE)
+ wl_eom_send_output_set_window(resource, eom_output->id, WL_EOM_ERROR_NONE);
+ else
+ wl_eom_send_output_set_window(resource, eom_output->id, WL_EOM_ERROR_OUTPUT_OCCUPIED);
}
static Eina_Bool