hyprwm / xdg-desktop-portal-hyprland

xdg-desktop-portal backend for Hyprland
BSD 3-Clause "New" or "Revised" License
273 stars 47 forks source link

[won't be fixed, see comment] hyprland-share-picker is shown multiple times #11

Closed hikkidev closed 8 months ago

hikkidev commented 1 year ago

Steps to reproduce

Try to share an entire screen or a window (video).

Expected behavior:

hyprland-share-picker is shown once

Actual behavior:

hyprland-share-picker is shown multiple times (video)

Logs

hyprland.log xdph.log

Soft

hyprland-bin: (https://github.com/hyprwm/Hyprland/releases/tag/v0.19.1beta) xdg-desktop-portal-hyprland-git r240.7567892-1

System

OS             Arch Linux x86_64 
Kernel         6.0.11-zen1-1-zen 
Packages       1016 (pacman) 
DE             Hyprland 
Resolution     3440x1440 
Shell          zsh 5.9.0.1-dev 
Terminal       foot 
CPU            AMD Ryzen 7 3800X (16) @ 3.9GHz
GPU            AMD ATI Radeon 6900 XT 
GPU Driver     amdgpu 

Redirect from https://github.com/hyprwm/Hyprland/issues/1223

vaxerski commented 1 year ago

is that a problem with xdph? iirc, some apps would do the same on xdpw. It seems like they just send a screencast request multiple times.

bklaase commented 1 year ago

Some apps (teams for example) do a little preview of the connected monitors; this result in a separate request (resulting in showing the picker), that then gets repeated after confirming (in-app, not with picker) an arbitrary choice (since the picker is leading).

jh-devv commented 8 months ago

152 Similar, closing that

jh-devv commented 8 months ago

@hikkidev Can you reproduce this on the gUM Test Page; I can only reproduce this on DIscord?

jh-devv commented 8 months ago

Though sometimes, this issue seems to result to XDPH to cease being responsive and needing a force kill and reopen? Before this happens it prints [ERR] [screencopy] Couldn't obtain a format from dma

ppenguin commented 8 months ago

My screen sharing recently stopped working (again) with the (usual) black screen issue. Other than that, I've been seeing this "2x sharepicker" for a long time on jitsi-meet on chrome, also when the screensharing was working.

What is different this time:

I'm on NixOS (nixos-unstable) and there's no difference between Hyprland from nixpkgs (0.33.1) or 0.34.0 (tried both)

EDIT: oh, the black screen is possibly solved (again) by this: https://github.com/hyprwm/xdg-desktop-portal-hyprland/commit/54a30259be0dd196ffc260d6a52b6bbdbf1d5273, testing it...

fufexan commented 8 months ago

I think 1.3.0 fixes this issue, so maybe try that.

IMRogue commented 8 months ago

Nope i still have it with 1.3.1-2

ppenguin commented 8 months ago

EDIT: oh, the black screen is possibly solved (again) by this: 54a3025, testing it...

Forgot to report back: using github:hyprwm/xdg-desktop-portal-hyprland/1c802128f6cc3db29a8ef01552b1a22f894eeefd (i.e. newest commit last week) in an overlay on NixOS worked for me (in combination with Hyprland d8dbdc4a017e051b3dde2e93791e2495722bfa21), and that's in 1.3.1, so not sure why that didn't work for others?

jh-devv commented 8 months ago

EDIT: oh, the black screen is possibly solved (again) by this: 54a3025, testing it...

Forgot to report back: using github:hyprwm/xdg-desktop-portal-hyprland/1c802128f6cc3db29a8ef01552b1a22f894eeefd (i.e. newest commit last week) in an overlay on NixOS worked for me (in combination with Hyprland d8dbdc4a017e051b3dde2e93791e2495722bfa21), and that's in 1.3.1, so not sure why that didn't work for others?

@ppenguin Can confirm, now works! You also don't need the overlay, just use the Hyprland flake and


programs.hyprland.portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
hikkidev commented 8 months ago

"Fixed" - Some apps just send a screencast request multiple times

moritzuehling commented 7 months ago

I apprechiate that it's the other programs behaving badly. However, this affects a lot of apps in practice (chromium, discord, other electron apps), and it's quite annoying.

Is there a possibility of e.g. a workaround being implemented, where multiple share-requests by the same app within a few seconds are auto-responded?

I am aware that this would have adverse effects (both from a usability perspective, and a security perspective), and probably should be behind a config option, but it would massively simplify some of my workflows. I can't always chose which apps I use e.g. for work, unfortunately.

vaxerski commented 7 months ago

"a lot of apps"

well, no, just browsers xD

Anyways, feel free to mr

moritzuehling commented 7 months ago

well, no, just browsers xD

Entirely fair, that said, hyprland is so far my favorite way to organize all my browsers, like my IDE, messaging apps, email client, task managment software, ... :)

Anyways, feel free to mr

I'll look into it, but my C++ has always been a bit dicey

jficz commented 3 days ago

"a lot of apps"

imho more precisely a lot of use cases.

For me, for example, it's just Zoom, Slack, and browsers but it's also pretty much all the apps I use for screensharing, making this problem extremely annoying.

A checkbox saying "Remember selection for n seconds" would indeed be nice but I'm not sure if the picker is even stateful for this to be possible.

vaxerski commented 3 days ago

allow the restore token and on recent xdph versions (1.3.5) it wont show up multiple times