<HTML><HEAD>
<META content=IE=5 http-equiv=X-UA-Compatible>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<STYLE id=mysingle_style type=text/css>.search-word {
        BACKGROUND-COLOR: #ffee94
}
P {
        FONT-SIZE: 10pt; MARGIN-BOTTOM: 5px; FONT-FAMILY: 맑은 고딕, arial; MARGIN-TOP: 5px
}
TD {
        FONT-SIZE: 10pt; MARGIN-BOTTOM: 5px; FONT-FAMILY: 맑은 고딕, arial; MARGIN-TOP: 5px
}
LI {
        FONT-SIZE: 10pt; MARGIN-BOTTOM: 5px; FONT-FAMILY: 맑은 고딕, arial; MARGIN-TOP: 5px
}
BODY {
        FONT-SIZE: 10pt; FONT-FAMILY: 맑은 고딕, arial; MARGIN: 10px; LINE-HEIGHT: 1.4
}
</STYLE>

<STYLE id=knox_style type=text/css>P {
        FONT-SIZE: 10pt; MARGIN-BOTTOM: 5px; FONT-FAMILY: 맑은 고딕, arial; MARGIN-TOP: 5px
}
</STYLE>

<META name=GENERATOR content=ActiveSquare></HEAD>
<BODY style="OVERFLOW: auto">
<P>When a wayland compositor gets an EAGAIN error whenever<BR>sending or receiving event(s) to a client in the<BR>wl_closure_send() or the wl_closure_queue(), the error<BR>variable of the wl_client for the client will be set to<BR>true and the client is going to be killed by the<BR>compositor later soon. This patch fixes the problem by<BR>updating the socket fd's event mask as we're doing<BR>in wl_display_flush_clients() for having another chance<BR>to do it again.</P>
<P>Actually, this kind of problem can be watched in an<BR>environment in which massive input events are coming<BR>from multi-touch screen or multi-pen devices. In this<BR>kind of environment, a client receiving the massive<BR>input events are trying to drawing something very hard<BR>but it's being killed sooner or later. With the given<BR>patch, the client receiving the input events is not being<BR>destroyed and is working well even though it doesn't get<BR>the whole input events from the compositor.</P>
<P>Signed-off-by: jeon <<A href="mailto:jhyuni.kang@samsung.com">jhyuni.kang@samsung.com</A>></P>
<P>---<BR> src/wayland-server.c | 11 +++++++++--<BR> 1 file changed, 9 insertions(+), 2 deletions(-)</P>
<P>diff --git a/src/wayland-server.c b/src/wayland-server.c<BR>index eae8d2e..5afaa28 100644<BR>--- a/src/wayland-server.c<BR>+++ b/src/wayland-server.c<BR>@@ -222,8 +222,15 @@ handle_array(struct wl_resource *resource, uint32_t opcode,<BR> <BR>        log_closure(resource, closure, true);<BR> <BR>-       if (send_func(closure, resource->client->connection))<BR>-               resource->client->error = 1;<BR>+       if (send_func(closure, resource->client->connection)) {<BR>+               if (errno == EAGAIN) {<BR>+                       wl_event_source_fd_update(resource->client->source,<BR>+                                                 WL_EVENT_WRITABLE |<BR>+                                                 WL_EVENT_READABLE);<BR>+               } else {<BR>+                       resource->client->error = 1;<BR>+               }<BR>+       }<BR> <BR>        wl_closure_destroy(closure);<BR> }</P>
<P>-- <BR>2.7.4</P></BODY></HTML><img src='http://ext.samsung.net/mail/ext/v1/external/status/update?userid=jhyuni.kang&do=bWFpbElEPTIwMTgxMTIzMDUwODQ4ZXBjbXMxcDgzN2IyZjIzYWQ0ZWUxMTJiZTA1YjdlMzI1NTY3NGU4NSZyZWNpcGllbnRBZGRyZXNzPXdheWxhbmQtZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3Jn' border=0 width=0 height=0 style='display:none'>