diff --git a/application/applicationruntime.cpp b/application/applicationruntime.cpp
index ac8033f..726d965 100644
--- a/application/applicationruntime.cpp
+++ b/application/applicationruntime.cpp
@@ -14,12 +14,10 @@ static const char *kPath = "/AppRuntime";
// The environment an ordinary application must be started in.
//
-// cutefish-shell runs on a privileged Wayland connection it inherited as
-// WAYLAND_SOCKET. That connection is the shell's proof of identity, so nothing
-// it launches may inherit it: an application that did would be handed the
-// private cutefish_shell_v1 and cutefish_window_management_v1 globals. The fd
-// itself is close-on-exec, but the variable naming it has to go as well, so
-// children fall back to the public WAYLAND_DISPLAY the session also set.
+// A WAYLAND_SOCKET the caller inherited is its own connection, and may be a
+// privileged one; nothing it launches may share it. The fd itself is
+// close-on-exec, but the variable naming it has to go as well, so children
+// fall back to the public WAYLAND_DISPLAY the session also set.
static QProcessEnvironment applicationEnvironment(const QString &activationToken)
{
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
diff --git a/capture/captureclient.h b/capture/captureclient.h
index 092f6a3..87d5bfd 100644
--- a/capture/captureclient.h
+++ b/capture/captureclient.h
@@ -60,7 +60,7 @@ public:
const Output *outputNamed(const QString &name) const;
//! The ext_foreign_toplevel_handle_v1 identifier the compositor gives the
- //! window with this cutefish_window_management_v1 id.
+ //! window with this compositor window id.
static QString windowIdentifier(quint64 windowId);
//! New sources, owned by the caller; null when there is nothing to capture.
diff --git a/protocols/CMakeLists.txt b/protocols/CMakeLists.txt
index fb8bd52..827e5a4 100644
--- a/protocols/CMakeLists.txt
+++ b/protocols/CMakeLists.txt
@@ -13,12 +13,10 @@ set(protocols
cutefish-shell-v1
cutefish-surface-blur-v1
cutefish-window-hints-v1
- cutefish-window-management-v1
wlr-data-control-unstable-v1
)
-# cutefish_window_v1.create_capture_source makes an ext_image_capture_source_v1,
-# so its interface table is exported from here as well, with the toplevel
-# handle its own tables refer to.
+# The ext_image_capture_source_v1 and ext_foreign_toplevel_list_v1 tables are
+# exported from here as well, for clients that create capture sources.
set(protocol_xml_ext-image-capture-source-v1
"${WAYLAND_PROTOCOLS_DATADIR}/staging/ext-image-capture-source/ext-image-capture-source-v1.xml")
set(protocol_xml_ext-foreign-toplevel-list-v1
diff --git a/protocols/cutefish-shell-v1.xml b/protocols/cutefish-shell-v1.xml
index ea4e0d1..d0a507a 100644
--- a/protocols/cutefish-shell-v1.xml
+++ b/protocols/cutefish-shell-v1.xml
@@ -1,19 +1,19 @@
-
- This protocol lets the trusted Cutefish shell process describe what its
- surfaces are for: a desktop background, a panel, a dock, the launcher, a
- notification banner, the on-screen display, a picker or the screen
- capture interface.
+
+ This protocol lets the trusted client the session starts on its own
+ connection (the file manager's daemon) say that a surface is the desktop
+ of an output: below every window, kept to the output, told the work area
+ its icons go in.
It is an *extension* of an ordinary wl_surface, not a replacement for
- xdg-shell. The shell keeps creating xdg_toplevel objects through
+ xdg-shell. The client keeps creating xdg_toplevel objects through
xdg_wm_base exactly like any other Wayland client; this protocol only adds
- the role, the stacking behaviour, the global position, the focus policy and
- the work-area reservation that plain xdg-shell cannot express.
+ the role, the output, the focus policy and the work area that plain
+ xdg-shell cannot express.
- The compositor only advertises this global to the one trusted shell client
+ The compositor only advertises this global on the one trusted connection
it was handed by the session. Ordinary applications never see it.
Warning! Not a standard protocol. Backward-incompatible changes are made by
@@ -50,32 +50,6 @@
-
-
-
- Creates a cutefish_shell_drag_v1 that follows the drag-and-drop
- operation this client has in progress, or else the next one it starts
- with wl_data_device.start_drag. Drags started by other clients are
- never followed.
-
-
-
-
-
-
- Sends the paste shortcut to the window that holds keyboard focus:
- Ctrl+Shift+V to a terminal, Ctrl+V to any other application. The keys
- reach the client as it sees keys, so the shortcut convention does not
- rewrite them.
-
- Requests are handled in order, so a selection set and a picker hidden
- before this request are in place when the keys arrive.
-
- Keys and pointer buttons still held, such as the key that chose what
- to paste, are waited for, up to two seconds. Ignored while the session
- is locked and when the focused window is not an application's.
-
-
@@ -88,60 +62,16 @@
-
-
- The role decides which stacking layer the window lives in and how the
- window manager places it. Roles other than desktop are always kept in
- their own layer: activation can never move a window between layers.
-
- A capture surface and its popups are shown on screen but never
- painted into an image or a video the compositor captures, so the
- interface that takes a screenshot is never part of it.
-
- A capture surface never becomes the active window: activating it only
- takes the keyboard, and the window that was active stays active.
-
- An osd surface never takes the keyboard, whatever its focus policy,
- and it stays above the notification banners.
-
- A sheet surface is window-modal for the window given by set_parent:
- it is stacked right above that window, kept centred on it as the window
- moves or either of them resizes, shown and hidden with it and kept on
- its desk. Its position is the compositor's.
-
- A picker surface, like a capture surface, only borrows the keyboard
- and never becomes the active window. It is stacked above the osd and
- below capture surfaces. It gives the keyboard back when it is hidden,
- when a press lands outside it, or when another window is activated.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Only meaningful for the panel and dock roles.
+ The desktop of its output: stacked below every window, over the
+ compositor's wallpaper, and covering the output.
-
-
+
@@ -150,18 +80,9 @@
summary="the window receives pointer input but never keyboard focus"/>
-
-
-
-
-
-
-
-
- The surface goes back to being an ordinary window, and any exclusive
- zone it reserved is released.
+ The surface goes back to being an ordinary window.
@@ -174,47 +95,15 @@
-
-
- The position of the surface's top left corner in the compositor's
- global coordinate space. A shell surface is never subject to the
- window manager's ordinary placement policy: this position is
- authoritative.
-
-
-
-
-
-
-
-
-
-
-
- Asks the compositor to keep a strip of `thickness` logical pixels along
- `edge` clear of maximized and normally placed windows.
-
- Reservations from every shell surface compose: a status bar at the top
- and a dock at the bottom shrink the work area from both ends. A
- thickness of zero is the same as clear_exclusive_zone.
-
-
-
-
-
-
-
-
-
- The trusted way for the launcher to take focus. No serial is required:
- the shell is trusted, and its own activations do not come from an
- input event it can point at.
+ The trusted way for the desktop to take the keyboard, as it does once
+ when first shown. No serial is required: the client is trusted, and
+ this activation does not come from an input event it can point at.
Ignored while the surface has no window, or while its focus policy is
no_focus.
@@ -223,108 +112,27 @@
- Selects the logical output by its stable wl_output name. Positions stay
- in global coordinates. Exclusive zones apply only to this output.
+ Selects the logical output by its stable wl_output name. A desktop is
+ placed at its output's origin, by default the primary output's, and
+ follows it when the layout changes; the client sizes it to the
+ output.
-
-
- The identifier cutefish_window_management_v1.window announced the
- window with. Only meaningful for the sheet role, and best sent before
- the first commit; a mapped sheet moves to its new parent. A window
- that is gone, or zero, leaves the sheet on its own, placed like any
- other shell surface.
-
-
-
-
-
-
-
-
- Reports the pointer of one drag in global coordinates, wherever it is
- and whatever surface is under it, and tells a drop from a cancel.
- After dropped or cancelled only returned may follow, and the object
- should then be destroyed.
-
- Where the shell's drag may go is the shell's to say: while the drag is
- over nothing that takes the drop, the pointer keeps its default shape
- rather than showing that it cannot drop there.
-
-
-
-
- Also lets go of an icon that is sliding back or waits where it
- arrived; see returned.
-
-
-
-
-
- From 0 to 1. It holds for the rest of the drag the object follows,
- and may be sent before that drag starts.
-
-
-
-
-
-
- Nonzero makes the drag icon slide back to where it was when the drag
- started if the drag ends with nothing taking the data: cancelled, or
- let go over nothing that accepts it. The returned event tells when it
- is back. Zero, the initial value, lets the icon go where the drag
- ends. What counts is the value when the drag ends; it may be sent
- before the drag starts.
-
-
-
-
-
-
- The point, in global logical coordinates, the drag's pointer
- position goes back to when its icon returns; the icon keeps its
- offset from it. Until this is sent, it is where the drag started.
-
-
-
-
-
-
-
- Sent when the drag starts and whenever its pointer moves, in global
- logical coordinates.
-
-
-
-
-
-
-
- Sent where the drag was let go, whether or not a target takes the
- data, and before any wl_data_source event about the drop.
-
-
-
-
-
-
-
- Escape, or the drag's source or origin surface went away.
-
-
-
-
-
- Sent after dropped or cancelled when the drag ended with nothing
- taking the data while set_returns_home was nonzero, once the icon
- has slid back; at once when the drag had no icon to slide.
-
- The icon then stays where it arrived until this object is destroyed,
- so the client can destroy it once a frame of its own shows the icon
- there, and no frame shows both or neither.
+
+
+ Sent to a desktop surface: its output's bounds less what the
+ compositor's own panels and every exclusive zone reserve, where
+ windows are laid out. In surface-local logical pixels, the surface
+ being placed at its output's origin. Sent once the surface is a
+ desktop, before its first configure, and again whenever the work area
+ or the surface's output changes.
+
+
+
+
diff --git a/protocols/cutefish-window-management-v1.xml b/protocols/cutefish-window-management-v1.xml
deleted file mode 100644
index d226938..0000000
--- a/protocols/cutefish-window-management-v1.xml
+++ /dev/null
@@ -1,481 +0,0 @@
-
-
-
-
- Lets the trusted Cutefish shell enumerate and control the ordinary
- application windows the compositor manages, which is what the dock's task
- list, the status bar and the launcher are built on.
-
- Only ordinary application windows are announced. The shell's own
- cutefish_shell_v1 surfaces - the desktop, the panels, the launcher and the
- notification banners - are never part of this list. Ordinary toplevels
- whose app_id is exactly cutefish-shell are also excluded.
-
- Every request here is a trusted shell command. Unlike xdg-activation or
- xdg_toplevel.move they carry no input serial: the shell acts on behalf of
- the user through its own UI, not on behalf of the target application.
-
- The compositor only advertises this global to the one trusted shell client
- it was handed by the session. Ordinary applications never see it.
-
- Warning! Not a standard protocol. Backward-incompatible changes are made by
- bumping the interface version.
-
-
-
-
- On bind the compositor announces every application window that already
- exists, each one followed by its state and a done event, and then keeps
- sending changes. Rebinding after a shell restart therefore repopulates
- the whole task list.
-
-
-
-
-
-
-
-
-
-
-
-
-
- Existing cutefish_window_v1 objects stay valid until destroyed.
-
-
-
-
-
- Asks every top-level window of the window's application to close, as
- xdg_toplevel.close does; dialogs are left alone, so a second Quit asks
- again rather than dismissing a prompt. An application is the task-list
- windows of one app_id, as the dock groups them, or of one process for
- windows without an app_id. Their processes that have no task-list
- window left a few seconds later are terminated through the session's
- application runtime; one that still shows a window, typically to ask
- about unsaved changes, is not.
-
-
-
-
-
-
- Hides every window of the window's application, as
- cutefish_window_v1.hide does.
-
-
-
-
-
-
- Hides the windows of every application but the window's; with no
- window, of every application.
-
-
-
-
-
-
- Asks which window is shown at a position in global logical
- coordinates, found the way the pointer finds it but looking through
- screen capture surfaces and their popups, so the capture interface
- can pick what is under it. Answered by picked with the same serial.
-
-
-
-
-
-
-
-
- Slides to the desk as clicking it does. Ignored for a desk that no
- longer exists and while desks are being switched.
-
-
-
-
-
-
- Ignored when there are as many desks as the compositor allows. With
- `activate` 1 the new desk is also switched to.
-
-
-
-
-
-
- The desk's windows go to the desk on its left, or on its right when it
- is the first, below that desk's own windows. Removing the active desk
- slides to that desk first. Ignored for the only desk.
-
-
-
-
-
-
- An empty name gives the desk its default name back.
-
-
-
-
-
-
-
- Creates an ext_image_capture_source_v1 of the window one of the
- shell's own surfaces produced, with what the compositor draws around
- it: the glass, the outline, the shadow and the transparent margins
- the shadow needs, so a still picture of the dock looks the way the
- dock does on screen. The buffer covers the shadow bounds of what
- casts the shadow - the rounded body of the dock, not the transparent
- room of its surface around it - at the scale of the output that holds
- most of the window. A surface that has no window yet gives a source
- that cannot be captured. In every other way the source behaves like
- the one cutefish_window_v1.create_capture_source gives.
-
-
-
-
-
-
-
- A new cutefish_window_v1 object for an application window. Its state
- follows immediately, terminated by cutefish_window_v1.done.
-
- `id_hi` and `id_lo` are the high and low 32 bits of the compositor's
- stable 64-bit window identifier. Wayland has no 64-bit scalar, so the
- identifier is carried as two uints; it is unique for the lifetime of
- the compositor and is never reused.
-
- The same window's ext_foreign_toplevel_handle_v1 identifier is
- "cutefish-" followed by this identifier in decimal, so a capture
- client can be told which window to capture.
-
-
-
-
-
-
-
-
- The identifier of the active managed application, or zero when no
- application is active. An ordinary cutefish-shell toplevel taking
- keyboard focus preserves the previous managed application context.
-
-
-
-
-
-
-
- Sent once, after the windows that existed at bind time have all been
- announced. A shell that is rebuilding its task list can hold off
- drawing until this arrives.
-
-
-
-
-
- The answer to pick. For a window, id_hi and id_lo name it, and a
- popup is answered with the window it belongs to; otherwise they are
- zero.
-
-
-
-
-
-
-
-
-
- Desks are announced in order, before initial_state_done for those that
- exist at bind time; a new desk is always the last. `desk` is its
- identifier, unique for the lifetime of the compositor and never
- reused, and never zero.
-
-
-
-
-
-
- Its windows have moved to another desk, which their desk events say.
-
-
-
-
-
-
- Empty while the desk has its default name, which the shell words
- itself from the desk's position, as "Desk 2".
-
-
-
-
-
-
-
- There is always one.
-
-
-
-
-
-
-
- State arrives as individual events followed by done. The shell should
- apply a batch only when done is received.
-
-
-
-
-
-
-
-
-
-
-
-
- Unhides the window first if it is hidden, and restores it if it is
- minimized.
-
-
-
-
-
-
-
-
- Sends the ordinary xdg_toplevel.close; the application decides what to
- do about it. A window that is not responsive gets not_responding
- instead.
-
-
-
-
-
-
-
- Used by the status bar's window menu. No input serial is required.
-
-
-
-
-
- The rectangle, in the coordinate space of `panel`, that this window's
- task-list entry occupies. The compositor uses it as the target of the
- minimize animation. `panel` must be a surface belonging to the same
- client.
-
- Passing a zero-sized rectangle clears the association.
-
-
-
-
-
-
-
-
-
-
- Answers minimize_landed. Send it once the panel surface has committed
- a frame that shows the window's thumbnail at its minimized geometry;
- the compositor then stops drawing the window there. Ignored when no
- landing is pending.
-
-
-
-
-
- The window disappears at once: no animation, no thumbnail, and no
- task-list slot to land on. Its state is kept underneath, so a
- minimized window stays minimized and comes back to the dock when it
- is unhidden. A hidden window cannot be activated; if it held the
- keyboard focus, the focus moves on as it does for a closed window.
-
- cutefish_window_management_v1.hide_application and
- hide_other_applications apply it to whole applications.
-
-
-
-
-
- The window reappears in the state it was hidden in, in place and with
- no animation. It is neither raised nor activated; send activate for
- that. Ignored when the window is not hidden.
-
-
-
-
-
- Its dialogs go with it. Zero puts it on every desk. A window on the
- active desk slides off towards the desk it goes to, and does not take
- the user along.
-
-
-
-
-
-
- Ends the client process at once, without asking it: what the shell
- offers once not_responding was sent. When the session started the
- process in an application scope of its own, the rest of that scope
- ends with it. Anything the application did not save is lost.
-
-
-
-
-
- Creates an ext_image_capture_source_v1 of the window with what the
- compositor draws around it: the outline, the shadow and the
- transparent margins the shadow needs, so a still picture of the
- window looks the way the window does on screen. The buffer covers
- the window's shadow bounds instead of its bounds, at the scale of
- the output that holds most of the window; a window that fills its
- area casts no shadow and gives the same picture as the toplevel
- source. In every other way the source behaves like one from
- ext_foreign_toplevel_image_capture_source_manager_v1.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Taken from the Wayland client credentials of the connection the
- window's xdg_surface was created on, or for an X11 window from the
- credentials the X server holds for its client connection. Never from
- a client-supplied property such as _NET_WM_PID. Zero when unknown.
-
-
-
-
-
-
- Each argument is 1 or 0. `hidden` is independent of the others: a
- window can be both hidden and minimized.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Everything sent since the previous done applies atomically.
-
-
-
-
-
- No further events are sent. The shell should destroy the object.
-
-
-
-
- Service and object path of a com.canonical.dbusmenu on the session bus.
- Empty strings clear the endpoint. Applies with the next done event.
-
-
-
-
-
-
-
- Sent once the window is minimized: the last frame the compositor
- presented for it, outline and shadow excluded, for the shell
- to show in the window's place. Also sent during the initial
- enumeration for windows that are already minimized.
-
- May be replaced while minimizing. Before minimize_landed, the final
- thumbnail contains the same raster the compositor holds at the slot.
- Upload it unchanged to preserve its edge pixels and sampling at handoff.
-
- `fd` is a read-only shared memory file of width * height * 4 bytes,
- rows top to bottom, in the byte order of wl_shm format argb8888 with
- premultiplied alpha. The shell maps it, copies what it needs and
- closes it. No thumbnail is sent to clear one: the image stops applying
- once the state event reports the window as no longer minimized.
- Applies with the next done event.
-
-
-
-
-
-
-
-
- The window has arrived at its minimized geometry, without shadow or
- outline, and the compositor keeps drawing it there until the shell
- sends handoff, or for at most 250 ms. Showing the thumbnail and then
- sending handoff replaces the window with no frame in between.
-
-
-
-
-
- The identifier of the xdg_toplevel parent, or zero when the window
- stands on its own. A dialog such as a save prompt has a parent; the
- shell leaves those alone when it asks an application to quit, since
- closing the prompt would answer it on the user's behalf. Applies with
- the next done event.
-
-
-
-
-
-
- When set, omit this window from the dock, status bar application
- identity and window switcher. It remains managed and may receive focus.
- Apply this state together with the other events at done.
-
-
-
-
-
-
- Zero for a window on every desk: one the user put there, an always on
- top window or a system dialog. A window on a desk that is not active
- is not on screen, and activating it switches to its desk. Applies with
- the next done event.
-
-
-
-
-
-
- Zero once the client stopped answering the compositor's pings past a
- timeout, one when it answers again. The compositor dims the window
- meanwhile. Every window starts out responsive. Applies with the next
- done event.
-
-
-
-
-
-
- Sent when the user presses on, types into or closes the window while
- it is not responsive. The shell is expected to offer force_quit. With
- no shell bound to offer it, closing such a window ends the
- application instead.
-
-
-
-