mirror of
https://github.com/WayfireWM/wf-osk.git
synced 2025-08-31 08:12:15 +02:00
Layer-shell support (#1)
* proto: added layer-shell support * added clara header file helper for parsing the cli options. * cli: added command line options * style: fixed style issues * exiting main loop on close * port to gtk-layer-shell * fixup! port to gtk-layer-shell * implement custom header-bar * update wayfire-shell-v2
This commit is contained in:
committed by
Ilia Bozhinov
parent
fe233eef74
commit
d28bd69671
@@ -15,8 +15,8 @@ wayland_scanner_client = generator(
|
||||
)
|
||||
|
||||
client_protocols = [
|
||||
'wayfire-shell.xml',
|
||||
'virtual-keyboard-unstable-v1.xml'
|
||||
['wayfire-shell-unstable-v2.xml'],
|
||||
['virtual-keyboard-unstable-v1.xml']
|
||||
]
|
||||
|
||||
wl_protos_src = []
|
||||
|
120
proto/wayfire-shell-unstable-v2.xml
Normal file
120
proto/wayfire-shell-unstable-v2.xml
Normal file
@@ -0,0 +1,120 @@
|
||||
<protocol name="wayfire_shell">
|
||||
<interface name="zwf_shell_manager_v2" version="1">
|
||||
<description summary="DE integration">
|
||||
This protocol provides additional events and requests for special DE
|
||||
clients like panels, docks, etc.
|
||||
|
||||
It is meant as an addition for protocols like wlr-layer-shell.
|
||||
</description>
|
||||
|
||||
<request name="get_wf_output">
|
||||
<description summary="Create a zwf_output_v2 for the given wl_output"/>
|
||||
<arg name="output" type="object" interface="wl_output"/>
|
||||
<arg name="id" type="new_id" interface="zwf_output_v2"/>
|
||||
</request>
|
||||
|
||||
<request name="get_wf_surface">
|
||||
<description summary="Create a zwf_surface_v2 for the given wl_surface"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"/>
|
||||
<arg name="id" type="new_id" interface="zwf_surface_v2"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="zwf_output_v2" version="1">
|
||||
<description summary="A wrapper for wl_output">
|
||||
Represents a single output.
|
||||
Each output is managed independently from the others.
|
||||
</description>
|
||||
|
||||
<event name="enter_fullscreen">
|
||||
<description summary="A window was fullscreened">
|
||||
Emitted when a window gets fullscreened on the given output. In this
|
||||
mode, windows in the TOP layer are not visible.
|
||||
|
||||
There will be no two consecutive enter_fullscreen calls, i.e. if
|
||||
fullscreen mode is entered it will be exited before going into this mode
|
||||
again.
|
||||
</description>
|
||||
</event>
|
||||
|
||||
<event name="leave_fullscreen">
|
||||
<description summary="A window was fullscreened">
|
||||
Emitted when the output is no longer in fullscreen mode. Each
|
||||
leave_fullscreen has a corresponding enter_fullscreen before it.
|
||||
</description>
|
||||
</event>
|
||||
|
||||
<request name="inhibit_output">
|
||||
<description summary="Don't render the output">
|
||||
Request the compositor to not render the output, so the output usually
|
||||
is cleared to black color. To enable output rendering again, call
|
||||
inhibit_output_done.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="inhibit_output_done">
|
||||
<description summary="Render the output">
|
||||
Stop inhibiting the output. This must be called as many times as
|
||||
inhibit_output was called to actually uninhibit rendering.
|
||||
|
||||
The inhibit/inhibit_done requests can be called multiple times, even
|
||||
from different apps, so don't assume that a call to inhibit_done would
|
||||
always mean actually starting the rendering process.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<enum name="hotspot_edge">
|
||||
<entry name="top" value="1"/>
|
||||
<entry name="bottom" value="2"/>
|
||||
<entry name="left" value="4"/>
|
||||
<entry name="right" value="8"/>
|
||||
</enum>
|
||||
|
||||
<request name="create_hotspot">
|
||||
<description summary="Create a hotspot on the output">
|
||||
A hotspot on the output is an edge or a corner region of the
|
||||
output where the mouse or touch point has been residing for a given
|
||||
amount of time.
|
||||
|
||||
The hotspot can be used for example for autohiding panels, where the
|
||||
panel is shown when the input hovers on the edge of the output for a
|
||||
specific amount of time.
|
||||
</description>
|
||||
|
||||
<arg name="hotspot" type="uint" summary="bitwise or of the edges the output"/>
|
||||
<arg name="threshold" type="uint" summary="distance from the edge of the output"/>
|
||||
<arg name="timeout" type="uint" summary="minimum time for the mouse to be in the hotspot"/>
|
||||
<arg name="id" type="new_id" interface="zwf_hotspot_v2"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="zwf_hotspot_v2" version="1">
|
||||
<description summary="An edge of the output defined by 1 or 2 edges"/>
|
||||
|
||||
<event name="enter">
|
||||
<description summary="Hotspot was triggered">
|
||||
Means that the mouse and/or touch finger was inside the indicated
|
||||
hotspot for the given amount of time.
|
||||
|
||||
Emitted at most once for each entry of the input inside the hotspot.
|
||||
</description>
|
||||
</event>
|
||||
|
||||
<event name="leave">
|
||||
<description summary="Input left hotspot">
|
||||
This event indicates that the mouse or touch point has left the hotspot
|
||||
area.
|
||||
|
||||
Emitted only once after each enter.
|
||||
</description>
|
||||
</event>
|
||||
</interface>
|
||||
|
||||
<interface name="zwf_surface_v2" version="1">
|
||||
<description summary="A special surface"/>
|
||||
<request name="interactive_move">
|
||||
<description summary="Start an interactive move of the surface"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
</protocol>
|
@@ -1,172 +0,0 @@
|
||||
<protocol name="wayfire_shell">
|
||||
<interface name="zwf_shell_manager_v1" version="1">
|
||||
<description summary="DE integration">
|
||||
IMPORTANT: most of wayfire-shell is going to be deprecated. Try to
|
||||
use layer-shell instead.
|
||||
|
||||
The purpose of this protocol is to enable the creation of different
|
||||
desktop-interface windows like panels, backgrounds, docks,
|
||||
lockscreens, etc. It also aims to allow the creation of full-blown
|
||||
DEs using Wayfire.
|
||||
|
||||
Note that in contrast to some other efforts to create a similar
|
||||
protocol, such as wlr-layer-shell, this isn't a new "shell" for
|
||||
giving a role to wl_surfaces. This protocol can be used with any
|
||||
type of toplevel surface (xdg_toplevel, xdg_toplevel_v6, etc.)
|
||||
to give them to the corresponding WM role.
|
||||
</description>
|
||||
|
||||
<request name="get_wf_output">
|
||||
<description summary="Create a wf_output from the given output"/>
|
||||
<arg name="output" type="object" interface="wl_output"/>
|
||||
<arg name="id" type="new_id" interface="zwf_output_v1"/>
|
||||
</request>
|
||||
|
||||
<request name="get_wm_surface">
|
||||
<description summary="Assign a role">
|
||||
Assign the given role to the given surface and add it to the
|
||||
given output. A client can specify a null output, in which case
|
||||
the compositor will assign the surface to the focused output,
|
||||
if any such output.
|
||||
|
||||
The role cannot be changed later, and neither can the surface be
|
||||
moved to a different output, except by the compositor.
|
||||
</description>
|
||||
|
||||
<arg name="surface" type="object" interface="wl_surface"/>
|
||||
<arg name="role" type="uint" enum="zwf_wm_surface_v1.role"/>
|
||||
<arg name="output" type="object" interface="wl_output" allow-null="true"/>
|
||||
<arg name="id" type="new_id" interface="zwf_wm_surface_v1"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="zwf_output_v1" version="1">
|
||||
<description summary="A wrapper for wl_output">
|
||||
Represents a single output.
|
||||
Each output is managed independently from the others.
|
||||
</description>
|
||||
<event name="output_hide_panels">
|
||||
<description summary="Autohide/Show signal">
|
||||
Panels are always rendered on top, even above fullscreen windows.
|
||||
If autohide is 1, the event indicates that the panels should hide
|
||||
itself, by for example unmapping or sliding outside of the output.
|
||||
If autohide is 0, this means that the reason for the last request
|
||||
with autohide == 1 is no longer valid, i.e the panels can show
|
||||
themselves.
|
||||
|
||||
The output_hide_panels can be called multiple times with
|
||||
autohide = 1, and the panel should show itself only when
|
||||
it has received a matching number of events with autohide = 0
|
||||
</description>
|
||||
|
||||
<arg name="autohide" type="uint"/>
|
||||
</event>
|
||||
|
||||
<request name="inhibit_output">
|
||||
<description summary="Don't render the output">
|
||||
Request the compositor to not render the output, so
|
||||
the output usually is cleared to black color.
|
||||
To enable output rendering again, call inhibit_output_done
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="inhibit_output_done">
|
||||
<description summary="Render the output">
|
||||
Stop inhibiting the output. This must be called as many times
|
||||
as inhibit_output was called to actually uninhibit rendering.
|
||||
|
||||
The inhibit/inhibit_done requests can be called multiple times,
|
||||
even from different apps, so don't assume that a call to
|
||||
inhibit_done would always mean actually starting the rendering process.
|
||||
</description>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="zwf_wm_surface_v1" version="1">
|
||||
<description summary="Surface with a WM role">
|
||||
Represents a surface with a specific WM role.
|
||||
It belongs to the output which it was created for.
|
||||
</description>
|
||||
|
||||
<enum name="role">
|
||||
<entry name="background" value="1"/>
|
||||
<entry name="bottom" value="2"/>
|
||||
<entry name="panel" value="3"/>
|
||||
<entry name="overlay" value="4"/>
|
||||
<entry name="desktop_widget" value="5"/>
|
||||
</enum>
|
||||
|
||||
<request name="configure">
|
||||
<description summary="Move the surface to the given output-local coordinates."/>
|
||||
|
||||
<arg name="x" type="int"/>
|
||||
<arg name="y" type="int"/>
|
||||
</request>
|
||||
|
||||
<enum name="anchor_edge">
|
||||
<entry name="top" value="1"/>
|
||||
<entry name="bottom" value="2"/>
|
||||
<entry name="left" value="4"/>
|
||||
<entry name="right" value="8"/>
|
||||
</enum>
|
||||
|
||||
<request name="set_anchor">
|
||||
<description summary="set anchor position">
|
||||
Sets the position on the screen where the compositor should
|
||||
position the view. Can be reset by specifying anchor 0. If not
|
||||
set, the compositor will assume manual positioning via the
|
||||
configure request.
|
||||
|
||||
If one anchor edge is provided, the wm surface is "stuck" to
|
||||
that edge.
|
||||
If two anchor edges are provided, the wm surface is considered
|
||||
anchored to the corner of the screen between them.
|
||||
|
||||
Any other anchor edge configuration is considered invalid.
|
||||
</description>
|
||||
<arg name="anchors" type="uint"/>
|
||||
</request>
|
||||
|
||||
<request name="set_margin">
|
||||
<description summary="set margin respective to anchored edges">
|
||||
Set the offset from the anchored edges to the wm surface. This
|
||||
is an alternative to the configure request. Using both will
|
||||
result in undefined results.
|
||||
|
||||
Margin has effect only for edges the wm surface is anchored to.
|
||||
</description>
|
||||
|
||||
<arg name="top" type="int"/>
|
||||
<arg name="bottom" type="int"/>
|
||||
<arg name="left" type="int"/>
|
||||
<arg name="right" type="int"/>
|
||||
</request>
|
||||
|
||||
<enum name="keyboard_focus_mode">
|
||||
<entry name="no_focus" value="0"/>
|
||||
<entry name="click_to_focus" value="1"/>
|
||||
<entry name="exclusive_focus" value="2"/>
|
||||
</enum>
|
||||
|
||||
<request name="set_keyboard_mode">
|
||||
<description summary="Set keyboard focus mode">
|
||||
Sets how the wm surface will interact with keyboard focus.
|
||||
Setting no_focus means that the surface will never receive
|
||||
keyboard focus, click_to_focus means normal focus semantics (i.e
|
||||
what you expect from "normal" windows), and exclusive focus means
|
||||
that no other window can get keyboard focus.
|
||||
</description>
|
||||
<arg name="mode" type="uint" enum="keyboard_focus_mode"/>
|
||||
</request>
|
||||
|
||||
<request name="set_exclusive_zone">
|
||||
<description summary="Reserve pixels">
|
||||
Request the compositor to reserve the given amount of pixels
|
||||
for the wm surface(like STRUTS in X11). This has effect only
|
||||
if the surface is anchored to a single edge. Margin doesn't
|
||||
affect exclusive zone in any way.
|
||||
</description>
|
||||
<arg name="size" type="uint"/>
|
||||
</request>
|
||||
</interface>
|
||||
</protocol>
|
Reference in New Issue
Block a user