- 26 Jul, 2016 1 commit
-
-
Yong Bakos authored
Some headers and source files have been using types such as uint32_t without explicitly including stdint.h. Explicitly include stdint.h where appropriate. Signed-off-by:
Yong Bakos <ybakos@humanoriented.com> Reviewed-by:
Eric Engestrom <eric.engestrom@imgtec.com>
-
- 07 Jun, 2016 1 commit
-
-
Yong Bakos authored
wayland-server.h: Adjust line breaks between prototypes. wayland-server-core.h: Adjust line breaks between prototypes. Adjust space between splats and identifiers. Remove unconventional linebreak before first parameter. Add line breaks after return types. Remove unnecessary forward declarations, and: - move 'struct wl_client' declaration close to the dependent typedef - tastefully move 'wl_shm_buffer_get' to leverage the return type Replace explicit __attribute__ with WL_PRINTF macro. Signed-off-by:
Yong Bakos <ybakos@humanoriented.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- 11 May, 2016 1 commit
-
-
Yong Bakos authored
Publican was generating a subtle error during a build: Error: no ID for constraint linkend: Server-wayland-server-core_8h. This was caused by doxygen applying the doc comment at the top of wayland-server.h as the documentation for struct wl_object. As such, the generated documentation for wl_object was also very incorrect. Make the file doc comments in wayland-client.h and wayland-server.h real doxygen file doc comments with the \file command, add a \brief, make the inclusion warning a \warning, correct the language of the comment in wayland-server.h, and remove one unnecessary line break. This squelches the publican error, removes the bad wl_object documentation, and makes the comment appear in the generated html documentation. References: d74a9c07Signed-off-by:
Yong Bakos <ybakos@humanoriented.com> Reviewed-by:
Bryce Harrington <bryce@osg.samsung.com>
-
- 12 Jun, 2015 1 commit
-
-
Bryce Harrington authored
Signed-off-by:
Bryce Harrington <bryce@osg.samsung.com> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- 30 Apr, 2015 1 commit
-
-
Giulio Camuffo authored
wayland-client.h and wayland-server.h include the protocol headers generated at build time. This means that a libwayland user cannot generate and use protocol code created from a wayland.xml newer than the installed libwayland, because it is not possible to only include the API header. Another use case is language bindings, which would generate their own protocol code and which only need to use the library ABI, not the generated C code. This commit adds wayland-client-core.h and wayland-server-core.h which do not include the protocol headers or any deprecated code. Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net> Reviewed-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- 25 Nov, 2014 1 commit
-
-
Bill Spitzak authored
Also removed \comment and used C++ comments. There does not appear to be any other way to put comments into code samples. Reviewed-by:
Bryce Harrington <b.harrington@samsung.com>
-
- 05 Aug, 2014 1 commit
-
-
Jasper St. Pierre authored
This allows compositors to easily select a good display to listen on.
-
- 25 Jul, 2014 1 commit
-
-
Bryce W. Harrington authored
Use function linking syntax instead of variable linking, to resolve two warnings: wayland-server.h:167: warning: explicit link request to 'wl_list_remove' could not be resolved wayland-server.h:188: warning: explicit link request to 'wl_list_remove' could not be resolved Signed-off-by:
Bryce Harrington <b.harrington@samsung.com>
-
- 06 Feb, 2014 1 commit
-
-
Neil Roberts authored
The previous implementation of the wl_container_of macro was dereferencing the sample pointer in order to get an address of the member to calculate the offset. Ideally this shouldn't cause any problems because the dereference doesn't actually cause the address to be read from so it shouldn't matter if the pointer is uninitialised. However this is probably technically invalid and could cause undefined behavior. Clang appears to take advantage of this undefined behavior and doesn't bother doing the subtraction. It also gives a warning when it does this. The documentation for wl_container_of implies that it should only be given an initialised pointer and if that is done then there is no problem with clang. However this is quite easy to forget and doesn't cause any problems or warnings with gcc so it's quite easy to accidentally break clang. To fix the problem this changes the macro to use pointer - offsetof(__typeof__(sample), member) so that it doesn't need to deref the sample pointer. This does however require that the __typeof__ operator is supported by the compiler. In practice we probably only care about gcc and clang and both of these happily support the operator. The previous implementation was also using __typeof__ but it had a fallback path avoiding it when the operator isn't available. The fallback effectively has undefined behaviour and it is targetting unknown compilers so it is probably not a good idea to leave it in. Instead, this patch just removes it. If someone finds a compiler that doesn't have __typeof__ but does work with the old implementation then maybe they could add it back in as a special case. This patch removes the initialisation anywhere where the sample pointer was being unitialised before using wl_container_of. The documentation for the macro has also been updated to specify that this is OK.
-
- 15 Jan, 2014 1 commit
-
-
U. Artie Eoff authored
In wl_display_add_shm_format(), check the return value from wl_array_add() before dereferencing it and assigning it a value. Return the resulting pointer back to the caller. Signed-off-by:
U. Artie Eoff <ullysses.a.eoff@intel.com>
-
- 14 Nov, 2013 1 commit
-
-
Neil Roberts authored
Linux will let you mmap a region of a file that is larger than the size of the file. If you then try to read from that region the process will get a SIGBUS signal. Currently the clients can use this to crash a compositor because it can create a pool and lie about the size of the file which will cause the compositor to try and read past the end of it. The compositor can't simply check the size of the file to verify that it is big enough because then there is a race condition where the client may truncate the file after the check is performed. This patch adds the following two public functions in the server API which can be used wrap access to an SHM buffer: void wl_shm_buffer_begin_access(struct wl_shm_buffer *buffer); void wl_shm_buffer_end_access(struct wl_shm_buffer *buffer); The first time wl_shm_buffer_begin_access is called a signal handler for SIGBUS will be installed. If the signal is caught then the buffer for the current pool is remapped to an anonymous private buffer at the same address which allows the compositor to continue without crashing. The end_access function will then post an error to the buffer resource. The current pool is stored as part of some thread-local storage so that multiple threads can safely independently access separate buffers. Eventually we may want to add some more API so that compositors can hook into the signal handler or replace it entirely if they also want to do some SIGBUS handling.
-
- 21 Oct, 2013 1 commit
-
-
Kristian Høgsberg authored
We had a mix of inconsistent names, some of which were non-conformant. Standardize on all-uppercase-and-underscore naming convention. https://bugs.freedesktop.org/show_bug.cgi?id=70679
-
- 21 Sep, 2013 1 commit
-
-
Aaron Faanes authored
Prefer \comment over // in code blocks for consistency's sake and keep variable definitions separated by a line from the rest of the body.
-
- 17 Sep, 2013 3 commits
-
-
Aaron Faanes authored
The old description was a bit vague; this commit hopefully improves describing what is returned.
-
Aaron Faanes authored
This commit adds a bit more detail on the lifecycle of a signal.
-
Aaron Faanes authored
This patch takes Kristian's comments into account, adding a demonstration and giving a more thorough idea of how wl_listener is used.
-
- 11 Sep, 2013 2 commits
-
-
Rob Bradford authored
A version of wl_resource_for_each that is safe for iteration when items in the list are removed.
-
Aaron Faanes authored
-
- 19 Aug, 2013 1 commit
-
-
Jason Ekstrand authored
This commit adds support for server-side languages bindings. This is done in two ways: 1. Adding a wl_resource_set_dispatcher function that corresponds to wl_resource_set_interface. The only difference between the two functions is that the new version takes a dispatcher along with the implementation, data, and destructor. This allows for runtime calling of native language functions for callbacks instead of having to generate function pointers. 2. Adding versions of wl_resource_post_event and wl_resource_queue_event that take an array of wl_argument instead of a variable argument list. This allows for easier run-time argument conversion and removes the need for libffi-based calling of variadic functions. Signed-off-by:
Jason Ekstrand <jason@jlekstrand.net>
-
- 12 Aug, 2013 1 commit
-
-
Rob Bradford authored
This macro allows you to correctly iterate through a list of resources handling the opaque nature of this type.
-
- 06 Aug, 2013 1 commit
-
-
Tomeu Vizoso authored
-
- 09 Jul, 2013 1 commit
-
-
Kristian Høgsberg authored
This patch introduces wl_global_create() and wl_global_destroy() as replacements for wl_display_add_global() and wl_display_remove_global(). The add/remove_global API did not allow a compositor to indicate the implemented version of a global, it just took the version from the interface meta data. The problem is that the meta data (which lives in libwayland-server.so) can get out of sync with a compositor implementation. The compositor will then advertise a higher version of a global than what it actually implements. The new API lets a compositor pass in a version when it registers a global, which solves the problem. The add/remove API is deprecated with this patch and will be removed.
-
- 02 Jul, 2013 4 commits
-
-
Kristian Høgsberg authored
The wl_client_add/new_object() functions sends out an NO_MEMORY error if the allocation fails. This was convenient in a couple of places where that was all the error handling that was needed. Unfortunately that looks like out-of-memory isn't handled at the call site and set a bad precedent for not cleaning up properly or not handling at all. As we're introducing wl_resource_create() as a replacement for those two functions, let's remove the automatic error event posting and require the caller to do that if necessary. This commit also introduces a new helper, wl_client_post_no_memory() to make it possible to send NO_MEMORY events from bind where we don't have a wl_resource.
-
Kristian Høgsberg authored
-
Jason Ekstrand authored
A new function, wl_resource_create(), lets the compositor create a wl_resource for a given version of the interface. Passing 0 for the object ID will allocate a new ID. The implementation, user data and destructor can be set with wl_resource_set_implementation(). These two functions deprecates wl_client_add/new_object and the main difference and motivation is the ability to provide a version number for the resource. This lets the compositor track which version of the interface a client has created and we'll use that to verify incoming requests. Signed-off-by:
Jason Ekstrand <jason@jlekstrand.net>
-
Kristian Høgsberg authored
With the work to add wl_resource accessors and port weston to use them, we're ready to make wl_resource and wl_object opaque structs. We keep wl_buffer in the header for EGL stacks to use, but don't expose it by default. In time we'll remove it completely, but for now it provides a transition paths for code that still uses wl_buffer. Reviewed-by: Jason Ekstrand<jason@jlekstrand.net>
-
- 21 Jun, 2013 3 commits
-
-
Jason Ekstrand authored
This commit also has the effect of making wl_shm_buffer no longer a wl_buffer derivative. Signed-off-by:
Jason Ekstrand <jason@jlekstrand.net>
-
Jason Ekstrand authored
This commit does not break ABI. It merely changes the types of some things and adds a wl_shm_buffer_get function. Signed-off-by:
Jason Ekstrand <jason@jlekstrand.net>
-
Jason Ekstrand authored
Signed-off-by:
Jason Ekstrand <jason@jlekstrand.net>
-
- 14 Jun, 2013 1 commit
-
-
Jason Ekstrand authored
Signed-off-by:
Jason Ekstrand <jason@jlekstrand.net>
-
- 07 Jun, 2013 1 commit
-
-
Kristian Høgsberg authored
-
- 05 Jun, 2013 1 commit
-
-
Jason Ekstrand authored
This is the first step towards making wl_resource an opaque pointer type. Signed-off-by:
Jason Ekstrand <jason@jlekstrand.net>
-
- 08 May, 2013 1 commit
-
-
Kristian Høgsberg authored
This struct was only defined in the server API for the purpose of the input structs and helper functions. Now that those are gone we can dro it.
-
- 07 May, 2013 1 commit
-
-
Kristian Høgsberg authored
Looking at the functionality in the server library, it's clear (in hindsight) that there are two different "things" in there: 1) The IPC API, that is, everything that concerns wl_display, wl_client, wl_resource and 2) and half-hearted attempt at sharing input code and focus logic that leaves a lot of problematic structs in the API surface, only to share less than 1000 lines of code. We can just move those input structs and helper functions into weston and cut libwayland-server down to just the core server side IPC API. In the short term, compositors can copy those structs and functions into their source, but longer term, they're probably better off reimplementing those objects and logic their native framework (QObject, GObject etc).
-
- 03 Apr, 2013 1 commit
-
-
Rob Bradford authored
Add a destroy listener so that when the current surface associated with the pointer is destroyed we can reset the pointer to the current surface. In order to achieve this add a wl_pointer_set_current() which handles assigning the surface and creating the listener. This resolves a use-after-free error triggered with nested popup surfaces Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=696946
-
- 02 Apr, 2013 1 commit
-
-
Giulio Camuffo authored
use the wl_notify_func type, and not void *, or else wl_signal_get will not be usable by a c++ plugin because it will not cast void * to a function pointer.
-
- 19 Mar, 2013 1 commit
-
-
Jason Ekstrand authored
This commit adds a wl_resource_init function for initializing wl_resource structures similar to wl_client_add_object. From this commit forward, wl_resource structures should not be initialized manually, but should use wl_resource_init. In the event of a change to the wl_resource structure, this allows us to protect against regressions by filling in added fields with reasonable defaults. In this way, while changing wl_object or wl_resource still constitutes an ABI break, compositors following this rule will only need to be recompiled in order to properly link against the new version. Signed-off-by:
Jason Ekstrand <jason@jlekstrand.net>
-
- 15 Jan, 2013 1 commit
-
-
Jason Ekstrand authored
-
- 11 Jan, 2013 1 commit
-
-
Jason Ekstrand authored
Added a destroy signal to the wl_display object.
-
- 15 Oct, 2012 1 commit
-
-
Matt Roper authored
Touch grabs allow the compositor to be placed into a mode where touch events temporarily bypass their default behavior and perform other operations. Wayland already supports keyboard and pointer grabs, but was lacking corresponding touch support. The default touch grab handlers here contain the client event delivery code that was previously called directly in weston. Signed-off-by:
Matt Roper <matthew.d.roper@intel.com>
-