Permission denied to access patchwork?

2016-02-14 Thread nicesj
Dear all,

I'm sorry to taint this mailing list.
I cannot access the patchwork now, server tells me that I have no permissions..

how can I access it? is therr any changes that I should know?

Best regards,
Sungjae Park

Sent from my android device.___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCH wayland] server: add listener API for new clients

2016-02-11 Thread nicesj
Using display object, Emit a signal if a new client is created.

In the server-side, we can get the destroy event of a client,
But there is no way to get the created event of it.
Of course, we can get the client object from the global registry
binding callbacks.
But it can be called several times with same client object.
And even if A client creates display object,
(so there is a connection), The server could not know that.
There could be more use-cases not only for this.

Signed-off-by: Sung-jae Park 

diff --git a/src/wayland-server-core.h b/src/wayland-server-core.h
index cb72981..1bc4d6b 100644
--- a/src/wayland-server-core.h
+++ b/src/wayland-server-core.h
@@ -156,19 +156,8 @@ void
 wl_display_add_destroy_listener(struct wl_display *display,
struct wl_listener *listener);
 
-/** Add a listener for getting a notification of creation of clients.
- *  If you add a listener, server will emits a signal if a new client
- *  is created.
- *
- *  \ref wl_client_create
- *  \ref wl_display
- *  \ref wl_listener
- *
- * \param display The display object
- * \param listener Signal handler object
- */
 void
-wl_display_add_create_client_listener(struct wl_display *display,
+wl_display_add_client_created_listener(struct wl_display *display,
struct wl_listener *listener);
 
 struct wl_listener *
diff --git a/src/wayland-server.c b/src/wayland-server.c
index 0eff8f6..2857b1d 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -1357,8 +1357,19 @@ wl_display_add_destroy_listener(struct wl_display 
*display,
wl_signal_add(&display->destroy_signal, listener);
 }
 
+/** Registers a listener for the client connection signal.
+ *  When a new client object is created, \a listener will be notified, carring
+ *  a pointer to the new wl_client object.
+ *
+ *  \ref wl_client_create
+ *  \ref wl_display
+ *  \ref wl_listener
+ *
+ * \param display The display object
+ * \param listener Signal handler object
+ */
 WL_EXPORT void
-wl_display_add_create_client_listener(struct wl_display *display,
+wl_display_add_client_created_listener(struct wl_display *display,
struct wl_listener *listener)
 {
wl_signal_add(&display->create_client_signal, listener);
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Regarding shm_pool and buffer.

2016-02-04 Thread nicesj
Dear all,

I can learn many things from this mailing list, thank you very much.

I have one more doubt about relations between memory pool and buffer.

I read a doc of wayland and it explains a wl_buffer can be created from 
shm-pool.

but in the example code, after creates the buffer from pool, attach it to the 
surface, and then the example destroyes shm pool resources from the client side.

so the server will gets destroy request.

the buffer which is attached to surface, however, still in use.

If I understood correctly, the pool should not be destroyed until all 
wl-buffers are freed.

Am I understood correctly?

or does the server should keep the pool information even though the client 
destroyes it?

Thank you all.

Best regards,
Sung-jae Park.

Sent from my android device.___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


[server-core] Add signal for creation of clients.

2016-02-04 Thread nicesj
Using display object, if a new client is created, emit a signal.

In the server-side, we can get the destroy event of a client,
But there is no way to get the client create event.
Of course, we can get the client object from the global registry
binding callbacks.
But it can be called several times with same client object.
And even if A client creates display object,
(so there is a connection), The server could not know that.
There could be more use-cases not only for this.

Please review this and if possible, merge it to the stream.

Signed-off-by: Sung-jae Park 

diff --git a/src/wayland-server-core.h b/src/wayland-server-core.h
index e8e1e9c..cb72981 100644
--- a/src/wayland-server-core.h
+++ b/src/wayland-server-core.h
@@ -156,6 +156,21 @@ void
 wl_display_add_destroy_listener(struct wl_display *display,
struct wl_listener *listener);
 
+/** Add a listener for getting a notification of creation of clients.
+ *  If you add a listener, server will emits a signal if a new client
+ *  is created.
+ *
+ *  \ref wl_client_create
+ *  \ref wl_display
+ *  \ref wl_listener
+ *
+ * \param display The display object
+ * \param listener Signal handler object
+ */
+void
+wl_display_add_create_client_listener(struct wl_display *display,
+   struct wl_listener *listener);
+
 struct wl_listener *
 wl_display_get_destroy_listener(struct wl_display *display,
wl_notify_func_t notify);
diff --git a/src/wayland-server.c b/src/wayland-server.c
index ae9365f..0eff8f6 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -96,6 +96,7 @@ struct wl_display {
struct wl_list client_list;
 
struct wl_signal destroy_signal;
+   struct wl_signal create_client_signal;
 
struct wl_array additional_shm_formats;
 };
@@ -448,6 +449,8 @@ wl_client_create(struct wl_display *display, int fd)
 
wl_list_insert(display->client_list.prev, &client->link);
 
+   wl_signal_emit(&display->create_client_signal, client);
+
return client;
 
 err_map:
@@ -864,6 +867,7 @@ wl_display_create(void)
wl_list_init(&display->registry_resource_list);
 
wl_signal_init(&display->destroy_signal);
+   wl_signal_init(&display->create_client_signal);
 
display->id = 1;
display->serial = 0;
@@ -1353,6 +1357,13 @@ wl_display_add_destroy_listener(struct wl_display 
*display,
wl_signal_add(&display->destroy_signal, listener);
 }
 
+WL_EXPORT void
+wl_display_add_create_client_listener(struct wl_display *display,
+   struct wl_listener *listener)
+{
+   wl_signal_add(&display->create_client_signal, listener);
+}
+
 WL_EXPORT struct wl_listener *
 wl_display_get_destroy_listener(struct wl_display *display,
wl_notify_func_t notify)
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


(wayland sever/client) multiple binding to a global resources.

2016-02-03 Thread nicesj
Dear all,

I'm still learning of the philosphy of the wayland world.

while seeing and writing some codes, I got a question regarding mutiple binding 
to a global objects.

The client should register a event callback for global registry.

also the server will announce its global resources.

in this corner, when a client gets global registry event callback, it checks 
interface string and then tries to bind it to a specific resource such as 
wl_compositor.

at this time, if our lovely client developer tries to bind one several times, 
how the server handles this request?

just bind and create them? (ex, wl_compositor_interface, wl_shm_interface, and 
so on)

or should it be deat as an error case?

I'm newbie, so my question could be a dummy silly ugly question.
please let me know it to not be a dummer ;)

Best regards,
Sung-jae Park.

Sent from my android device.___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Regarding user data for wl_client.

2016-01-26 Thread nicesj
Dear all,

Currently, I'm writing a simple compositor for proving my thought.

while implementing it, I found that the wl_client doesn't have the user data 
field.

in the sever side, the wl_client is used in many callbacks for handling the 
request of clients.

are there any functions like wl_client_set_user_data, get_user_data?

Best regards,
Sungjae Park


Sent from my android device.___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel