summaryrefslogtreecommitdiff
path: root/protocol
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* text: Rename input_method to wl_input_methodJan Arne Petersen2013-05-021-7/+7
| | | | | | | | Also rename input_method_context to wl_input_method_context, input_panel to wl_input_panel and input_panel_surface to wl_input_panel_surface. Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
* text: Improve protocol documentation.Jan Arne Petersen2013-05-022-44/+106
| | | | Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
* text: Rename ::set_panel to ::set_overlay_panelJan Arne Petersen2013-05-021-2/+6
| | | | | | Also add documentation to input_panel_surface::set_overlay_panel. Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
* text: Rename text_input to wl_text_inputJan Arne Petersen2013-05-021-4/+4
| | | | Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
* text: Fix serial handlingJan Arne Petersen2013-05-022-19/+24
| | | | Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
* text: Add output argument to set_toplevelJan Arne Petersen2013-05-021-0/+1
| | | | | | Allow to specify an output for a toplevel input panel surface. Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
* text: Add support for panels following the cursorJan Arne Petersen2013-05-021-0/+3
| | | | | | | Add input_panel_surface::set_panel to specify input panel surfaces which are overlaying the application and are following the input cursor. Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
* text: Add "none" preedit-styleJan Arne Petersen2013-05-021-1/+2
| | | | | | | Use "default" preedit style as default. "None" is used when the composing text should look like non-composing text. Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>