Age | Commit message (Collapse) | Author | Files | Lines |
|
The only purpose those code seems to serve is to introduce a buffer
overflow when events contain more than 128 bytes of data.
|
|
Memory leak found by valgrinding simple-shm client.
struct wl_global::interface is a strdup()'d string that was never freed.
Make a function for freeing a wl_global, and use it.
krh: Edit to name wl_global destructor wl_global_destroy.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
|
|
WAYLAND_SOCKET contains a file descriptor that is an open connection to
a Wayland server. It is private to us, and makes no sense to relay the
same value (or any value) to our child processes.
Unset the environment variable to prevent it from being accidentally
relayed to other processes.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
|
|
This commit brings a big change to the DND and copy/paste interfaces.
Most importantly the functionality is now independent of wl_shell.
The wl_shell interface is intended for desktop style UI interaction and
an optional and experimental interface.
The new interface also allows receiving the DND data multiple times or
multiple times during the drag, and the mechanism for offering and receiving
data is now shared between DND and selections.
|
|
We set aside a range of the object ID space for use by the server. This
allows the server to bind an object to an ID for a client and pass that
object to the client. The client can use the object immediately and the
server can emit events to the object immdiately.
|
|
|
|
Some events, such as the display.delete_id, aren't very urgent and we
would like to not always send them immdiately and cause an unnecessary
context switch. The wl_resource_queue_event() function will place the
event in the connection output buffer but not request the main loop to
poll for writable. The effect is that the event will just sit in the
output buffer until a more important event comes around and requires
flushing.
|
|
We need to make sure the client doesn't reuse an object ID until the
server has seen the destroy request. When a client destroys an ID
the server will now respond with the display.delete_id event, which lets
the client block reuse until it receives the event.
|
|
This helps spot and remove extraneous round trips and context switches.
|
|
|
|
The wl_map data structure is just an array with a free-list that lets the
client recycle unused client IDs and keep range of client IDs under control.
|
|
|
|
|
|
|
|
So obvious in retrospect. The object system can do all the work for us
and keep track of pending calls as regular objects and we don't need to
abuse the resource system to get them cleaned up on client exit. We
don't need the custom key management or (broken) lookup, we just sue
object IDs. And last but not least, anybody can receive the callback,
not just display listeners.
|
|
|