summaryrefslogtreecommitdiff
path: root/protocol
Commit message (Collapse)AuthorAgeFilesLines
* text: Fix typoDerek Foreman2015-01-201-1/+1
| | | | | Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* protocol: add Presentation feedback flagsPekka Paalanen2015-01-201-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add the missing feedback flags to the Presentation extension protocol specification. These flags are slightly different from the previous RFCv3.1 definition: http://lists.freedesktop.org/archives/wayland-devel/2014-March/013598.html Now, all compositors are safe to use 0 as the flags if they don't bother setting them properly. 0 is the "worst case" with the least guarantees. The meaning of ZERO_COPY is not exactly the opposite of the old COPY flag. ZERO_COPY is more strict, but applies only to that one surface. Therefore it can be used to verify a zero-copy video playback pipeline, also to a hardware overlay. There is no longer a flag to clearly indicate if the final presentation was done by a copy or a page flip. ZERO_COPY forbids the copy, but VSYNC alone does allow copy in case it cannot tear. It is possible to have first a compositing pass, and then another copy into the frontbuffer, and still set VSYNC if it cannot tear. Usually "cannot tear" is too hard to guarantee with a copy, so it often implies a page flip. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com> Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
* text: Fix some typosDerek Foreman2014-12-151-2/+2
| | | | Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
* protocol: ivi hmi controller protocol to set up IVI style UINobuhiko Tanibata2014-12-041-0/+97
| | | | | | | | | | | | | | | - introduces ivi-hmi-controller.xml This protocol realizes following features, - UI ready - changing modes; tiling, side by side, full_screen, and random - Give control a surface; workspace to be controlled by using ivi layout APIs - Display/undisplay a surface; home contains sevaral workspaces to launch applications Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* protocol: add interface ivi_application extensionNobuhiko Tanibata2014-12-041-0/+99
| | | | | | | | | | | | | | | | | | | - introduces ivi-application.xml Many applications in an IVI-system are special single-purpose applications that have a very specific role in the whole IVI UI, for example a rear camera, speedometer, map, etc. The IVI system vendor specifies what these are and how they integrate into the UI. They also vary between particular IVI systems. This is why we use (system-)global, unique, pre-determined ID numbers to tell what wl_surface is which application, instead of writing specific shell requests for each one. Using ID numbers allows vendors to easily invent new component applications without extending or breaking the actual Wayland protocol. In IVI-systems, the ID is a standard concept already used in several APIs, with a vendor-specified global definition of ID assignments. Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* protocol: Fix some typos in protocol filesSeedo Eldho Paul2014-11-194-9/+9
| | | | | Signed-off-by: Seedo Eldho Paul <seedoeldhopaul@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* protocol: add role error code to xdg_shellPekka Paalanen2014-10-081-0/+9
| | | | | | | | | Needed for properly reporting role violations from xdg_shell.get_xdg_surface and .get_xdg_popup. 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: add presentation extension v5Pekka Paalanen2014-09-301-0/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add accurate presentation timing features to Wayland: queueing and feedback. This specification is based on the draft written by Frederic Plourde <frederic.plourde@collabora.co.uk> and redesigned by Pekka Paalanen. The RFC v2 version is from http://lists.freedesktop.org/archives/wayland-devel/2014-January/012988.html Changes in v3: * associate presentation time to current surface contents This implements the suggestion from http://lists.freedesktop.org/archives/wayland-devel/2014-February/013066.html which prevents surface content from jumping backwards in time if a client retroactively queues an update with a target time in the past. * use 64-bit tv_sec in presentation The time_t type used in struct timespec could be almost anything. POSIX probably defines it to be an integer, but not the size. Apparently it is usually 'long', which makes it 64-bit on x86_64. To be able to fully represent timespec values returned by clock_gettime, change the protocol to use 64 bits for the tv_sec part. * define an error for invalid tv_nsec This allow us to rely on the normalized timestamp form. * define some interactions with sub-surfaces Sub-surface cached state updates (synchronized mode) are designed especially for resizing. As queued updates are not meant to produce any resizing-like effects, they also do not trigger any sub-surface operations. * add sub-headings as xml comments * queued update cannot map Because before mapping, the surface has no main output assigned. An immediate commit is needed anyway, to be able to set all the surface state, which a queued update cannot touch. * frame callbacks are not queued It is not known when queueing frame callbacks would be useful. Changes in v4: * remove mentions of the queuing feature The specification has been split and the queuing feature will be added back in another version of the extension. * add flags argument to 'presented' event Describe the nature of how the update was presented to screen and the characteristics of the feedback information. No flags have been defined for now. * add a protocol error code for invalid flags Changes in v5: * remove the destroy method for the feedback object The protocol object should instead be automatically destroyed after a 'presented' or 'discarded' event has been triggered. * some grammatical corrections to the specification [Louis-Francis Ratté-Boulianne: split the spec in two parts] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> v3 Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
* protocol: fix a wrong word in wl_viewport.set_sourcePekka Paalanen2014-08-271-1/+1
| | | | | | | Obvious this affects the source, not destination. Reported-by: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* xdg-shell: bump experimental protocol versionPekka Paalanen2014-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | The experimental versioning has not been updated when it was supposed to. Let's try to be better at it now, as xdg-shell is close to have its first stable version. Bump the version now to bring the world into the same exact version. There may be some protocol changes still coming, but we try to land them before 1.6 gets out. Those changes will bump the experimental version again as needed. When 1.6.0 is released, the experimental version will no longer be bumped, and no incompatible protocol changes will be made. Xdg-shell.xml file will move to Wayland in 1.7.0, drop the experimental versioning, and become stable. Cc: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* desktop-shell: add set_panel_position to help place views onscreenJonny Lamb2014-08-201-1/+24
| | | | | | | | | | | | | | Panels are always assumed to be on the top edge of the output. If this is not the case views will be placed under the panel, wherever it is, and maximize doesn't use the correct space allocated for views. By telling the server on which edge the panel is located, it can correctly calculate where to put new views and how big maximized views should be. [Pekka Paalanen: the user of this protocol so far is Maynard.] Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* xdg-shell: Fix documentationJasper St. Pierre2014-07-171-2/+2
| | | | request_change_state has been folded into the configure event.
* shell: Replace set_margin with set_window_geometryJasper St. Pierre2014-07-171-27/+24
| | | | | | | | | | | | | | | | | | | Currently, there is a fun flicker when toggling maximization or fullscreen on a window in mutter or more sophisicated compositors and WMs. What happens is that the client want so go maximized, so we calculate the size that we want the window to resize to (640x480), and then add on its margins to find the buffer size (+10 = 660x500), and then send out a configure event for that size. The client renders to that size, realizes that it's maximized, and then says "oh hey, my margins are actually 0 now!", and so the compositor has to send out another configure event. In order to fix this, make the the configure request correspond to the window geometry we'd like the window to be at. At the same time, replace set_margin with set_window_geometry, where we specify a rect rather than a border around the window.
* xdg-shell: Fix a typo in descriptionBoyan Ding2014-06-241-1/+1
| | | | Signed-off-by: Boyan Ding <stu_dby@126.com>
* xdg-shell: Add show_window_menu requestJasper St. Pierre2014-05-231-0/+20
|
* xdg-shell: Turn "activated" into a stateJasper St. Pierre2014-05-121-22/+5
| | | | | This drops two events, and makes new window decorations race-free with an attach in-flight.
* xdg-shell: Turn the resizing heuristics into an explicit stateJasper St. Pierre2014-05-121-0/+6
| | | | | | | | | | | | | | | | Currently, there's a race condition. When resizing from the left, and a client attaches a buffer after the resize ends, you suddenly see the buffer jump to the right, because the resize ended while multiple attaches were in-flight. Making resize a state can fix this, as the server can now know exactly when the resize ended, and whether a commit was before or after that place. We don't implement the correct tracking in this commit; that's left as an exercise to the reader. Additionally, clients like terminals might want to display resize popups to display the number of cells when in a resize. They can use the hint here to figure out whether they are resizing.
* xdg-shell: Rework the state systemJasper St. Pierre2014-05-121-76/+42
| | | | | | The states system, so far, has been a complicated mix of weird APIs that solved a real race condition, but have been particularly ugly for both compositors and clients to implement.
* xdg-shell: Rename set_transient_for to set_parentJasper St. Pierre2014-05-131-4/+1
| | | | | | | | | It's a confusing name that comes from the ICCCM. The ICCCM is best forgotten about. With the addition of the potential new "transient" role meaning a parent-relative toplevel like a long-lived popup, used for e.g. tooltips, the set_transient_for name will become even more confusing.
* desktop-shell: Fix order of desktop_shell messagesJonas Ådahl2014-05-121-11/+14
| | | | | | | | | There was a bug in wayland-scanner that failed to detect when an message with implicitly set version (i.e. version 1) came after a message with a newer version. This patch fixes the weston desktop shell protocol to pass again. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
* protocol: Correct typo 'suppot'Bryce W. Harrington2014-04-101-1/+1
| | | | Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
* protocol: unify wl_viewport src and dst size rulesPekka Paalanen2014-04-061-6/+11
| | | | | | | | | | | | | | | | | Let's make the source and destination size rules consistent: neither can have zero, {-1, -1} disables it, and other negatives are not allowed. The sanity of allowing zero sized source rectangle as debatable. Now the minimum becomes 1/256x1/256, and with output_scale the actual samples may be even smaller. That should be enough. On not allowed values, raise a protocol error. This should help catch bugs in clients that accidentally send garbage values. The old wl_viewport.set request remains the same, and can still produce zero sized source rectangle. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* xwayland: Use new Xwayland DDXKristian Høgsberg2014-04-061-18/+0
|
* Add a fullscreen shell protocolJason Ekstrand2014-04-021-0/+206
| | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
* xdg-shell: rename the xdg_surface.delete event to close.Giulio Camuffo2014-04-011-2/+2
| | | | | | | 'close' is more consistent with the purpose of the event than 'delete', and it is also c++ friendly, since 'delete' is a keyword. Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
* protocol,compositor: split wl_viewport settersPekka Paalanen2014-04-011-14/+63
| | | | | | | | | | | | | | Bump wl_scaler and wl_viewport versions to 2. Add new requests wl_viewport.set_source and .set_destination, which are meant to replace wl_viewport.set request. Now a client can set and unset just one of source rectangle and destination size. Define the semantics when one of these is unset. Implement these semantics changes in compositor and pixman renderer. GL-renderer does not need changes. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* xdg-shell: Improve documentation for use_unstable_version requestKristian Høgsberg2014-02-191-6/+9
| | | | | Clarify that this is for catching protocol mismatch while the protocol is under development.
* xdg-shell: Bump unstable version to 3Kristian Høgsberg2014-02-191-1/+1
|
* xdg-shell: Replace the set_* atrocity with a new approachJasper St. Pierre2014-02-191-91/+65
| | | | | | Rather than require that the client implement two methods for every state, simply have one global request, change_state, and one global event, request_change_state.
* xdg-shell: Rename focused_set / focused_unset to activated / deactivatedJasper St. Pierre2014-02-181-9/+16
| | | | To try and make the distinction between this event and keyboard focus.
* xdg-shell: Remove "edges" from descriptionJasper St. Pierre2014-02-181-6/+0
| | | | The parameter was dropped...
* client: Fix shell unstable version checkKristian Høgsberg2014-02-111-1/+1
| | | | | | | | Use a static assert to catch mismatch between implementation and interface version. Fix window.c to not use XDG_SHELL_VERSION_CURRENT, which will fail to catch version mismatches. The implementation version must updated manually when the implementation is updated to use the new interface.
* xdg-shell: Move "ping" and "pong" to xdg_shell, not xdg_surfaceKristian Høgsberg2014-02-111-32/+22
| | | | | | | Responsivenes is a per-client thing so we move the ping/pong functionality to xdg_shell. Having this per-window was carries over from the EWMH protocol, where the WM has no other way to do this. In wayland, the compositor can directly ping the client that owns the surface.
* xdg-shell: Add set_margin requestJasper St. Pierre2014-02-061-0/+26
| | | | | | This is used to figure out the size of "invisible" decorations, which we'll use to better know the visible extents of the surface, which we can use for constraining, titlebars, and more.
* xdg-shell: Add a "delete" eventJasper St. Pierre2014-02-061-0/+13
| | | | | | | This is equivalent to WM_DELETE_WINDOW request under X11, or equivalent to pressing the "close" button under CSD. Weston currently doesn't have a compositor-side way to close the window, so no new code is needed on its side.
* xdg-shell: Drop edges arg from xdg_surface configure eventKristian Høgsberg2014-02-051-1/+0
|
* build: Move protocol/Makefile.am into toplevel Makefile.amKristian Høgsberg2014-02-011-26/+0
|
* protocol: rename wl_surface_scaler to wl_viewportPekka Paalanen2014-01-081-14/+14
| | | | | | | | | | | This seems like a better name, and will not conflict if someone later extends wl_surface with a request scaler_set (yeah, unlikely). This code was written by Jonny Lamb, I just diffed his branches and made a patch for Weston. Cc: Jonny Lamb <jonny.lamb@collabora.co.uk> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* protocol: crop & scale RFC v3Pekka Paalanen2013-12-162-1/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add cropping and scaling to wl_surface. Add a global factory interface wl_scaler, which creates wl_scaler_surface objects tied to a given wl_surface. The wl_scaler_surface object can be used to set a cropping and scaling transformation to change how a wl_buffer maps to wl_surface contents. Changes in v2: Take into account buffer_transform and buffer_scale, and try to explain more clearly how the coordinate transformations work and what their order is. Add, that crop and scale state is double-buffered. Explain missing dst_x, dst_y. Clarify that undefined content still is some content, but NULL buffer implies no content nor size. Changes in v3: Disallow zero values for dst_width and dst_height. Open issues: Should this be a separate interface like here, or just a wl_surface request? If we keep this as a separate interface, rename wl_surface_scaler to wl_viewport.
* tests: Test whether a simple EGL main loop uses too many buffersNeil Roberts2013-12-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | This adds a test that tries to simulate a simple game loop that would be like this: while (1) { draw_something(); eglSwapBuffers(); } In this case the test is relying on eglSwapBuffers to throttle to a sensible frame rate. The test then verifies that only 2 EGL buffers are used. This is done via a new request and event in the wayland-test protocol. Currently this causes 3 buffers to be created because the release event generated by the swap buffers is not processed by Mesa until it blocks for the frame complete event in the next swap buffers call, but that is too late. This can be fixed in Mesa by issuing a sync request after the swap buffers and blocking on it before deciding whether to allocate a new buffer.
* tablet-shell: RemoveKristian Høgsberg2013-12-042-41/+0
| | | | | | The tablet-shell is unmaintained and unused. It is currently dead-weight and a burden when we make changes to weston. Let's drop it for now, we can pull it out of git if we find a need for it later.
* xdg_shell: Adding a new shell protocol.Rafael Antognolli2013-12-032-1/+440
| | | | | | | | | | | | | | | | | | xdg_shell is a protocol aimed to substitute wl_shell in the long term, but will not be part of the wayland core protocol. It starts as a non-stable API, aimed to be used as a development place at first, and once features are defined as required by several desktop shells, we can finally make it stable. It provides mainly two new interfaces: xdg_surface and xdg_popup. The xdg_surface interface implements a desktop-style window, that can be moved, resized, maximized, etc. It provides a request for creating child/parent relationship, called xdg_surface.set_transient_for. The xdg_popup interface implements a desktop-style popup/menu. A xdg_popup is always transient for another surface, and also has implicit grab.
* protocol: move sub-surfaces to WaylandPekka Paalanen2013-11-152-245/+0
| | | | | | | | | | | | | | | | | | This reverts commit 2396aec6842c709a714f3825dbad9fd88478f2e6. This exact version of the sub-surface protocol has been copied into Wayland core. Therefore it must be removed from here to avoid build conflicts and useless duplication. No other changes to sub-surface protocol consumers are needed, the identical API is now offered by libwayland-client and libwayland-server. The commit adding sub-surfaces to Wayland is: Author: Pekka Paalanen <pekka.paalanen@collabora.co.uk> protocol: add sub-surfaces to the core Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* protocol: hook up xmllint to check validityPeter Hutterer2013-10-251-1/+16
|
* protocol: Add missing xml files to EXTRA_DISTKristian Høgsberg2012-02-261-0/+2
| | | | Reported by Sven Joachim <svenjoac@gmx.de>
* shell: wait for desktop-shell init before fade inPekka Paalanen2013-05-221-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | On Raspberry Pi, weston-desktop-shell is so slow to start, that the compositor has time to run the fade-in before the wallpaper is up. The user launching Weston sees the screen flipping to black, the fbcon fading in, and then the desktop popping up. To fix this, wait for the weston-desktop-shell to draw everything before starting the initial fade-in. A new request is added to the private desktop-shell protocol to signal it. If a desktop-shell client does not support the new request, the fade-in happens already at bind time. If weston-desktop-shell crashes, or does not send the 'desktop_ready' request in 15 seconds, the compositor will fade in anyway. This should avoid a blocked screen in case weston-desktop-shell malfunction. shell_fade_startup() does not directly start the fade-in but schedules an idle callback, so that the compositor can process all pending events before starting the fade clock. Otherwise (on RPi) we risk skipping part of the animation. Yes, it is a hack, that should have been done in window.c and weston-desktop-shell instead. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* protocol: improve sub-surface spec wordingPekka Paalanen2013-05-201-10/+17
| | | | | | | | Mention, that sub-surfaces are not clipped to the parent. Be more accurate on surface commit vs. apply state. Mention the initial stacking order. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* protocol: remove an unused sub-surface error codePekka Paalanen2013-05-171-2/+0
| | | | | | This was left over from allowing nesting. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* protocol: set_desync should flushPekka Paalanen2013-05-171-0/+3
| | | | | | | | | | wl_subsurface.set_desync should apply the cached wl_surface state. Otherwise, the sub-surface may be stuck: a commit on the parent surface, if desynchronized, will not commit the sub-surface because it is desynchronized, too. A commit on the sub-surface may not happen, if it is waiting for the frame callback from the previous commit. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* protocol: add sub-surfacesPekka Paalanen2013-05-101-0/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add protocol for sub-surfaces, wl_subcompositor as the global interface, and wl_subsurface as the per-surface interface extension. This patch is meant to be reverted, once sub-surfaces are moved into Wayland core. Changes in v2: - Rewrite wl_subcompositor.get_subsurface description, and move mapping and commit details into wl_subsurface description. Check the wording in wl_subsurface.set_position description. - Add wl_subsurface.set_commit_mode request, and document it, with the commit_mode enum. Add bad_value error code for wl_subsurface. - Moved the protocol into Weston repository so we can land it upstream sooner for public exposure. It is to be moved into Wayland core later. - Add destroy requests to both wl_subcompositor and wl_subsurface, and document them. Experience has showed, that interfaces should always have a destructor unless there is a good and future-proof reason to not have it. Changes in v3: - Specify, that wl_subsurface will become inert, if the corresponding wl_surface is destroyed, instead of requiring a certain destruction order. - Replaced wl_subsurface.set_commit_mode with wl_subsurface.set_sync and wl_subsurface.set_desync. Parent-cached commit mode is now called synchronized, and independent mode is desynchronized. Removed commit_mode enum, and bad_value error. - Added support for nested sub-surfaces. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>