summaryrefslogtreecommitdiff
path: root/src/wayland-client.c
AgeCommit message (Collapse)AuthorFilesLines
2011-12-14Removed superfluous call to wl_copy_connectionAndy Nichols1-2/+0
The only purpose those code seems to serve is to introduce a buffer overflow when events contain more than 128 bytes of data.
2011-12-13client: fix a strdup memory leakPekka Paalanen1-3/+10
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>
2011-12-05client: unset WAYLAND_SOCKET env variablePekka Paalanen1-0/+1
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>
2011-11-23New drag and drop / selection protocolKristian Høgsberg1-1/+2
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.
2011-11-22Add support for server allocated object IDsKristian Høgsberg1-5/+31
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.
2011-11-18Move private definitions and prototypes to new wayland-private.hKristian Høgsberg1-1/+1
2011-11-17Introduce wl_resource_queue_event() for sending events laterKristian Høgsberg1-4/+0
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.
2011-11-17Add display event to acknowledge ID deletionKristian Høgsberg1-2/+20
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.
2011-10-20debug: Print debug message when client wakes upKristian Høgsberg1-0/+5
This helps spot and remove extraneous round trips and context switches.
2011-08-27Don't special case object ID 1 lookupKristian Høgsberg1-4/+1
2011-08-27Store objects in wl_map data structureKristian Høgsberg1-32/+13
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.
2011-08-27Remove range protocolKristian Høgsberg1-17/+3
2011-08-27Bind globals to client provided object IDsKristian Høgsberg1-17/+15
2011-08-27server: Hand code all wl_display client stubsKristian Høgsberg1-0/+23
2011-08-27Use a callback object instead of ad-hoc lists for sync and frame eventsKristian Høgsberg1-87/+20
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.
2011-08-12Rename source subdir from wayland to srcKristian Høgsberg1-0/+604