summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* server: Add an API to get the file descriptor for a clientSung-Jin Park2016-01-194-0/+47
| | | | | | | | | | | | | | | This adds an API to get the file descriptor for a client. The client file descriptor can be used for a wayland compositor to validate a request from a client if there are any additional information provided from the client's file descriptor. For instance, this will be helpful in some linux distributions, in which SELinux or SMACK is enabled. In those environments, each file (including socket) will have each security contexts in its inode as xattr member variable. A wayland compositor can validate a client request by getting the file descriptor of the client and by checking the security contexts associated with the file descriptor. Signed-off-by: Sung-Jin Park <input.hacker@gmail.com>
* Track protocol object versions inside wl_proxy.Jason Ekstrand2016-01-193-15/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides a standardized mechanism for tracking protocol object versions in client code. The wl_display object is created with version 1. Every time an object is created from within wl_registry_bind, it gets the bound version. Every other time an object is created, it simply inherits it's version from the parent object that created it. (comments and minor reformatting added by Derek Foreman <derekf@osg.samsung.com>) Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Second trivial commit squashed into this one: Authored by Derek Foreman <derekf@osg.samsung.com> Signed-off-by: Derek Foreman <derekf@osg.samsung.com> (it's literally one of code and a lot of comments) This sets wl_display's version (for proxy version query purposes) to 0. Any proxy created with unversioned API (this happens when a client compiled with old headers links against new wayland) will inherit this 0. This gives us a way for new libraries linked by old clients to realize they can't know a proxy's version. wl_display's version being unqueryable (always returning 0) is an acceptable side effect, since it's a special object you can't bind specific versions of anyway. Second half: Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* client: Fully flush during blocking dispatchJonas Ådahl2016-01-161-10/+29
| | | | | | | | | | | | | | wl_display_flush() may fail with EAGAIN which means that not all data waiting in the buffer has been flushed. We later block until there is data to read, which could mean that we block on input from the compositor without having sent out all data from the client. Avoid this by fully flushing the socket before starting to wait. This commit also changes the array length of the struct pollfd array from 2 to 1, as only one element was ever used. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* client: Use read preparation API in wl_display_dispatch_queue()Jonas Ådahl2016-01-161-35/+10
| | | | | | | | | | Instead of doing things that do the equivalent of using wl_display_prepare_read() and friends, just use the public API. The only semantical difference is that we will now unlock and lock the mutex more times compared to before. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* client: Don't make EPIPE fatal if triggered when flushingJonas Ådahl2016-01-161-5/+9
| | | | | | | | | | | If flushing hits EPIPE it should not make it a fatal error since it would make it impossible to process the rest of the data available in the buffer. Instead, let reading the socket make EPIPE fatal, letting the client have the possibility to process the last messages including any error causing the termination. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* client: Remove misplaced documentation about main loop intergrationJonas Ådahl2016-01-161-22/+0
| | | | | | | | | | | | There was documentation about how to integrate the display server file descriptor in the documentation about wl_display_dispatch_pending(). This is not the right place to put it, and it also had incorrect usage of the API (calling wl_display_dispatch_queue() on input on an unrelated fd) as an example. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com>
* client: Correct documentation regarding thread safenessJonas Ådahl2016-01-161-101/+60
| | | | | | | | | | | | | | | | | | | | The current documentation about wl_display_dispatch() states one may not mix wl_display_dispatch(_queue)() with wl_display_prepare_read() and friends, but this is a misconception about how wl_display_dispatch(_queue)() works. The fact is that the dispatch functions does the equivalent of what the preparation API does internally, and it is safe to use together. What is not safe is to dispatch using the wl_display_dispatch(_queue)() functions while being prepared to read using wl_display_read_events(). This patch rewrites the documentation to correctly state when the various API's are thread safe and how they may not be used. https://bugs.freedesktop.org/show_bug.cgi?id=91767 Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* server: Test for illegally low interface versions in wl_global_create()Derek Foreman2016-01-141-0/+7
| | | | | | | Any version lower than 1 is unreasonable. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* server: improve failure log message for wl_global_create()Derek Foreman2016-01-141-3/+4
| | | | | | | | | | | | | | The gratuitous %m jammed onto the end of the string prints errno concatenated with the word "version". I've removed the %m, and printed some additional information about the failure. Also, reversed the order of the expressions in the conditional to make it match the english in the log message. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* server: don't send an error to NULL display_resourceMarek Chalupa2016-01-131-1/+2
| | | | | | | | | | | | | | if display_resource = wl_resource_create() fails in bind_display(), we call wl_client_post_no_memory() which is wrong, since this function uses display_resource (which is NULL at this point). said simply: don't send an error to resource that you've just failed to create) https://bugs.freedesktop.org/show_bug.cgi?id=91356 Reported-by: Ashim <ashim.shah@samsung.com> Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* client: Add missing arg in a wl_log invocationVictor Berger2016-01-131-1/+1
| | | | | | | | Without this 'proxy' argument, the '%p' formatter prints a constant garbage value. Signed-off-by: Victor Berger <victor.berger@m4x.org> Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
* server: Calculate remaining data size after a closure is processedJaeyoon Jung2016-01-123-2/+12
| | | | | | | | | | | When processing a closure, data in the connection can be consumed again if the closure itself invokes extra event dispatch. In that case the remaining data size is also altered, so the variable len should be updated after the closure is processed. Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* doc: Fix incorrect parameter nameJonas Ådahl2016-01-121-1/+1
| | | | | | | Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* doc: Fix function membershipJonas Ådahl2016-01-122-7/+7
| | | | | | | | | | Put the various misplaced functions in the right class; partly because its where they belong, and partly to make intra-class \ref(erences) happy. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* Use zalloc instead of malloc + memsetJonas Ådahl2016-01-125-18/+15
| | | | | | | Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* scanner: Fail if 'since' is higher than the interface versionJonas Ådahl2016-01-121-1/+5
| | | | | | | | | | | If an event or request have a "since" attribute that is larger than the version of the interface it is in, fail with an explaining error message. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* scanner: Add missing bracketsJonas Ådahl2016-01-121-1/+2
| | | | | | | | | | | A statement was added at the same indentation level as the true branch of the if statement, but since there were no brackets, it would be executed independently of the result of the if condition. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* server: Add a socket with an existing fdBryce Harrington2015-12-182-0/+46
| | | | | | | | | | | | This adds functionality to allow system-level control over handing out file descriptors for sockets, to allow tighter security when running a Wayland compositor under a Wayland session server. Allows writing socket activated Wayland servers. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Cc: Sung-Jin Park <sj76.park@samsung.com> Cc: Sangjin Lee <lsj119@samsung.com>
* server: remove redundant includeMarek Chalupa2015-11-271-1/+0
| | | | | | | we don't use ffi in wayland-server.c Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* scanner: drop altmacro from dtddata.SPekka Paalanen2015-11-191-9/+8
| | | | | | | | | | | | | | | | Stop using .altmacro in dtddata.S, because clang does not yet implement it. Turns out that we do not actually seem to need it, and we can modify the syntax to work without it. Moving the double quotes from the binfile line to the .incbin line is required to avoid the assembler error "missing string". Instead of & we now use \() to mark the end of macro argument name. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92988 Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Tested-by: Víctor Jáquez <vjaquez@igalia.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
* Validate the protocol xml during scanningPeter Hutterer2015-11-172-0/+111
| | | | | | | | | | | | | | | | | | | | Embed the wayland.dtd protocol data into the scanner binary so we can validate external protocol files without requiring makefile changes. Hat-tip to Pekka Paalanen for the embedding trick. The embedding trick doesn't work well if the to-be-embedded file is in a different location than the source file, so copy/link it during configure and then build it in from the local directory. The current expat parser is not a validating parser, moving scanner.c to another parser has the risk of breaking compatibility. This patch adds libxml2 as extra (optional) dependency, but that also requires parsing the input twice. If the protocol fails validation a warning is printed but no error is returned otherwise. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* add wl_abort private functionMarek Chalupa2015-11-164-23/+24
| | | | | | | | | On many places in the code we use wl_log + abort or wl_log + assert(0). Replace these with one call to wl_abort, so that we don't mix abort(), assert(0) and we'll save few lines Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* event-loop: remove extra headerMarek Chalupa2015-11-161-1/+0
| | | | | | | we don't use assert() anywhere in this file, so remove #include <assert.h> Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* shm: wl_shm_buffer_get_data() requires a valid pool.Derek Foreman2015-11-061-4/+6
| | | | | | | | | There's no situation where a shm buffer without a pool makes sense, so we enforce the pool's existence a little more rigidly. Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
* shm: Move deprecated function to the bottom of the fileDerek Foreman2015-11-061-8/+17
| | | | | | | | | In wayland-server.c we group the deprecated functions and disable doxygen for them. Do that here too. Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
* shm: Deprecate wl_shm_buffer_create()Derek Foreman2015-11-062-29/+2
| | | | | | | | | | | | | From irc: <pq> it creates a wl_buffer object in a way that no client can ever access the storage. So, let's replace it with return NULL; and mark it with attribute deprecated in the header. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
* scanner: enforce correct argument type for enumsAuke Booij2015-11-041-0/+69
| | | | | | | | | | | | | | | | | | The scanner now checks whether arguments that have an associated <enum> have the right type. An argument with an enum attribute must be of type int or uint, and if the <enum> with that name has the bitfield attribute set to true, then the argument must be of type uint. Changes since v3: - Remove useless allow_null check - Switch to using bool - Clearer message on errorous input - Minor formatting fix Signed-off-by: Auke Booij <auke@tulcod.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Nils Chr. Brause <nilschrbrause@googlemail.com>
* cosmetic: fix incorrect whitespace.Jon Cruz2015-10-291-1/+1
| | | | | | | | | Fixed instance where spaces were used instead of tabs. Changes since v1: * rebased Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
* scanner: stop adding trailing whitespace to copyrightJon Cruz2015-10-261-1/+2
| | | | | | | | Generated code was unconditionally adding a space to lines in comments for copyright blocks even if the line was blank. Updated to not add trailing whitespace for blank lines. Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
* cosmetic: fix inconsistent code style with header prototypes.Jon Cruz2015-10-264-140/+328
| | | | | | | | A few of the header files had function prototypes that were not following project conventions, sometimes even in the same file. Corrected these to follow as per wayland-os.h. Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
* shm: Add shm_buffer ref and shm_pool unref functionsDerek Foreman2015-10-212-0/+49
| | | | | | | | | | | | | | | | | | | Sometimes the compositor wants to make sure a shm pool doesn't disappear out from under it. For example, in Enlightenment, rendering happens in a separate thread while the main thread can still dispatch events. If a client is destroyed during rendering, all its resources are cleaned up and its shm pools are unmapped. This causes the rendering thread to segfault. This patch adds a way for the compositor to increment the refcount of the shm pool so it can't disappear, and decrement it when it's finished. The ref/unref are asymmetrical (ref returns the pool) because it's possible the buffer itself will be gone when you need to unref the pool. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
* scanner: Generate 'since' macros for requests as wellJonas Ådahl2015-10-091-0/+1
| | | | | | | | | | We already generate WL_[INTERFACE]_[REQUEST]_SINCE_VERSION macros for events in the server protocol headers. Lets do the same for requests in the client protocol headers as well. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: David FORT <contact@hardening-consulting.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* client: Move prepare read documentation to .._prepare_read_queue()Jonas Ådahl2015-10-081-69/+61
| | | | | | | | | | In the documentation we refer to "an event queue" in various places and from the beginning it is unclear what event queue this means. So, instead of having a paragraph in the end mentioning this, move the detailed documentation to the function with the queue explicitly passed. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* client: Improve wl_display_roundtrip(_queue)() documentationJonas Ådahl2015-10-051-4/+12
| | | | | | | | | Change the wording a bit to describe how it is done (which explains to the name of the function) as well as a note about that we actually will dispatch events that are received. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* client: Be more clear about when one must call wl_display_flushJonas Ådahl2015-10-051-4/+4
| | | | | | | | Blocking in general is not what means it is required to flush, but blocking on input from the wl_display file descriptor. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* client: Reword and add documentation about the marshal functionsJonas Ådahl2015-10-051-5/+7
| | | | | | | | Some rewording to improve grammar a bit with some additions about the type expectations of va_list arguments. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* client: Fix minor grammar issueJonas Ådahl2015-10-051-1/+1
| | | | | Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* scanner: Close input resource when done to prevent leakBryce Harrington2015-10-051-0/+5
| | | | | | | | | | | | | | Addresses this error reported by Denis Denisov: [src/scanner.c:1415]: (error) Resource leak: input Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> v2: Also close input for other exit points in main. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: David FORT <contact@hardening-consulting.com>
* Revert "client: require WAYLAND_DISPLAY to be set"Pekka Paalanen2015-08-241-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fb7e13021730d0a5516ecbd3712ea4235e05d24d. Developers have been trying to reduce the number of by default required environment variables, and the mentioned commit is a step backwards in that sense. The fundamental assumption is that a user has only one main (Wayland) display server where all programs should connect to by default, and do so with an a priori known socket name. The commit also broke various use cases in the wild, some accidentally due to other causes, some intentionally. This revert allows those use cases to continue. The original problem of running Weston in a window in an existing GNOME X11 session and getting applications unintentionally launched into Weston can be circumvented by letting Weston use a non-default socket name, leaving wayland-0 unused. Discussion: http://lists.freedesktop.org/archives/wayland-devel/2015-August/023927.html http://lists.freedesktop.org/archives/wayland-devel/2015-August/023937.html Cc: Dima Ryazanov <dima@gmail.com> Cc: Giulio Camuffo <giuliocamuffo@gmail.com> Cc: Daniel Stone <daniel@fooishbar.org> Cc: Jasper St. Pierre <jstpierre@mecheye.net> Cc: Ryo Munakata <ryomnktml@gmail.com> Cc: Ray Strode <halfline@gmail.com> Cc: Peter Hutterer <peter.hutterer@who-t.net> Cc: Matthias Clasen <mclasen@redhat.com> Cc: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Ray Strode <rstrode@redhat.com> Acked-by: Dima Ryazanov <dima@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Acked-By: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Acked-By: Ryo Munakata <ryomnktml@gmail.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
* client: require WAYLAND_DISPLAY to be setDima Ryazanov2015-08-141-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although defaulting to wayland-0 seems convenient, it has an undesirable side effect: clients may unintentionally connect to the wrong compositor. Generally, it's safer to fail instead. Here's a real example: In Fedora 22, Gtk+ prefers Wayland over X11, though the default session is still a normal X11 Gnome session. When you launch a Gtk+ app, it will try Wayland, fail, then try X11, and succesfully start up. That works fine. Now suppose you launch Weston while running the Gnome session. Suddenly, all of the Gtk+ apps launched from Gnome will show up inside Weston instead. That's unexpected. There's also no good way to prevent that from happening (other than perhaps setting WAYLAND_DISPLAY to an invalid value when launching an app). Not using wayland-0 as the default will solve that problem: an app launched from the X11 Gnome session will use the X11 backend regardless of whether there's a wayland compositor running at the same time. Everything else should work as before. The compositor already sets the WAYLAND_DISPLAY when starting the session, so the lack of the default value should not make a difference to the user. Signed-off-by: Dima Ryazanov <dima@gmail.com> Acked-by: Pekka Paalanen <ppaalanen@gmail.com> Acked-by: Giulio Camuffo <giuliocamuffo@gmail.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Jasper St. Pierre <jstpierre@mecheye.net> Reviewed-by: Ryo Munakata <ryomnktml@gmail.com> [Pekka: dropped the wayland-server.c hunk, adjusted summary] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* wayland-client : Fix queue_release not to call proxy_destroyElvis Lee2015-08-061-4/+6
| | | | | | | | | proxy_destroy could be called twice by wl_proxy_destroy and wl_event_queue_release. Then, wl_map_remove was called twice for same object id. Signed-off-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* scanner: check sanity of versionMarek Chalupa2015-07-301-9/+30
| | | | | | | | scanner does not complain if we put into version attribute things like -1 1x 1:3 etc. Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* scanner: use zxallocMarek Chalupa2015-07-301-43/+40
| | | | | | | | | | | Use xzalloc instead of xmalloc. This allows us to get rid of manual initializing the memory to 0s and the code is shorter and cleaner Suggested by Bryce Harrington Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* scanner: get rid of leaksMarek Chalupa2015-07-301-4/+102
| | | | | | | | | | | | | | Free all the memory we have allocated during running. v2.: split creating objects and getting rid of leaks into two patches move check for NULL description into free_description v3.: rebase after previous patch fixes Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* scanner: refactor creating objectsMarek Chalupa2015-07-301-53/+111
| | | | | | | | | | | wrap creating and initializing objects (structures) into functions and use them in the code. v2. make create_.* functions consistent (no func will return NULL) Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* cosmetic: gratuitous whitespace changes in event-loop.cDerek Foreman2015-06-231-1/+1
| | | | | | Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* wayland-server: Fix style on multi-line commentBryce Harrington2015-06-121-2/+3
| | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
* src: Update boilerplate from MIT X11 license to MIT Expat licenseBryce Harrington2015-06-1218-288/+342
| | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* scanner: don't emit the extern declarations for external typesGiulio Camuffo2015-06-011-7/+3
| | | | | | | | | | | | | | | | | We were emitting the extern declarations of all types used in the protocol, even if not defined in it. This caused warnings to be produced when using the -Wredundant-decls compiler flag when building an extension that uses e.g. wl_surface. However we only need the extern declarations if the protocol defines a factory for those external interfaces. That is a bad design and can be however done by including the dependent protocol header first. So only emit the extern declarations for the types that the protocol actually defines, this restoring the behavior we were using in 1.7. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=90677 Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Tested-by: Arnaud Vrac <rawoul@gmail.com>
* remove trailing whitespacesMichael Vetter2015-05-151-1/+1
| | | | | Remove trailing whitespaces because they are not needed and jumping to the end of al ine should do just that and not jump to the whitespace.