Treeland DDE shell v1

DDE shell integration for treeland

Warning! This protocol is EXPERIMENTAL and under active development. It may change at any time, including in backward-incompatible ways, without incrementing the interface major version and without prior notice. No compatibility guarantees of any kind are provided. Clients and compositors must track the upstream definition in treeland-protocols and must not rely on the current interface names, requests, events, or semantics remaining stable across releases.

dde shell manager

This interface allows DDE to configure some treeland functions.

get_window_overlap_checker(id: new_id<treeland_window_overlap_checker>)
Argument
Type
Description
idnew_id<treeland_window_overlap_checker>
the new window overlap checker object
create a window overlap checker

Deprecated: this request is non-functional. The created object never emits events, and its requests have no effect apart from destroy.

Superseded by the treeland_region_watch_manager_v1 global of the treeland-region-watch-unstable-v1 protocol.

get_shell_surface(id: new_id<treeland_dde_shell_surface_v1>, surface: object<wl_surface>)
Argument
Type
Description
idnew_id<treeland_dde_shell_surface_v1>
surfaceobject<wl_surface>
the surface to create a shell surface for
create a shell surface from a surface

Create a shell surface for an existing wl_surface.

Only one shell surface can be associated with a given surface.

Recommended for use with xdg_surface.

get_treeland_dde_active(id: new_id<treeland_dde_active_v1>, seat: object<wl_seat>)
Argument
Type
Description
idnew_id<treeland_dde_active_v1>
seatobject<wl_seat>
seat associated with the dde_active
create a new dde active

Deprecated: this request is non-functional. The created object never emits events, and its requests have no effect apart from destroy.

Superseded by the treeland_active_notify_manager_v1 global of the treeland-active-notify-unstable-v1 protocol.

get_treeland_multitaskview(id: new_id<treeland_multitaskview_v1>)
Argument
Type
Description
idnew_id<treeland_multitaskview_v1>
create a new multitaskview context

Deprecated: superseded by the open_multitask_view, close_multitask_view, and toggle_multitask_view actions of the treeland_compositor_action_v1 global of the treeland-compositor-action-unstable-v1 protocol. This request must not be used in new code.

get_treeland_window_picker(id: new_id<treeland_window_picker_v1>)
Argument
Type
Description
idnew_id<treeland_window_picker_v1>
create a new window picker

Create a new window picker to pick window.

get_treeland_lockscreen(id: new_id<treeland_lockscreen_v1>)
Argument
Type
Description
idnew_id<treeland_lockscreen_v1>
create a new lockscreen context

Deprecated: superseded by the lockscreen, shutdown_menu, and show_user_switch actions of the treeland_compositor_action_v1 global of the treeland-compositor-action-unstable-v1 protocol. This request must not be used in new code.

set_xwindow_position_relative(callback: new_id<wl_callback>, wid: uint, anchor: object<wl_surface>, dx: fixed, dy: fixed)
Argument
Type
Description
callbacknew_id<wl_callback>
widuint
X11 window ID
anchorobject<wl_surface>
the reference surface
dxfixed
horizontal offset from anchor
dyfixed
vertical offset from anchor
Move a XWayland surface to a position relative to a wl_surface

Deprecated: this request is non-functional and has no effect. Superseded by the set_xwindow_position_relative request of the treeland_xwindow_control_v1 global of the treeland-xwindow-control-unstable-v1 protocol.

destroy()
destroy the dde shell manager

Destroy the treeland_dde_shell_manager_v1 object.


A window overlap checker

Deprecated: this interface is non-functional. Apart from the destroy request, all requests have no effect and no events are ever emitted. New code must not use it.

Superseded by the treeland_region_watch_manager_v1 global of the treeland-region-watch-unstable-v1 protocol.

Argument
Type
Description
widthint
width of the detected window region
heightint
height of the detected window region
anchoruint<treeland_window_overlap_checker.anchor>
outputobject<wl_output>allow null
Register the detected surface

This interface is used to receive the detected surface. When the xdgshell window in the workspace overlaps with the detected window, an event will be sent to notify the client to process it. The window position will only be recorded when this interface is called. If the window moves, this interface needs to be called again.

destroy()
destroy the treeland_window_overlap_checker object

Destroys the treeland_window_overlap_checker object.

Send this request when the client no longer needs overlap notifications from this object.

enter()
detected window has become overlapped

Sent when the detected window region begins to overlap with any xdg-shell toplevel. Sent at most once per update cycle.

leave()
detected window is no longer overlapped

Sent when the detected window region no longer overlaps with any xdg-shell toplevel. Sent at most once per update cycle.

anchor { top, bottom, left, right } 
Argument
Value
Description
top1
the top edge of the anchor rectangle
bottom2
the bottom edge of the anchor rectangle
left4
the left edge of the anchor rectangle
right8
the right edge of the anchor rectangle
same layershell

same layershell


metadata interface

An interface that may be implemented by a wl_surface, for implementations that provide the shell user interface.

It provides requests to set surface role, set skip, set the position set auto placement in output coordinates.

On the server side the object is automatically destroyed when the related wl_surface is destroyed. On client side, treeland_dde_shell_surface_v1.destroy() must be called before destroying the wl_surface object.

destroy()
destroy the treeland_dde_shell_surface_v1 object

The treeland_dde_shell_surface_v1 interface is removed from the wl_surface object that was turned into a shell surface with the treeland_dde_shell_manager_v1.get_shell_surface request.

The shell surface role is lost and wl_surface is unmapped.

set_surface_position(x: int, y: int)
Argument
Type
Description
xint
x coordinate in global space
yint
y coordinate in global space
change the shell surface position

Move the surface to new coordinates.

Coordinates are global, for example 50,50 for a 1920,0+1920x1080 output is 1970,50 in global coordinates space.

Argument
Type
Description
roleuint<treeland_dde_shell_surface_v1.role>
assign a role to this surface

Assign a role to a shell surface.

set_auto_placement(y_offset: uint)
Argument
Type
Description
y_offsetuint
y position is relative to the cursor bottom
Place the surface at the bottom of the cursor area

Set the vertical alignment of the surface within the cursor width.

Do not use it together with set_surface_position to avoid exceptions.

The position of the surface will be controlled by the compositor after the request, including preventing it from being displayed beyond the edge of the output.

set_skip_switcher(skip: uint)
Argument
Type
Description
skipuint
Boolean value that sets whether to skip the window switcher.
make the window not appear in a switcher

Setting this bit will indicate that the window prefers not to be listed in a switcher.

set_skip_dock_preview(skip: uint)
Argument
Type
Description
skipuint
Boolean value that sets whether to skip the dock preview.
make the window not appear in a dock preview

Setting this bit will indicate that the window prefers not to be listed in a dock preview.

set_skip_muti_task_view(skip: uint)
Argument
Type
Description
skipuint
Boolean value that sets whether to skip the mutitask view.
make the window not appear in a mutitask view

Setting this bit will indicate that the window prefers not to be listed in a mutitask view.

set_accept_keyboard_focus(accept: uint)
Argument
Type
Description
acceptuint
Boolean value that sets whether to accept keyboard focus
control whether the surface accepts keyboard focus

Setting this will determine whether the surface can receive keyboard focus. When set to 0, the surface will not receive keyboard focus even when clicked or activated. When set to 1 (default), the surface will receive keyboard focus normally.

role { overlay } 
Argument
Value
Description
overlay1
overlay role
available roles for surfaces

These values indicate which roles a surface can be rendered in, They are ordered by z depth.

Displayed below wlr-layer-shell, at the overlay level of the workspace.

Multiple surfaces can share a single role, and ordering within a single role is undefined.


treeland_dde_active_v1

Deprecatedversion 1
metadata interface

Deprecated: this interface is non-functional. Apart from the destroy request, all requests have no effect and no events are ever emitted. New code must not use it.

Superseded by the treeland_active_notify_manager_v1 global of the treeland-active-notify-unstable-v1 protocol.

destroy()
destroy the treeland_dde_active_v1 object

Destroy this object.

Argument
Type
Description
reasonuint<treeland_dde_active_v1.reason>
active in event was triggered
Argument
Type
Description
reasonuint<treeland_dde_active_v1.reason>
active out event was triggered
start_drag()
sent when the compositor starts a drag operation
drop()
sent when the compositor completes a drop operation
reason { mouse, wheel } 
Argument
Value
Description
mouse0
mouse triggered
wheel1
mouse wheel triggered
event reason

treeland_multitaskview_v1

Deprecatedversion 1
multitaskview context interface

An interface used to control multitaskview.

Deprecated: superseded by the open_multitask_view, close_multitask_view, and toggle_multitask_view actions of the treeland_compositor_action_v1 global of the treeland-compositor-action-unstable-v1 protocol. The interface must not be used in new code.

destroy()
destroy the treeland_multitaskview_v1 object

Destroy this multitaskview context object.

toggle()
toggle multitaskview

Show or hide the multitaskview.


treeland_window_picker_v1

Deprecatedversion 1
window picker interface

An interface used to pick window and return credentials.

destroy()
destroy the treeland_window_picker_v1 object

Destroy this window picker object.

pick(hint: string)
Argument
Type
Description
hintstring
Hint of pick process
pick a window

Pick a window to get information.

window(pid: int)
Argument
Type
Description
pidint
PID of the picked window
window picked

Picked window information.


treeland_lockscreen_v1

Deprecatedversion 1
lockscreen interface

An interface used to operate lockscreen.

Deprecated: superseded by the lockscreen, shutdown_menu, and show_user_switch actions of the treeland_compositor_action_v1 global of the treeland-compositor-action-unstable-v1 protocol. The interface must not be used in new code.

destroy()
destroy the treeland_lockscreen_v1 object

Destroy this lockscreen context object.

lock()
lock screen

Lock the screen.

shutdown()
show shutdown

Show shutdown.

switch_user()
switch user

Switch user.


Compositor Support

treeland_dde_shell_manager_v1↓
Compositors
CageCage0.3.0
x
COSMICCOSMIC1.11.0
x
flakewm3.0.5
2
GameScopeGameScope3.17.0
x
HyprlandHyprland0.57.2
x
Jay1.14.0
x
KWinKWin6.7
x
LabwcLabwc0.20.2
x
LouvreLouvre2.14.1
x
MangoMango0.16.3
x
MirMir2.26
x
MuffinMuffin6.7.4
x
MutterMutter51
x
niriniri26.04
x
phocphoc0.55
x
Pila0.5.1
x
QtileQtile0.37.1
x
riverriver0.5.0
x
SwaySway1.11
x
TreelandTreeland0.8.0
1
WayfireWayfire0.9.0
x
WestonWeston15.0.1
x

SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. SPDX-License-Identifier: MIT