Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(XWayland): add '[get|set]_baselayer_app_id' methods to primary XWayland #11

Merged
merged 2 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ zbus = { version = "3.15.2", default-features = false, features = ["tokio"] }
zbus_macros = "3.15.2"
inotify = "0.11.0"
gamescope-wayland-client = { git = "https://github.com/ShadowBlip/gamescope-wayland-client.git", version = "0.1.0" }
gamescope-x11-client = { git = "https://github.com/ShadowBlip/gamescope-x11-client.git", rev = "3a0cbe64ba60dffb5ad85f156101c056f764e659" }
gamescope-x11-client = { git = "https://github.com/ShadowBlip/gamescope-x11-client.git", rev = "deeab5be067bfbb2add2446d8c7fbcbeba7c8c7f" }
30 changes: 15 additions & 15 deletions bindings/dbus-xml/org-shadowblip-gamescope-manager.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.shadowblip.Gamescope.Manager">
<property name="Name" type="s" access="read"/>
</interface>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping">
</method>
<method name="GetMachineId">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface_name" type="s" direction="in"/>
Expand All @@ -40,4 +25,19 @@
<arg name="invalidated_properties" type="as"/>
</signal>
</interface>
<interface name="org.shadowblip.Gamescope.Manager">
<property name="Name" type="s" access="read"/>
</interface>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping">
</method>
<method name="GetMachineId">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg type="s" direction="out"/>
</method>
</interface>
</node>
254 changes: 138 additions & 116 deletions bindings/dbus-xml/org-shadowblip-gamescope-xwayland.xml
Original file line number Diff line number Diff line change
@@ -1,122 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.shadowblip.Gamescope.XWayland">
<!--
Emitted when a window property changes on a watched window.
-->
<signal name="WindowPropertyChanged">
<arg name="window" type="u"/>
<arg name="prop" type="s"/>
</signal>
<!--
Start watching the given window. The [WindowPropertyChanged] signal
will fire whenever a window property changes on the window. Use
[UnwatchWindow] to stop watching the given window.
-->
<method name="WatchWindow">
<arg name="window_id" type="u" direction="in"/>
</method>
<!--
Stop watching the given window. The [WindowPropertyChanged] signal will
no longer fire for the given window.
-->
<method name="UnwatchWindow">
<arg name="window_id" type="u" direction="in"/>
</method>
<!--
Discover the process IDs that are associated with the given window
-->
<method name="GetPidsForWindow">
<arg name="window_id" type="u" direction="in"/>
<arg type="au" direction="out"/>
</method>
<!--
Returns the window id(s) for the given process ID.
-->
<method name="GetWindowsForPid">
<arg name="pid" type="u" direction="in"/>
<arg type="au" direction="out"/>
</method>
<!--
Returns the window name of the given window
-->
<method name="GetWindowName">
<arg name="window_id" type="u" direction="in"/>
<arg type="s" direction="out"/>
</method>
<!--
Returns the window ids of the children of the given window
-->
<method name="GetWindowChildren">
<arg name="window_id" type="u" direction="in"/>
<arg type="au" direction="out"/>
</method>
<!--
Recursively returns all child windows of the given window id
-->
<method name="GetAllWindows">
<arg name="window_id" type="u" direction="in"/>
<arg type="au" direction="out"/>
</method>
<!--
Returns the currently set app ID on the given window
-->
<method name="GetAppId">
<arg name="window_id" type="u" direction="in"/>
<arg type="u" direction="out"/>
</method>
<!--
Sets the app ID on the given window
-->
<method name="SetAppId">
<arg name="window_id" type="u" direction="in"/>
<arg name="app_id" type="u" direction="in"/>
</method>
<!--
Removes the app ID on the given window
-->
<method name="RemoveAppId">
<arg name="window_id" type="u" direction="in"/>
</method>
<!--
Returns whether or not the given window has an app ID set
-->
<method name="HasAppId">
<arg name="window_id" type="u" direction="in"/>
<arg type="b" direction="out"/>
</method>
<!--
The X display name of the XWayland display (E.g. ":0", ":1")
-->
<property name="Name" type="s" access="read"/>
<!--
Returns true if this instance is the primary Gamescope xwayland instance
-->
<property name="Primary" type="b" access="read"/>
<!--
Returns the root window ID of the xwayland instance
-->
<property name="RootWindowId" type="u" access="read"/>
<!--
List of windows currently being watched for property changes. The
[WindowPropertyChanged] signal will fire whenever one of these windows
has a property change.
-->
<property name="WatchedWindows" type="au" access="read"/>
</interface>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping">
</method>
<method name="GetMachineId">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.shadowblip.Gamescope.XWayland.Primary">
<!--
Returns true if the window with the given window ID exists in focusable apps
Expand All @@ -125,6 +9,11 @@
<arg name="window_id" type="u" direction="in"/>
<arg type="b" direction="out"/>
</method>
<!--
Fires when the baselayer app id has been updated
-->
<signal name="BaselayerAppIdUpdated">
</signal>
<!--
Fires when the baselayer window has been updated
-->
Expand Down Expand Up @@ -181,6 +70,23 @@
<arg name="window_id" type="u" direction="in"/>
<arg name="value" type="u" direction="in"/>
</method>
<!--
Returns the currently set manual app focus
-->
<method name="GetBaselayerAppId">
<arg type="u" direction="out"/>
</method>
<!--
Focuses the app with the given app id
-->
<method name="SetBaselayerAppId">
<arg name="app_id" type="u" direction="in"/>
</method>
<!--
Removes the baselayer property to un-focus an app
-->
<method name="RemoveBaselayerAppId">
</method>
<!--
Returns the currently set manual focus
-->
Expand Down Expand Up @@ -260,6 +166,11 @@
-->
<property name="OverlayFocused" type="b" access="read"/>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface_name" type="s" direction="in"/>
Expand All @@ -284,4 +195,115 @@
<arg name="invalidated_properties" type="as"/>
</signal>
</interface>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping">
</method>
<method name="GetMachineId">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.shadowblip.Gamescope.XWayland">
<!--
Emitted when a window property changes on a watched window.
-->
<signal name="WindowPropertyChanged">
<arg name="window" type="u"/>
<arg name="prop" type="s"/>
</signal>
<!--
Start watching the given window. The [WindowPropertyChanged] signal
will fire whenever a window property changes on the window. Use
[UnwatchWindow] to stop watching the given window.
-->
<method name="WatchWindow">
<arg name="window_id" type="u" direction="in"/>
</method>
<!--
Stop watching the given window. The [WindowPropertyChanged] signal will
no longer fire for the given window.
-->
<method name="UnwatchWindow">
<arg name="window_id" type="u" direction="in"/>
</method>
<!--
Discover the process IDs that are associated with the given window
-->
<method name="GetPidsForWindow">
<arg name="window_id" type="u" direction="in"/>
<arg type="au" direction="out"/>
</method>
<!--
Returns the window id(s) for the given process ID.
-->
<method name="GetWindowsForPid">
<arg name="pid" type="u" direction="in"/>
<arg type="au" direction="out"/>
</method>
<!--
Returns the window name of the given window
-->
<method name="GetWindowName">
<arg name="window_id" type="u" direction="in"/>
<arg type="s" direction="out"/>
</method>
<!--
Returns the window ids of the children of the given window
-->
<method name="GetWindowChildren">
<arg name="window_id" type="u" direction="in"/>
<arg type="au" direction="out"/>
</method>
<!--
Recursively returns all child windows of the given window id
-->
<method name="GetAllWindows">
<arg name="window_id" type="u" direction="in"/>
<arg type="au" direction="out"/>
</method>
<!--
Returns the currently set app ID on the given window
-->
<method name="GetAppId">
<arg name="window_id" type="u" direction="in"/>
<arg type="u" direction="out"/>
</method>
<!--
Sets the app ID on the given window
-->
<method name="SetAppId">
<arg name="window_id" type="u" direction="in"/>
<arg name="app_id" type="u" direction="in"/>
</method>
<!--
Removes the app ID on the given window
-->
<method name="RemoveAppId">
<arg name="window_id" type="u" direction="in"/>
</method>
<!--
Returns whether or not the given window has an app ID set
-->
<method name="HasAppId">
<arg name="window_id" type="u" direction="in"/>
<arg type="b" direction="out"/>
</method>
<!--
The X display name of the XWayland display (E.g. ":0", ":1")
-->
<property name="Name" type="s" access="read"/>
<!--
Returns true if this instance is the primary Gamescope xwayland instance
-->
<property name="Primary" type="b" access="read"/>
<!--
Returns the root window ID of the xwayland instance
-->
<property name="RootWindowId" type="u" access="read"/>
<!--
List of windows currently being watched for property changes. The
[WindowPropertyChanged] signal will fire whenever one of these windows
has a property change.
-->
<property name="WatchedWindows" type="au" access="read"/>
</interface>
</node>
Loading
Loading