mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2026-11-04 03:15:57 +00:00
xdg-desktop-portal backend for Hyprland
- C++ 93.5%
- CMake 2.3%
- Nix 2.1%
- Meson 2.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
* inputcapture: hand the EIS fd over instead of duplicating it sdbus::UnixFd(int) dups its argument, so ConnectToEIS sent the client a copy while the session kept the original fd from the compositor forever. That leaked the fd, and since xdph kept the client end of the socket open, the compositor's EIS server never saw the client disconnect. Adopt the fd into the reply and forget it, close it on session teardown if ConnectToEIS was never called, and close a previous fd if the compositor sends a new one. * inputcapture: own the pending EIS fd with sdbus::UnixFd Store the session's EIS fd in an owning sdbus::UnixFd instead of a raw int. reset(fd, adopt_fd) closes any previous fd, moving it into the ConnectToEIS reply hands ownership to the client, and the member's destructor closes it if ConnectToEIS was never called, so the manual close() calls and the SSession destructor go away. |
||
| .builds | ||
| .github | ||
| contrib | ||
| hyprland-share-picker | ||
| nix | ||
| protocols | ||
| src | ||
| subprojects | ||
| .clang-format | ||
| .editorconfig | ||
| .gitignore | ||
| .gitmodules | ||
| AGENTS.md | ||
| CMakeLists.txt | ||
| CONTRIBUTING.md | ||
| flake.lock | ||
| flake.nix | ||
| hyprland.portal | ||
| LICENSE | ||
| meson.build | ||
| meson_options.txt | ||
| org.freedesktop.impl.portal.desktop.hyprland.service.in | ||
| README.md | ||
| VERSION | ||
xdg-desktop-portal-hyprland
An XDG Desktop Portal backend for Hyprland.
Installing
First, make sure to install the required dependencies:
gbm
hyprland-protocols
hyprlang
hyprutils
hyprwayland-scanner
libdrm
libpipewire-0.3
libspa-0.2
sdbus-cpp
wayland-client
wayland-protocols
Then run the build and install command:
git clone --recursive https://github.com/hyprwm/xdg-desktop-portal-hyprland
cd xdg-desktop-portal-hyprland/
cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -DCMAKE_INSTALL_PREFIX=/usr -B build
cmake --build build
sudo cmake --install build
Nix
Caution
XDPH should not be used from this flake directly!
Instead, use it from the Hyprland flake.
There are two reasons for the above:
- Hyprland depends on XDPH, but XDPH also depends on Hyprland. This results in a cyclic dependency, which is a nightmare. To counter this, we use the Nixpkgs Hyprland package in this flake, so that it can be later consumed by the Hyprland flake while overriding the Hyprland package.
- Even if you manually do all the overriding, you may still get it wrong and lose out on the Cachix cache (which has XDPH as exposed by the Hyprland flake).