refactor(protocols): trim cutefish_shell_v1 to the desktop surface and drop window management

pull/18/head
reionwong 2 weeks ago
parent 7abd92248c
commit 10af970ceb

@ -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();

@ -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.

@ -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

@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="cutefish_shell_v1">
<description summary="private shell surface roles for cutefish-shell">
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.
<description summary="the desktop surface of the trusted session client">
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 @@
<arg name="id" type="new_id" interface="cutefish_shell_surface_v1"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
<request name="get_drag">
<description summary="follow a drag this client starts">
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.
</description>
<arg name="id" type="new_id" interface="cutefish_shell_drag_v1"/>
</request>
<request name="send_paste">
<description summary="paste into the window holding the keyboard">
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.
</description>
</request>
</interface>
<interface name="cutefish_shell_surface_v1" version="1">
@ -88,60 +62,16 @@
<enum name="error">
<entry name="invalid_role" value="0" summary="unknown role value"/>
<entry name="invalid_edge" value="1" summary="unknown exclusive-zone edge"/>
<entry name="invalid_behavior" value="2" summary="unknown panel behavior"/>
<entry name="invalid_focus_policy" value="3" summary="unknown focus policy"/>
<entry name="invalid_output" value="4" summary="unknown logical output"/>
</enum>
<enum name="role">
<description summary="what the surface is">
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.
</description>
<entry name="desktop" value="0" summary="the desktop background, below everything"/>
<entry name="panel" value="1" summary="a panel such as the status bar"/>
<entry name="dock" value="2" summary="the dock"/>
<entry name="launcher" value="3" summary="the full screen launcher"/>
<entry name="notification" value="4" summary="a notification banner"/>
<entry name="capture" value="5"
summary="the screen capture interface, above everything else"/>
<entry name="osd" value="6"
summary="the on-screen display of a volume or brightness change"/>
<entry name="sheet" value="7"
summary="a dialog hanging from an application window, see set_parent"/>
<entry name="picker" value="8"
summary="a chooser that borrows the keyboard, such as the clipboard history"/>
</enum>
<enum name="panel_behavior">
<description summary="how a panel or dock relates to ordinary windows">
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.
</description>
<entry name="stay_above" value="0" summary="always above ordinary windows"/>
<entry name="windows_can_cover" value="1"
summary="ordinary windows and the launcher may be stacked over it"/>
<entry name="desktop" value="0" summary="the desktop, below everything"/>
</enum>
<enum name="focus_policy">
@ -150,18 +80,9 @@
summary="the window receives pointer input but never keyboard focus"/>
</enum>
<enum name="edge">
<description summary="which screen edge an exclusive zone is measured from"/>
<entry name="top" value="0"/>
<entry name="bottom" value="1"/>
<entry name="left" value="2"/>
<entry name="right" value="3"/>
</enum>
<request name="destroy" type="destructor">
<description summary="drop the shell metadata">
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.
</description>
</request>
@ -174,47 +95,15 @@
<arg name="role" type="uint" enum="role"/>
</request>
<request name="set_position">
<description summary="place the surface in global coordinates">
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.
</description>
<arg name="x" type="int"/>
<arg name="y" type="int"/>
</request>
<request name="set_panel_behavior">
<arg name="behavior" type="uint" enum="panel_behavior"/>
</request>
<request name="set_focus_policy">
<arg name="policy" type="uint" enum="focus_policy"/>
</request>
<request name="set_exclusive_zone">
<description summary="reserve work area along a screen edge">
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.
</description>
<arg name="edge" type="uint" enum="edge"/>
<arg name="thickness" type="int"/>
</request>
<request name="clear_exclusive_zone">
<description summary="release this surface's work-area reservation"/>
</request>
<request name="activate">
<description summary="give this surface the keyboard focus">
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 @@
<request name="set_output">
<description summary="associate this surface with a logical output">
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.
</description>
<arg name="name" type="string" summary="wl_output name"/>
</request>
<request name="set_parent">
<description summary="the application window a sheet belongs to">
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.
</description>
<arg name="id_hi" type="uint"/>
<arg name="id_lo" type="uint"/>
</request>
</interface>
<interface name="cutefish_shell_drag_v1" version="1">
<description summary="where a drag of the shell's goes and how it ends">
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.
</description>
<request name="destroy" type="destructor">
<description summary="stop following the drag">
Also lets go of an icon that is sliding back or waits where it
arrived; see returned.
</description>
</request>
<request name="set_icon_opacity">
<description summary="how opaque the drag icon is drawn">
From 0 to 1. It holds for the rest of the drag the object follows,
and may be sent before that drag starts.
</description>
<arg name="opacity" type="fixed"/>
</request>
<request name="set_returns_home">
<description summary="whether an untaken drag's icon goes back">
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.
</description>
<arg name="returns" type="uint"/>
</request>
<request name="set_home">
<description summary="where a returning drag goes back to">
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.
</description>
<arg name="x" type="fixed"/>
<arg name="y" type="fixed"/>
</request>
<event name="motion">
<description summary="the drag moved">
Sent when the drag starts and whenever its pointer moves, in global
logical coordinates.
</description>
<arg name="x" type="fixed"/>
<arg name="y" type="fixed"/>
</event>
<event name="dropped">
<description summary="the drag was let go">
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.
</description>
<arg name="x" type="fixed"/>
<arg name="y" type="fixed"/>
</event>
<event name="cancelled">
<description summary="the drag ended without a drop">
Escape, or the drag's source or origin surface went away.
</description>
</event>
<event name="returned">
<description summary="the icon is back where the drag started">
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.
<event name="work_area">
<description summary="where a desktop lays out its content">
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.
</description>
<arg name="x" type="int"/>
<arg name="y" type="int"/>
<arg name="width" type="int"/>
<arg name="height" type="int"/>
</event>
</interface>
</protocol>

@ -1,481 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="cutefish_window_management_v1">
<description summary="task list and window control for cutefish-shell">
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.
</description>
<interface name="cutefish_window_management_v1" version="1">
<description summary="the managed window list">
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.
</description>
<enum name="picked_kind">
<description summary="what is shown at a picked position"/>
<entry name="none" value="0" summary="nothing that can be captured as a window"/>
<entry name="window" value="1" summary="an announced application window"/>
<entry name="desktop" value="2" summary="the shell's desktop"/>
<entry name="panel" value="3" summary="a shell panel such as the status bar"/>
<entry name="dock" value="4" summary="the shell's dock"/>
</enum>
<request name="destroy" type="destructor">
<description summary="stop managing windows">
Existing cutefish_window_v1 objects stay valid until destroyed.
</description>
</request>
<request name="quit_application">
<description summary="the application menu's Quit">
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.
</description>
<arg name="window" type="object" interface="cutefish_window_v1"/>
</request>
<request name="hide_application">
<description summary="the application menu's Hide">
Hides every window of the window's application, as
cutefish_window_v1.hide does.
</description>
<arg name="window" type="object" interface="cutefish_window_v1"/>
</request>
<request name="hide_other_applications">
<description summary="the application menu's Hide Others">
Hides the windows of every application but the window's; with no
window, of every application.
</description>
<arg name="window" type="object" interface="cutefish_window_v1" allow-null="true"/>
</request>
<request name="pick">
<description summary="find the window shown at a position">
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.
</description>
<arg name="serial" type="uint"/>
<arg name="x" type="int"/>
<arg name="y" type="int"/>
</request>
<request name="activate_desk">
<description summary="switch to a desk">
Slides to the desk as clicking it does. Ignored for a desk that no
longer exists and while desks are being switched.
</description>
<arg name="desk" type="uint"/>
</request>
<request name="create_desk">
<description summary="add a desk after the last one">
Ignored when there are as many desks as the compositor allows. With
`activate` 1 the new desk is also switched to.
</description>
<arg name="activate" type="uint"/>
</request>
<request name="remove_desk">
<description summary="remove a desk, keeping its windows">
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.
</description>
<arg name="desk" type="uint"/>
</request>
<request name="set_desk_name">
<description summary="name a desk">
An empty name gives the desk its default name back.
</description>
<arg name="desk" type="uint"/>
<arg name="name" type="string"/>
</request>
<request name="create_surface_capture_source">
<description summary="a capture source of the shell's own window as it is shown">
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.
</description>
<arg name="id" type="new_id" interface="ext_image_capture_source_v1"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
<event name="window">
<description summary="a window appeared">
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.
</description>
<arg name="window" type="new_id" interface="cutefish_window_v1"/>
<arg name="id_hi" type="uint"/>
<arg name="id_lo" type="uint"/>
</event>
<event name="active_window">
<description summary="the active window changed">
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.
</description>
<arg name="id_hi" type="uint"/>
<arg name="id_lo" type="uint"/>
</event>
<event name="initial_state_done">
<description summary="the initial enumeration is complete">
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.
</description>
</event>
<event name="picked">
<description summary="the window shown at a picked position">
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.
</description>
<arg name="serial" type="uint"/>
<arg name="kind" type="uint" enum="picked_kind"/>
<arg name="id_hi" type="uint"/>
<arg name="id_lo" type="uint"/>
</event>
<event name="desk">
<description summary="a desk was added">
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.
</description>
<arg name="desk" type="uint"/>
</event>
<event name="desk_removed">
<description summary="a desk was removed">
Its windows have moved to another desk, which their desk events say.
</description>
<arg name="desk" type="uint"/>
</event>
<event name="desk_name">
<description summary="a desk's name">
Empty while the desk has its default name, which the shell words
itself from the desk's position, as "Desk 2".
</description>
<arg name="desk" type="uint"/>
<arg name="name" type="string"/>
</event>
<event name="active_desk">
<description summary="the desk in front of the user">
There is always one.
</description>
<arg name="desk" type="uint"/>
</event>
</interface>
<interface name="cutefish_window_v1" version="1">
<description summary="one managed application window">
State arrives as individual events followed by done. The shell should
apply a batch only when done is received.
</description>
<enum name="error">
<entry name="invalid_geometry" value="0" summary="negative width or height"/>
</enum>
<request name="destroy" type="destructor">
<description summary="stop tracking this window"/>
</request>
<request name="activate">
<description summary="raise the window and give it the keyboard focus">
Unhides the window first if it is hidden, and restores it if it is
minimized.
</description>
</request>
<request name="minimize"/>
<request name="restore"/>
<request name="close">
<description summary="ask the application to close the window">
Sends the ordinary xdg_toplevel.close; the application decides what to
do about it. A window that is not responsive gets not_responding
instead.
</description>
</request>
<request name="toggle_maximize"/>
<request name="start_move">
<description summary="begin an interactive move of this window">
Used by the status bar's window menu. No input serial is required.
</description>
</request>
<request name="set_minimized_geometry">
<description summary="where the window minimizes to">
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.
</description>
<arg name="panel" type="object" interface="wl_surface"/>
<arg name="x" type="int"/>
<arg name="y" type="int"/>
<arg name="width" type="int"/>
<arg name="height" type="int"/>
</request>
<request name="handoff">
<description summary="the dock now shows the minimized window">
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.
</description>
</request>
<request name="hide">
<description summary="take the window off the screen without minimizing it">
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.
</description>
</request>
<request name="unhide">
<description summary="show a hidden window again">
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.
</description>
</request>
<request name="move_to_desk">
<description summary="send the window to a desk">
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.
</description>
<arg name="desk" type="uint"/>
</request>
<request name="force_quit">
<description summary="end the application behind the window">
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.
</description>
</request>
<request name="create_capture_source">
<description summary="a capture source of the window as it is shown">
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.
</description>
<arg name="id" type="new_id" interface="ext_image_capture_source_v1"/>
</request>
<event name="title">
<arg name="title" type="string"/>
</event>
<event name="app_id">
<arg name="app_id" type="string"/>
</event>
<event name="pid">
<description summary="the process that owns the window">
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.
</description>
<arg name="pid" type="uint"/>
</event>
<event name="state">
<description summary="the window's boolean state">
Each argument is 1 or 0. `hidden` is independent of the others: a
window can be both hidden and minimized.
</description>
<arg name="active" type="uint"/>
<arg name="minimized" type="uint"/>
<arg name="maximized" type="uint"/>
<arg name="fullscreen" type="uint"/>
<arg name="hidden" type="uint"/>
</event>
<event name="geometry">
<description summary="the outer window bounds in global coordinates"/>
<arg name="x" type="int"/>
<arg name="y" type="int"/>
<arg name="width" type="int"/>
<arg name="height" type="int"/>
</event>
<event name="done">
<description summary="the end of a batch of state changes">
Everything sent since the previous done applies atomically.
</description>
</event>
<event name="closed">
<description summary="the window is gone">
No further events are sent. The shell should destroy the object.
</description>
</event>
<event name="application_menu">
<description summary="the window's DBusMenu endpoint">
Service and object path of a com.canonical.dbusmenu on the session bus.
Empty strings clear the endpoint. Applies with the next done event.
</description>
<arg name="service_name" type="string"/>
<arg name="object_path" type="string"/>
</event>
<event name="thumbnail">
<description summary="how the window looked when it was minimized">
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.
</description>
<arg name="fd" type="fd"/>
<arg name="width" type="uint"/>
<arg name="height" type="uint"/>
</event>
<event name="minimize_landed">
<description summary="the minimize animation reached the dock">
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.
</description>
</event>
<event name="parent">
<description summary="the window this one is transient for">
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.
</description>
<arg name="id_hi" type="uint"/>
<arg name="id_lo" type="uint"/>
</event>
<event name="skip_taskbar">
<description summary="effective application presentation exclusion">
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.
</description>
<arg name="skip" type="uint"/>
</event>
<event name="desk">
<description summary="the desk the window is on">
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.
</description>
<arg name="desk" type="uint"/>
</event>
<event name="responsive">
<description summary="whether the application answers the compositor">
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.
</description>
<arg name="responsive" type="uint"/>
</event>
<event name="not_responding">
<description summary="the user is waiting on a window that stopped answering">
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.
</description>
</event>
</interface>
</protocol>
Loading…
Cancel
Save