summaryrefslogtreecommitdiffstats
path: root/protocol
Commit message (Collapse)AuthorAgeFilesLines
* protocol: add better description of wl_pointer.releaseMarek Chalupa2015-03-301-1/+7
| | | | | | | | | Add note about what all wl_pointer.release does. Mainly that it destroys the proxy object, so programmer must not call wl_pointer_destroy() on the pointer any further. Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Spelling fixes (cosmetic)Bryce Harrington2015-03-191-2/+2
| | | | | | | | | | | | | | | | A few typos in comments and protocol docs, no code changes. ./src/wayland-util.h:281: recieved ==> received ./src/wayland-client.c:115: occured ==> occurred ./src/wayland-client.c:156: occured ==> occurred ./tests/test-compositor.c:76: parallely ==> parallelly ./tests/test-compositor.c:474: recieve ==> receive ./protocol/wayland.xml:1767: layed ==> laid ./protocol/wayland.xml:2112: dependant ==> dependent ./doc/publican/sources/Client.xml:25: recieved ==> received Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Bill Spitzak <spitzak@gmail.com>
* protocol: Change wording of subsurface placement schedulingJonas Ådahl2015-03-041-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Change wording to be more consistent with other parts of the subsurface protocol. Before this change, wl_subsurface.set_position explicitly stated that the new state was to be applied on the parents wl_surface.commit and wl_subsurface.place_above/below only said "on the next commit of the parent surface". What "committed" means is ambiguous considering that a wl_surface.commit actually defers the actual commit when in synchronized mode, but the intention has always been that placement of a subsurface should be considered part of its content, i.e. placement state should be applied when other state (buffer, regions). This patch makes that more clear. Note that prior to this patch, one could correctly have interpreted the protocol meaning that placements operations takes effect explicitly on wl_surface.commit of the parent surface no matter whether other state of the parent surface is applied at that point. This patch clarifies that that is not the case. https://bugs.freedesktop.org/show_bug.cgi?id=88857 Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Acked-by: Jasper St. Pierre <jstpierre@mecheye.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* wayland.xml: fixed a typoHardening2015-02-251-1/+1
|
* protocol: Clarify selection data offer destruction requirementJonas Ådahl2015-01-231-1/+3
| | | | | | | | Clarify that a client receiving a wl_data_device.selection event must destroy the data_offer of the previous wl_data_device.selection event, if any. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
* protocol: Fix typo in wl_data_offerJonas Ådahl2015-01-231-1/+1
| | | | Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
* Protocol : Added destructor to wl_data_device interfacekabeer khan2014-11-041-2/+10
| | | | | | | | [Pekka Paalanen: removed trailing whitespace, adjust bz link.] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=81745 Signed-off-by: kabeer khan <kabeer.khan@samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* protocol: define error codes for role reassignmentPekka Paalanen2014-10-081-3/+19
| | | | | | | | | | | | | | | | On the interfaces where it was missing: - wl_data_device - wl_shell - wl_pointer add an error code for requests that set a wl_surface role when the wl_surface already has a different role. This is needed for compositors to appropriately report wl_surface role violations. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Acked-by: Jason Ekstrand <jason.ekstrand@intel.com>
* protocol: wl_shell.get_shell_surface gives a rolePekka Paalanen2014-10-011-1/+2
| | | | | | | Now that we have defined "role", use the term. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
* protocol: wl_subcompositor.get_subsurface gives a rolePekka Paalanen2014-10-011-3/+3
| | | | | | | | | | Reword the conditions to make use of the definition of "role". It is still forbidden to create more than one wl_subsurface for a wl_surface at a time. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
* protocol: wl_data_device.start_drag may give a rolePekka Paalanen2014-10-011-1/+2
| | | | | | | Now that we have defined "role", use the term. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
* protocol: wl_pointer.set_cursor gives a rolePekka Paalanen2014-10-011-1/+4
| | | | | | | Now that we have defined "role", use the term. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
* protocol: define the concept of wl_surface rolePekka Paalanen2014-10-011-2/+31
| | | | | | | | | | | | | | | | | | | | Define what a role is, and what restrictions there are. A change to existing behaviour is that a role cannot be changed at all once set. However, this is unlikely to cause problems, as there is no reason to re-use wl_surfaces in clients. v2: give more concrete examples of roles, define losing a role, Jasper rewrote the paragraph on how a role is set. v3: make role permanent, there is no such thing as "losing a role". Re-issuing the same role again must be allowed for wl_pointer.set_cursor et al. to work. v4: clarify the semantics of destroying a role object. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
* wl_surface: clarify the base of time passed in the callback of frameRyo Munakata2014-08-211-1/+1
| | | | | Signed-off-by: Ryo Munakata <ryomnktml@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* protocol: add repeat_info event to wl_keyboardJonny Lamb2014-07-251-2/+26
| | | | | | | | | | In the process wl_keyboard's version has been incremented. Given clients get the wl_keyboard from wl_seat without a version, wl_seat's version has also been incremented (wl_seat version 4 implies wl_keyboard version 4). earlier Acked-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
* protocol: remove redundant 'the' in descriptionSilvan Jegen2014-06-181-2/+2
| | | | Signed-off-by: Silvan Jegen <s.jegen@gmail.com>
* protocol: add wl_surface errors enum for bad scale and transform valuesJonny Lamb2014-06-031-0/+15
|
* protocol: Fix order of wl_pointer, wl_keyboard and wl_touch messagesJonas Ådahl2014-05-091-12/+19
| | | | | | | | | | The "release" message of wl_pointer, wl_keyboard and wl_touch introduced in version 3 was placed first in the respective interface XML element, causing wayland-scanner to misbehave and set the version number of the "release" message to all subsequent messages with no explicitly specified "since" version. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
* shm: Disallow shrinking shm poolsKristian Høgsberg2014-04-071-1/+2
| | | | | | | Unused shm space will be automatically reclaimed if unused or can be explicitly returned by using fallocate FALLOC_FL_PUNCH_HOLE. https://bugs.freedesktop.org/show_bug.cgi?id=74632
* protocol: Document how clients are supposed to get the xkb keycodeRui Matos2014-04-011-1/+2
| | | | | This encodes what everyone is doing and avoids other implementers having to guess.
* protocol: try to clarify frame callback semanticsPekka Paalanen2014-03-111-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "the callback event will arrive after the next output refresh" is wrong, if you interpret "output refresh" as framebuffer flip or the moment when the new pixels turn into light the first time. Weston has probably never worked this way. Weston triggers the frame callbacks when it submits repainting commands to the GPU, which is before the framebuffer flip. Strike the incorrect claim, and the rest of the paragraph which no longer offers useful information. As a replacement, expand on the "throttling and driving animations" characteristic. The main purpose is to let clients animate at the display refresh rate, while avoiding drawing frames that will never be presented. The new claim is that the server should give some time between triggering frame callbacks and repainting itself, for clients to draw and commit. This is somewhat intimate with the repaint scheduling algorithm a compositor uses, but hopefully the right intention. Another point of this update is to imply, that frame callbacks should not be used to count compositor repaint cycles nor monitor refresh cycles. It has never been guaranteed to work. Removing the mention of frame callback without an attach hopefully discourages such use. v2: Don't just remove a paragraph, but add useful information about the request's intent. v3: Specify the order of posting frame callbacks. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Cc: Axel Davy <axel.davy@ens.fr> Cc: Jason Ekstrand <jason@jlekstrand.net>
* build: Move protocol/ Makefile.am into toplevel Makefile.amKristian Høgsberg2014-02-181-1/+0
| | | | A small step towards non-recursive build system for wayland too.
* build: Stop using xmllint to validate protocol filesKristian Høgsberg2014-02-181-13/+0
| | | | | | | Same reason as commit cd31275f28b0a04d2ec5426dc81e875197b47e52 from weston: The scanner needs to be good enough. If it crashes or fails to report invalid input, that needs to get fixed.
* protocol: when buffer transform and scale changePekka Paalanen2014-02-091-0/+9
| | | | | | | | | Clarify when the pending and current buffer transform and scale values change, and what exactly happens on commit. This matches what Weston currently does. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* protocol: Fix build1.4Jasper St. Pierre2014-01-311-3/+4
| | | | | | "data" is the name of the void* argument in the implementation. While we probably shouldn't use such an easily-collidable name, just rename the callback's argument to callback_data for now.
* protocol: Fix documentation for the parameter of wl_callbackJasper St. Pierre2014-01-311-1/+5
| | | | | | The parameter here is an opaque integer, rather than the event serial. The "frame" callback uses this to pass the current time of day in milliseconds.
* protocol: Fix the name of the registry argumentJasper St. Pierre2014-01-311-1/+1
| | | | A simple copy-paste typo.
* protocol: Clarify semantics of wl_subsurface.set_positionJonas Ådahl2014-01-191-0/+4
| | | | | | | | Make it clear that multiple requests before commit are allowed and how it is handled. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
* protocol: Clarify semantics of sub-surface placement requestsJonas Ådahl2014-01-191-2/+3
| | | | | | | | Clarify some semantics of wl_subsurface.place_below and wl_subsurface.place_below that were not specified. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
* Update .gitignore for protocol/Jasper St. Pierre2013-11-191-0/+1
|
* protocol: add sub-surfaces to the corePekka Paalanen2013-11-151-0/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sub-surface protocol was originally committed into Weston on May 10th, 2013, in commit 2396aec6842c709a714f3825dbad9fd88478f2e6. The design for the protocol had started in the beginning of December 2012. I think it is high time to move this into the core now. This patch copies the sub-surface protocol as it was in Weston on Nov 15th, 2013, into Wayland. Weston gets a patch to remove the protocol from there. Sub-surface is a wl_surface role. You create a wl_surface as usual, and assign it the sub-surface role and a parent wl_surface. Sub-surfaces are an integral part of the parent surface, and stay glued to the parent. For window management, a window is the union of the top-level wl_surface and all its sub-surfaces. Sub-surfaces are not clipped to the parent, and the union of the surface tree can be larger than the (top-level) wl_surface at its root. The representative use case for sub-surfaces is a video player window. When the video content is given its own wl_surface, there is no need to modify the video frame contents after decoding or copy them into a whole window sized buffer before submitting it to the compositor. This allows efficient, zero-copy video presentation paths, where video decoding hardware produces a (YUV) buffer, which eventually ends up in a (YUV-capable) hardware overlay and is scanned out directly. This can also be used for zero-copy presentation of windowed OpenGL content, where the OpenGL rendering engine does not need to draw or avoid window decorations. Sub-surfaces allow mixing different buffer types into the same window, e.g. software-rendered decorations in wl_shm buffers, and live content in EGL-based buffers. However, the sub-surface extension does not offer clipping or scaling facilities, or accurate presentation timing. Those are topics for additional extensions. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* protocol: validate the protocol against a dtdPeter Hutterer2013-10-252-1/+43
| | | | | | | | | The scanner is not very forgiving if the protocol doesn't match it's expectations and crashes without much of a notice. Thus, validate the protocol against a DTD. Move the protocol subdir forward so we validate first before trying anything else, and install the DTD so we can validate weston's protocols as well.
* protocol: Fix typo in documentation1.3José Bollo2013-10-111-1/+1
|
* Export the Wayland protocol XML fileJason Ekstrand2013-09-211-1/+1
| | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
* protocol: Add release requests for wl_pointer, wl_keyboard, and wl_touchKristian Høgsberg2013-08-301-4/+16
| | | | | | | | | | | We missed destroy requests in the 1.0 protocol and since the scanner generates local-only *_destroy requests in that case we can't add destroy requests without breaking protocol. A client needs to verify that the server provides a version 3 seat to use the protocol destructor so the name needs to be something else than wl_*_destroy. v2 (Rob Bradford): Rebased, bumped the protocol versions and added since attributes to the requests.
* protocol: Improve a bit of grammar for wl_surface::attach descriptionBryce W. Harrington2013-08-121-2/+2
| | | | Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
* protocol: Fix pluralization of user in popup_done descriptionBryce W. Harrington2013-08-081-1/+1
| | | | Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
* protocol: Improve grammar for set class descriptionBryce W. Harrington2013-08-081-3/+3
| | | | Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
* protocol: Add missing d to 'x an y'Bryce W. Harrington2013-08-081-2/+2
| | | | Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
* protocol: Fix typo by removing a redundant 'a'Bryce W. Harrington2013-08-081-1/+1
| | | | Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
* protocol: Copy missing pixel formats from wl_drm to wl_shmTomeu Vizoso2013-07-291-1/+64
|
* protocol: add no_keymap format to keymap formatsRob Bradford2013-06-281-0/+2
| | | | | | | | This format is used to specify that the key button events received are not in relation to any key map and that the codes should be interpreted directly. v2: Use zero for the no keymap enum value and enhance the documentation for the enum entry.
* protocol: Add missing since attribute for name event on wl_seatRob Bradford2013-06-141-1/+1
| | | | This event was added in version 2 of the protocol.
* protocol: Move new name event below existing requests and events and version itKristian Høgsberg2013-06-051-9/+12
| | | | | Missed v2 of Robs patch that already did this based on feedback from Ander and Daniel.
* protocol: Add a name event to give seat nameRob Bradford2013-06-051-1/+10
| | | | | This provides the ability for a client to differentiate events from different seats in a multiple seat environment.
* protocol: Modes are specified in HW pixelsAlexander Larsson2013-05-281-9/+21
| | | | | | | | | | | | | | | | | | | | | | Modes are mainly meant to be used in coordination with fullscreen in DRIVER mode, by e.g. games. For such games what they generally want is to match some hardware mode and resize their window for that. We don't really need to complicate this with the scaling. So, we keep the resolutions in HW pixels, and drop the SCALED flag (as it is now useless). This lets you just create e.g an 800x600 buffer of scale 1 and fullscreen that, ignoring the output scaling factor (although you can of course also respect it and create a 400x300 surface at scale 2). Conceptually the mode change is treated like a scaling which overrides the normal output scale. The only complexity is the FILL mode where it can happen that the user specifies a buffer of the same size as the screen, but the output has scale 2 and the buffer scale 1. Just scanning out this buffer will work, but effectively this is a downscaling operation, as the "real" size of the surface in pels is twice the size of the output. We solve this by allowing FILL to downscale (but still not upscale).
* protocol: Use signed int for scale valuesAlexander Larsson2013-05-281-2/+2
| | | | | We usually use signed ints for things like this, to avoid issues C sign coersion.
* protocol: Support scaled outputs and surfacesAlexander Larsson2013-05-221-14/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the wl_surface.set_buffer_scale request, and a wl_output.scale event. These together lets us support automatic upscaling of "old" clients on very high resolution monitors, while allowing "new" clients to take advantage of this to render at the higher resolution when the surface is displayed on the scaled output. It is similar to set_buffer_transform in that the buffer is stored in a transformed pixels (in this case scaled). This means that if an output is scaled we can directly use the pre-scaled buffer with additional data, rather than having to scale it. Additionally this adds a "scaled" flag to the wl_output.mode flags so that clients know which resolutions are native and which are scaled. Also, in places where the documentation was previously not clear as to what coordinate system was used this was fleshed out. It also adds a scaling_factor event to wl_output that specifies the scaling of an output. This is meant to be used for outputs with a very high DPI to tell the client that this particular output has subpixel precision. Coordinates in other parts of the protocol, like input events, relative window positioning and output positioning are still in the compositor space rather than the scaled space. However, input has subpixel precision so you can still get input at full resolution. This setup means global properties like mouse acceleration/speed, pointer size, monitor geometry, etc can be specified in a "mostly similar" resolution even on a multimonitor setup where some monitors are low dpi and some are e.g. retina-class outputs.
* protocol: Allow output changes to be treated atomicallyAlexander Larsson2013-05-221-1/+11
| | | | | | This add a wl_output.done event which is send after every group of events caused by some property change. This allows clients to treat changes touching multiple events in an atomic fashion.
* protocol: revert hotspot_x/y in set_cursor back to int1.1Peter Hutterer2013-04-181-2/+2
| | | | | | copy/paste error introduced in 9c0357af6ee42c318ce37b458ae7bdb7d51316cb Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>