summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* compositor-wayland: split wayland_output_create_for_configBenoit Gschwind2016-05-041-36/+68
| | | | | | | | | | | | | The splitting intend to separate configuration parsing from output setup. Introduces struct weston_wayland_backend_output_config. Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> [Pekka: squashed "wayland-backend: define output configuration structure" into this.] [Pekka: fix fullscreen output scale back to 1.] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor-wayland: move config parsing in create_cursorBenoit Gschwind2016-05-041-13/+19
| | | | | | | | Move configuration parsing from create_cursor to backend_init. Use newer configuration structure to initialize the cursor in create_cursor. Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor-wayland: use new config struture to create backendBenoit Gschwind2016-05-041-7/+6
| | | | | Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor-wayland: fix memory leak of display_nameBenoit Gschwind2016-05-041-0/+2
| | | | | Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor-wayland: create a basic config structure to use in new init APIBenoit Gschwind2016-05-041-14/+23
| | | | | Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* libinput: Remove unused static valuesDaniel Stone2016-05-041-3/+0
| | | | | | | default_seat and default_seat_name are not used anywhere in this file. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* weston.pc: Properly specify Requires.privateQuentin Glidic2016-05-041-0/+1
| | | | | | | | | | We include wayland-server.h, pixman.h and xkbcommon.h in compositor.h, but they are not required for linking if the plugin doesn’t use them. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Daniel Stone <daniels@collabora.com>
* compositor.h: Add shell_interface.get_output_work_areaQuentin Glidic2016-05-031-0/+1
| | | | | | | | This will allow plugins to be aware of e.g. panels, to avoid covering them with other surfaces. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* x11: Fix incorrect output counting logicBryce Harrington2016-05-031-1/+1
| | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
* x11: port the x11 backend to the new init apiBenoit Gschwind2016-05-033-104/+261
| | | | | | | | | | | | | | | | | Use a "well" defined structure to configure x11-backend and move configuration file parsing inside the weston compositor code. Enforce destruction of all backend config objects after initialization. Since the backend config struct versioning implies that there we expect potential future descrepancy between main's definition of the config object and the backend's, don't allow the backend to hang onto the config object outside the initialization scope. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net> Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
* headless-backend: fix leak of transform configurationBenoit Gschwind2016-05-021-3/+7
| | | | | | | Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> [Pekka: fixed the mispelling in subject] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor: Hyphenate compound adjective surface-localYong Bakos2016-04-291-1/+1
| | | | | | | See https://lists.freedesktop.org/archives/wayland-devel/2016-April/028249.html. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* fbdev-backend: refactor configuration APIBenoit Gschwind2016-04-293-37/+117
| | | | | | | | | | | | Implement a "well" defined API to configure the fbdev backend. Following and according to discussion about libweston API The output transform configuration is moved into weston and added to the fbdev configuration structure. Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> [Pekka: squashed two patches and rebased.] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor-fbdev: make copy of the device stringPekka Paalanen2016-04-291-5/+8
| | | | | | | | | | | | | Ensuring that the pointer to the device path stays valid gets harder and harder with migrating to the libweston-style config handling. Therefore, make a copy of the string, private to struct fbdev_output. Now the pointer passed in to fbdev_output_create() could be freed right after the call returns. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net>
* linux-dmabuf: Keep checking planes even if the first doesn't support lseekDerek Foreman2016-04-261-1/+1
| | | | | | | | If we break; when lseek fails we can fail to do some legitimate tests on remaining planes in a multi-plane buffer. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
* compositor-rdp: refactor configuration APIBenoit Gschwind2016-04-253-45/+134
| | | | | | | | | | Implement a "well" defined API to configure the rdp backend. Following according to discution about libweston API. Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: David FORT <rdp.effort@gmail.com> [Pekka: added missing headers to Makefile.am] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* input: Don't try to send axis_source when there are no resourcesJonas Ådahl2016-04-221-0/+3
| | | | | | | | | | | The focus_client pointer may be NULL here if the focused client has no pointer resources. To avoid a crash, NULL check focus client before proceeding to send the events. https://bugs.freedesktop.org/show_bug.cgi?id=94899 Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
* data-device: Update current action even if source version is oldJonas Ådahl2016-04-221-10/+12
| | | | | | | | | | | | | | If the version of the source object is old enough to not have wl_data_source.set_actions() the current action would never be updated since source->set_actions would never be set. To fix this, instead of checking whether source->set_actions before proceeding with updating the current action, just always update the action when we know all parts are valid dnd data device objects. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com> Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
* headless: port the headless backend to the new init apiBenoit Gschwind2016-04-183-44/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | refactor configuration API of headless-backend Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> v6: - Define version number in the header - Don't use leading underscores in header guards - Add stub config_init_to_defaults() - Allocate config on stack - Drop unused display_name parameter - Add error message when config is invalid - Install compositor-headless.h and list it in headless-backend sources v5: - Update to current trunk - Fixed typo 'struct weston_wayland_backend_config' - Dropped unused variables - Dropped weston_headless_backend_config_create() in favor of directly zalloc'ing the object - Dropped weston_headless_backend_load() in favor of the more generalized load_backend_new(). - Dropped typedef from header - Restored use of 'backend_init' entry point - Backend_init() takes a base weston_backend_config object - Renamed 'param' to 'config' in a few places for consistency - Renamed 'headless_options' variable to 'options for consistency - Version the base struct - Free config on error - Don't free config during backend_init normal operations - Adjust header ordering - Make header guard naming consistent with other headers - Light reformatting for code style and consistency with other backend config patches Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> [Pekka: rebased to apply before drm and x11 backends] [Pekka: squashed in the headless part of "Enforce destruction of all backend config objects after initialization"] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* main: document load_backend_new()Bryce Harrington2016-04-181-1/+14
| | | | | | | | Split from the patch "Enforce destruction of all backend config objects after initialization". Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Revert 'main: Remove unused function load_backend_new()'Bryce Harrington2016-04-181-0/+17
| | | | | | | | | This reverts commit 5ffbfffaf7758c33791978516d0a1100773b85e2. Restore load_backend_new() for use with libweston backend configuration. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor: Version the backend configuration structuresBryce Harrington2016-04-181-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | With this struct versioning, it is possible to add new options without breaking the ABI, as long as all additions are made to the end of a struct and nothing existing is modified or removed. When things are added, the structure's size will increase, and we'll use this size as our minor version number. If existing things need to be changed, then the major version, struct_version, is incremented to indicate the ABI break. From our call sites in main these major and minor version will be recorded as struct_version and struct_size. Each backend will then verify these against its own assumptions. So long as the backend's struct is equal or larger than what was passed in and the major versions are equal, we're good; but if it is larger, then this is a fatal error. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> v6: - Document refs for alternatives/assumptions for backend configs v5: - Move the header changes to a pre-requisite patch from the drm backend Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> [Pekka: bring back the archive links Bryce looked up.] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor: Drop unneeded create_output callbackBryce Harrington2016-04-181-8/+0
| | | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* drm: Spelling fix in commentBryce Harrington2016-04-181-1/+1
| | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
* systemd: take over sockets created by systemdFriedrich, Eugen (ADITG/SW1)2016-04-061-0/+45
| | | | | | | | | | | | | | | | Systemd provides a feature of socket-based activation, details in [1] This commit adds an implementation to check if sockets were provided by systemd and adds this as an additional socket to wayland display. before adding sockets are checked for the correctness: only AF_UNIX of type SOCK_STREAM are accepted This is usefull for early rendering use-cases where weston and early-rendering-application can be started parallel. [1] https://www.freedesktop.org/software/systemd/man/systemd.socket.html Signed-off-by: Eugen Friedrich <efriedrich@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor: remove input_loopPekka Paalanen2016-03-242-39/+0
| | | | | | | | | | | | | Remove the input event loop. After "compositor-x11: stop using input_loop", the input event loop is completely unused. The code was also broken because it did not account for multiple outputs with independent repaint cycles. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* compositor-x11: stop using input_loopPekka Paalanen2016-03-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | X11 is the only backend that still used the input event loop. This patch is an identical rewrite of 6deb09ef8a72164947cdfa5f2414e292c7672c9c which was then reverted in 3bebe6461a9de5d8c5c7da0261c70cd250fa1fde for reasons unrecorded. This patch is also the revert of 22ba60e514e074e4bdee1529aa8d22600712f001. Originally input devices were moved into their own event loop in 7ea10864c2fc7370f5ada88a3fc91ab5f188da00 and the reason for that is explained in 7dbf5e2ea744bde56b65ba45b935b77df4a783e1. The idea behind the input event loop was that it would be beneficial to process and relay input events to clients just once during an output repaint cycle, because clients cannot update the image on screen any faster anyway. All input events also carry a timestamp, so we didn't lose any timing information. This was supposed to save power by reducing the process wake-ups and context switches. There was also a mention of reducing lag. However, the concept of an output repaint loop does not really work out when you have several outputs, but the input devices are not exclusive to a certain output. The logic for driving the input event loop in Weston core was written to assume a single output. When you have multiple outputs with independent repaint cycles, the input event loop handling becomes fairly random, one output freezes input while another output thaws it, etc. The DRM backend stopped using the input event loop when it started using the libinput input backend, which became the default in 3f5e906268448f2d84b115c5f3d22165ce0021b1, and the old code was finally ripped out in 823ad33ef34fa32b14b300d987fb9d2e2a42e9c4. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* input: use doubles in the interfaces to notify of input eventsGiulio Camuffo2016-03-238-78/+86
| | | | | | | | | | | | This patch is a further step in the wl_fixed_t internal sanitization. It changes the notify_* functions to take doubles instead of wl_fixed_t but does not change how these are stored in the various input structs yet, except for weston_pointer_axis_event. However this already allows to remove all wl_fixed_t usage in places like the libinput or the x11 backend. Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor-drm: Renaming of gbm fieldsMiguel A. Vico2016-03-221-29/+29
| | | | | | | | | | | | | | | In preparation for follow-on changes to support frame presentation through EGLDevice+EGLOutput, this change includes the following: - Rename drm_backend::format to gbm_format - Rename drm_output::format to gbm_format - Rename drm_output::surface to gbm_surface - Rename drm_output::cursor_bo to gbm_cursor_bo Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com> Reviewed-by: Andy Ritger <aritger@nvidia.com> Reviewed-by: Daniel Stone <daniels@collabora.com> [Pekka: trivial rebase out of the series] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* gl-renderer: Implement & use check_extensionMiguel A. Vico2016-03-221-14/+42
| | | | | | | | | | | | | | | Using strstr(3) for checking for extensions is an error-prone mechanism as extension names can be prefixes of other extension names (see https://www.opengl.org/registry/doc/rules.html#using). This change implements the check_extension() function to properly check for an extension and replaces all usages of strstr(3). Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com> Reviewed-by: Andy Ritger <aritger@nvidia.com> Reviewed-by: Daniel Stone <daniels@collabora.com> [Pekka: move 'bool' to the same line with 'static'] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* input: Implement wl_seat.releaseQuentin Glidic2016-03-171-0/+7
| | | | | | | | Avoid a crash because listener is NULL. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-By: David Fort <contact@hardening-consulting.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor-drm: fix memcmp using a bad pointer in drm_outout_choose_initial_modecomic fans2016-03-171-1/+1
| | | | | | | | | current_mode is already the pointer, taking the address of it is wrong. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94562 Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> [Pekka: rewrote the patch] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* protocol: migrate to stable presentation-time.xmlPekka Paalanen2016-03-079-40/+40
| | | | | | | | | | | | | | | | | | | | Remove the unstable presentation_timing.xml file, and use presentation-time.xml from wayland-protocols instead to generate all the Presentation extension bindings. The following renames are done according to the XML changes: - generated header includes - enum constants and macros prefixed with WP_ - interface symbol names prefixed with wp_ - protocol API calls prefixed with wp_ Clients use wp_presentation_interface.name rather than hardcoding the global interface name: presentation-shm, weston-info, presentation-test. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> [Pekka: updated wayland-protocols dependency to 1.2]
* libinput-device: Remove unnecessary function callChris Michael2016-02-261-2/+1
| | | | | | | | | | | When we handle keyboard key events, we already retrieve the key state at the top of this function, so there is no real need to call the same libinput function again as we can just reuse the 'key_state' variable that we have above. Signed-off-by: Chris Michael <cpmichael@osg.samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* libinput-device: Remove unnecessary function callChristopher Michael2016-02-191-1/+2
| | | | | | | | | | When we handle pointer button events, we already retrieve the button state at the top of this function, so there is no real need to call the same function again as we can just reuse the 'button_state' variable that we have above. Signed-off-by: Chris Michael <cpmichael@osg.samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* compositor-drm: the cursor plane only supports ARGBDerek Foreman2016-02-091-3/+9
| | | | | | | | | | Keep XRGB apps out of the cursor plane, only ARGB is supported. This prevents programs like weston-simple-shm from landing in the cursor plane and being misrendered. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor-drm: update internal cursor plane location when disabling cursorDerek Foreman2016-02-091-1/+4
| | | | | | | | | | | | | | | | When the cursor plane is disabled the kernel can lose its location. If we don't update our internal idea of where the plane is at that time, the next time we set a cursor it can show up at 0,0. This can show up when an application is put in the cursor plane, removed from the plane, then put back at the same location. It might show up at 0,0 when it's reinstated. We now use INT32_MIN as a location for disabled cursors so enabling the plane will always cause an update. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
* compositor-x11: send pointer frame after axis eventMarek Chalupa2016-02-091-0/+4
| | | | | | | | | | | clients that implement pointer interface of version 5 wait for the frame event, so without it the scrolling does not work (GTK+ clients do not scroll now for example). Xcb axis events are discrete, so it's fine to send frame after every single axis event Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
* input: Fix crash when touchscreen generates out of screen coordinateBryce Harrington2016-02-021-1/+4
| | | | | | | | | | | | | With change 61ed7b6b, global touch coordinates are being passed to the touch grab. However, touch->grab is undefined in certain circumstances such as when the touch screen raises an axis X value larger than the maximum expected. Move the check for this condition earlier, before our first use of the pointer. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=92736 Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
* data-device: Check harder for selection/non-wayland sourcesCarlos Garnacho2016-02-011-2/+6
| | | | | | | | | We're not always dealing with weston_data_sources that have a wl_resource, or data_sources that belong to drag-and-drop. Check harder for these on the drag-and-drop code paths triggered from common code. Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
* clipboard: zalloc the clipboard_sourceCarlos Garnacho2016-02-011-1/+1
| | | | | | | | | The wrapped weston_data_source struct has new fields which were left uninitialized, so its access is unreliable. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Derek Foreman <derekf@osg.samsung.com Tested-by: Derek Foreman <derekf@osg.samsung.com>
* input: Don't try to send pointer frames if no focus_clientDerek Foreman2016-02-011-0/+3
| | | | | | | | | Prevents a segfault when mousing into clients that don't get_pointer like weston-simple-shm and weston-simple-damage. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
* data-device: Implement compositor-chosen actionsCarlos Garnacho2016-01-192-0/+77
| | | | | | | | | | | | | | | | | | | | | | | Set up a keyboard grab during drag-and-drop, so we can translate modifiers into preferred actions. The compositor chosen action is stored in the current weston_data_source in order to make it accessible to the source/offer at the time of calculating the new action, but would conceptually be part of weston_drag. The mapping has been made similar to what GTK+/QT usually do, the shift key defaults to "move" and ctrl defaults to "copy". Changes since v2: - Use enum types and values for the compositor action. Fix code formatting issues. Changes since v1: - Handle the keyboard grab being cancelled. Initialize new wl_data_source fields. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* data-device: Implement DnD actionsCarlos Garnacho2016-01-192-4/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The policy in weston in order to determine the chosen DnD action is deliberately simple, and is probably the minimals that any compositor should be doing here. Besides honoring the set_actions requests on both wl_data_source and wl_data_offer, weston now will emit the newly added "action" events notifying both source and dest of the chosen action. The "dnd" client has been updated too (although minimally), so it notifies the compositor of a "move" action on both sides. Changes since v8: - Add back wl_data_offer.source_actions emission, gone during last code shuffling. Fix nits found in review. Changes since v7: - Fixes spotted during review. Add client-side version checks. Implement .action emission as specified in protocol patch v11. Changes since v6: - Emit errors as defined in DnD actions patch v10. Changes since v5: - Use enum types and values for not-a-bitfield stored values. handle errors when finding unexpected dnd_actions values. Changes since v4: - Added compositor-side version checks. Spaces vs tabs fixes. Fixed resource versioning. Initialized new weston_data_source/offer fields. Changes since v3: - Put data_source.action to use in the dnd client, now updates the dnd surface like data_source.target events do. Changes since v2: - Split from DnD progress notification changes. Changes since v1: - Updated to v2 of DnD actions protocol changes, implement wl_data_offer.source_actions. - Fixed coding style issues. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Michael Catanzaro <mcatanzaro@igalia.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* data-device: Implement DnD progress notificationCarlos Garnacho2016-01-192-16/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Weston now sends wl_data_source.dnd_drop_performed and .dnd_finished in order to notify about the different phases of DnD. wl_data_source.cancelled is also used as mentioned in the docs, being emitted also on DnD when the operation is meant to fail (eg. source and dest didn't agree on a mimetype). The dnd demo is also fixed so the struct dnd_drag isn't leaked. https://bugs.freedesktop.org/show_bug.cgi?id=91943 https://bugs.freedesktop.org/show_bug.cgi?id=91944 Changes since v6: - Add client-side version checks. Minor code shuffling. Changes since v5: - Dissociate source and offer after cancel. Updated to apply on top of c9f8f8a7f. Changes since v4: - Make wl_data_offer.finish with the wrong state an error. Changes since v3: - Fixed wl_data_source.dnd_finished vs cancelled emission on when interoperating with version < 3 drag destinations. Changes since v2: - Handle wl_data_offer.finish. Fixed commit log inconsistencies. Added version checks. Spaces vs tabs fixes. Fixed resource versioning. Changes since v1: - Updated to protocol v2. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Michael Catanzaro <mcatanzaro@igalia.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* Support axis source, axis discrete, frame and axis stop eventsPeter Hutterer2016-01-198-45/+325
| | | | | | | | [jonas: only send focus wl_pointer.frame if resource supports it] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
* Add a weston_pointer_axis_eventPeter Hutterer2016-01-199-42/+81
| | | | | | | | Use an event struct to pass axis events around. This helps dealing with the upcoming axis discrete changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* compositor-rdp: update link to wheel delta explanationPeter Hutterer2016-01-191-1/+1
| | | | | | | The previous one is a 404 now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* gl-renderer: Fix comment typoBryce Harrington2016-01-131-1/+1
|
* compositor: create_data_source(): Fix potential crash on OOMcpaul@redhat.com2016-01-131-2/+8
| | | | | | | | | | | Noticed this while working on primary selection, in the event we run out of memory when trying to create a new data source, there's a chance we'll fail on wl_resource_create() and crash from source->resource being set to NULL. Signed-off-by: Lyude <cpaul@redhat.com> Reviewed-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>