summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add patch chunks missing from previous commmit0.85Kristian Høgsberg2012-04-142-1/+2
| | | | | For some reason the changes to wayland-client.h and wayland-client.pc didn't get committed with the other versioning changes.
* Add a public header for the version numberNeil Roberts2012-04-125-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds a public header so that applications can get the Wayland version number at compile time. This can be used to make applications that support compiling against multiple versions of Wayland. There is a separate installed header called cogl-version.h which gets included by both wayland-client.h and wayland-server.h The canonical place for the version number is the configure.ac script which splits it into three separate m4 defines for the major, minor and micro version. These are copied into the generated wayland-version.h header using AC_SUBST. There is also a string form of the complete version number. The version number is now also automatically copied into the two .pc files. Because the major, minor and micro parts are required it is no longer possible to leave the version number as 'master' when building from git. Most projects seem to immediately bump the git repo to a fake version number (usually odd) after making a release so that there is always a relative number that can be used for comparison. This patch sets the git version to 0.99.0 under the assumption that the next release will be 1.0.0.
* Add wl_display_disconnect to the client headerNeil Roberts2012-04-121-0/+1
| | | | | | | Commit fdbbc38a added a wl_display_disconnect function to the 0.85 branch so that Mesa can continue to build against both that branch and master. However it was missing a declaration in the header so Mesa would still fail to build when -Werror is enabled.
* client: Add wl_display_disconnect() so mesa master can link against 0.85Kristian Høgsberg2012-04-051-2/+14
|
* connection: fix signedness warningsPekka Paalanen2012-03-231-2/+2
| | | | | | | | | | Fix two of warning: comparison between signed and unsigned integer expressions If the pointer difference somehow ended up negative, these comparisons would break as the difference was implicitly casted to unsigned. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* Fix harmless signedness warningsPekka Paalanen2012-03-235-6/+6
| | | | | | | | Trivially silence all the harmless (i.e. would have been correct also without this fix) compiler warnings: warning: comparison between signed and unsigned integer expressions Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* scanner: fix a signedness warningPekka Paalanen2012-03-231-1/+2
| | | | | | | Trivial fix to a warning: comparison between signed and unsigned integer expressions Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* scanner: Remove unused variable 'len'Peter Hutterer2012-03-231-1/+1
| | | | | | | scanner.c: In function ‘desc_dump’: scanner.c:142:42: warning: unused variable ‘len’ [-Wunused-variable] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* shm: fix cosmetic gcc warningsPekka Paalanen2012-03-231-2/+2
| | | | | | Fix warning: 'static' is not at beginning of declaration Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* server: fix signedness in wl_client_connection_dataPekka Paalanen2012-03-231-1/+2
| | | | | | | | | | | | | The variables opcode and size were unsigned, which lead to warnings about comparisons of signed vs. unsigned. Change these variable to signed. Their usage never relies on being unsigned. This also fixes (an assumed) printf format string problem, where these were printed with %d, not %u. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* Release 0.85.00.85.0Kristian Høgsberg2012-02-092-2/+2
|
* scanner: don't print new line when no descriptions are providedTiago Vignatti2012-02-091-1/+2
| | | | Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
* Drop warning when we receive an event for zombie objectsKristian Høgsberg2012-02-091-1/+0
| | | | Business as usual, but the message is confusing.
* wayland-util.h: Avoid un-namespaced _container_ofKristian Høgsberg2012-02-091-9/+9
| | | | | Yes, there are worse offenders in that file, but this one isn't used in the code and it makes Xorg angry.
* scanner: allow summary attributes in args and <description> in <protocol>Jesse Barnes2012-01-191-31/+45
| | | | | Add support for arg summaries for use by detailed structure element descriptions.
* scanner: Support documentation elementsJesse Barnes2012-01-181-1/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Wed, 18 Jan 2012 12:29:37 -0800 "Kristensen, Kristian H" <kristian.h.kristensen@intel.com> wrote: > Yeah, that looks good. I was thinking of a separate <description> tag > to avoid stuffing too much into an attribute. How does this look? It adds a summary attribute to atomic elements, and a <description> tag with a summary for others. Spits out enum documentation like this: /** * wl_display_error - global error values * @WL_DISPLAY_ERROR_INVALID_OBJECT: server couldn't find object * @WL_DISPLAY_ERROR_INVALID_METHOD: method doesn't exist on the specified interface * @WL_DISPLAY_ERROR_NO_MEMORY: server is out of memory * * These errors are global and can be emitted in response to any server request. */ enum wl_display_error { WL_DISPLAY_ERROR_INVALID_OBJECT = 0, WL_DISPLAY_ERROR_INVALID_METHOD = 1, WL_DISPLAY_ERROR_NO_MEMORY = 2, }; and structure documentation like this: /** * wl_display - core global object * @bind: bind an object to the display * @sync: (none) * * The core global object. This is a special singleton object. It is used for * internal wayland protocol features. */ struct wl_display_interface { void (*bind)(struct wl_client *client, struct wl_resource *resource, uint32_t name, const char *interface, uint32_t version, uint32_t id); void (*sync)(struct wl_client *client, struct wl_resource *resource, uint32_t callback); };
* Fix 'make dist' as connection.h no longer existsRichard Hughes2012-01-131-1/+0
|
* server: In default grab, update focus resource after sending releaseNeil Roberts2012-01-121-5/+5
| | | | | | | | The default grab implementation in wayland-server was updating the focus resource before sending the button event. This would cause the button release to be dropped from the implicit grab if the pointer is moved away from the focus surface. This patch just swaps the order around.
* shm: Drop non-premul format, use less ambiguous ARGB8888 naming conventionKristian Høgsberg2012-01-111-6/+5
| | | | This also matches the new wl_drm format names.
* Move data device implementation into wayland-serverKristian Høgsberg2012-01-064-0/+511
|
* Move default grab implementation to wayland-serverKristian Høgsberg2012-01-061-0/+56
|
* New grab APIKristian Høgsberg2012-01-062-54/+24
| | | | | | | | | | | | | | | | | | | | | | This commit changes the way struct wl_grab works in a couple of ways: - The grab itself now decides when it ends instead of hardcoding button up as the terminating event. We remove the end vfunc since a grab now always know when it ends and can just clean up at that point. - We add a new focus vfunc that is invoked every time the pointer enters a new surface, regardless of any grabs. The callback receives the surface and the surface-relative pointer coordinates. The callback lets a grab send enter/leave events and change the grab focus. - The grab has a focus surface, wich determines the coordinate space for the motion callback coordinates. - The input device always tracks the current surface, ie the surface that currently contains the pointer, and coordinates relative to that surface. With these changes, we will be able to pull the core input event delivery and the drag and drop grab into the core wayland-server library.
* server: Allocate server ID for when resource->object.id is 0Kristian Høgsberg2012-01-041-1/+8
|
* server: remove wl_display::callback_list as unusedPekka Paalanen2012-01-031-2/+0
| | | | Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* server: add wl_input_device_release()Pekka Paalanen2012-01-032-0/+18
| | | | | | | | | | | | | | Add a clean-up function for destroying all objects created in wl_input_device_init(). Can be used to fix memory leaks reported by Valgrind in the demos. The init function was also missing an explicit initialisation of the 'keys' array. Add the explicit array init, although it is redundant with the zeroing of the whole struct. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com> krh: Edited to rename function to *_release()
* Fix WL_EVENT_WRITEABLE typoKristian Høgsberg2011-12-283-6/+6
|
* Drop unused hash tableKristian Høgsberg2011-12-274-319/+3
| | | | | We now just use a table for looking up object IDs so we should drop the hash table.
* Rename all instances of typeofKristian Høgsberg2011-12-221-1/+1
|
* Use __typeof__ instead of typeofKristian Høgsberg2011-12-221-2/+2
| | | | Thiago Macieira compiles with -std=c++11.
* server: destroy the socket event source on display destroyPekka Paalanen2011-12-221-4/+7
| | | | | | | | | | | | | | On wl_display_add_socket(), the listening socket fd is added to the event loop. However, wl_event_source object is not stored and hence cannot be freed, resulting in a minor leak. Store wl_event_source pointer in struct wl_socket so we can track it, and destroy it on wl_display_destroy(). The event loop itself must be destroyed after destroying the event sources linked to it. Fixes a Valgrind reported memory leak. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* connection: Fix printf format warningsKristian Høgsberg2011-12-171-2/+2
|
* Increase closure buffer size and fail gracefully for too big closures.Laszlo Agocs2011-12-173-6/+38
| | | | | Buffer size changed from 256 to 1024 bytes. Marshalling will now stop if the buffer is not big enough.
* Removed superfluous call to wl_copy_connectionAndy Nichols2011-12-141-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.
* Make wl_list_for_each* work for c++Jørgen Lind2011-12-141-1/+7
|
* client: fix a strdup memory leakPekka Paalanen2011-12-131-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>
* client: unset WAYLAND_SOCKET env variablePekka Paalanen2011-12-051-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>
* server: do not send delete_id to a dead clientPekka Paalanen2011-11-291-3/+5
| | | | | | | | | | | During client tear-down, all objects are destroyed in id order. Therefore the display object is destroyed first. If the destroy listeners of any object destroy another object by calling wl_resoruce_destroy(), we try to send a delete_id event to the client. This leads to a segmentation fault without a display object. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* server: document wl_resource_post_event() argumentsPekka Paalanen2011-11-291-0/+17
| | | | Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* util: clear pointers on wl_list_remove()Pekka Paalanen2011-11-291-0/+2
| | | | | | | | | | | Set the next and prev pointers of the removed list element to NULL. This will catch programming errors that would use invalid list pointers, double-remove for instance. It also helps debugging, making it easy to see in gdb if an object is not in a list. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* server: no errors to a dead clientPekka Paalanen2011-11-291-0/+19
| | | | | | | Do not try to send errors to an already dead client, while in the middle of cleanup. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* New drag and drop / selection protocolKristian Høgsberg2011-11-234-46/+23
| | | | | | | | | | | 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.
* server: Stop special casing the compositorKristian Høgsberg2011-11-232-39/+2
| | | | | wl_compositor_init() was just adding the global and providing a helper bind function. Not useful enough to warrent API.
* Add support for server allocated object IDsKristian Høgsberg2011-11-225-30/+108
| | | | | | | 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.
* debug: Use unsigned for object IDsKristian Høgsberg2011-11-221-1/+1
|
* scanner: Only strdup interface_name after making sure it's not NULLKristian Høgsberg2011-11-181-2/+1
|
* Move private definitions and prototypes to new wayland-private.hKristian Høgsberg2011-11-187-21/+25
|
* Fix unused variable warningKristian Høgsberg2011-11-181-4/+2
|
* Introduce wl_resource_queue_event() for sending events laterKristian Høgsberg2011-11-175-8/+56
| | | | | | | | | | 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.
* Add display event to acknowledge ID deletionKristian Høgsberg2011-11-174-3/+30
| | | | | | | 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.
* util: Add wl_list_insert_list()Kristian Høgsberg2011-11-152-0/+10
|