Bug 481461 - Clicking checkbox to select content to share does not work
Summary: Clicking checkbox to select content to share does not work
Status: RESOLVED FIXED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Nate Graham
URL:
Keywords: qt6
: 482517 485695 488508 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-02-17 12:10 UTC by Iyán Méndez Veiga
Modified: 2024-06-14 21:49 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In: Frameworks 6.3


Attachments
Running latest code from Plasma/6.0 branch (95.49 KB, image/png)
2024-02-17 17:48 UTC, Iyán Méndez Veiga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Iyán Méndez Veiga 2024-02-17 12:10:13 UTC
SUMMARY
When trying to share a screen or a window, a Screen Sharing dialog appears showing the available sources. For example, when selecting a new screen source in OBS Studio, the user can select a physical monitor, a rectangular area or a new virtual output.

These boxes have a click box on the top right corner. If the user click on those, the tick is shown but the share button is grayed out and disabled. Only clicking on the content area works (and also changes the click box).


STEPS TO REPRODUCE
1. Open OBS Studio (or any other app that allows to share screen)
2. Add a new source
3. Select Screen Capture (PipeWire)
4. Play with the Screen Sharing window

OBSERVED RESULT
When clicking on the box directly, the share button is not enabled.

EXPECTED RESULT
User can click the box or the content. Both options should mark the desired source and enable the share button.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.93.0
KDE Frameworks Version: 5.249.0
Qt Version: 6.7.0
Kernel Version: 6.7.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: LENOVO
Product Name: 20XYCTO1WW
System Version: ThinkPad X1 Yoga Gen 6
Comment 1 Iyán Méndez Veiga 2024-02-17 12:15:48 UTC
Here is a video of the issue:
https://drive.switch.ch/index.php/s/DfhCU46JWp8oTtm
Comment 2 Aleix Pol 2024-02-17 16:08:29 UTC
This piece of code has received quite a bit of love over the last few weeks, can you try refreshing it? I notice your laptop output name still doesn't have the fix.
Comment 3 Iyán Méndez Veiga 2024-02-17 17:48:43 UTC
Created attachment 165909 [details]
Running latest code from Plasma/6.0 branch

Still an issue on Plasma/6.0 branch. But yes, the laptop's screen now has a nice name :)
Comment 4 Nate Graham 2024-02-21 00:32:25 UTC
Cannot reproduce with current git master and Qt 6.6.0. or me, clicking on the checkboxes toggles the selection state of the cards as expected. Maybe a Qt 6.7 regression somehow?

FWIW I couldn't even see the checkbox version of the dialog at all when invoking it from OBS; I had to fake it by adding a `root.multiple = true;` to the component.onCompleted handler in ScreenDialogChooser.qml. If anyone can offer any pointers on how to get the dialog into multi-selection mode in a production environment, I'd be grateful.
Comment 5 Nate Graham 2024-03-08 18:53:26 UTC
*** Bug 482517 has been marked as a duplicate of this bug. ***
Comment 6 Adam Fontenot 2024-03-13 03:27:34 UTC
I reproduced this just now on portal version 6.0.1 and Qt 6.6.2.

Reproduction (two different ways):

1. Install Kooha, and use that to open the portal Screen Share window.
2. Use the Python snippet here: https://gitlab.gnome.org/-/snippets/19

Confirming on that basis.

Operating System: Arch Linux 
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 7 Nate Graham 2024-03-13 17:52:20 UTC
Can reproduce with those. I'll investigate.
Comment 8 useri 2024-03-30 18:46:04 UTC
Experiencing the same issue with KDE neon user edition 6.0.
Clicking the checkbox does not enable the share button

SOFTWARE/OS VERSIONS
Operating System: KDE neon
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.5.0-26-generic (64-bit)
Graphics Platform: Wayland


Out of curiosity I tested KDE neon Unstable Edition. The checkbox and the share button got fully removed there.

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 6.1.0
Qt Version: 6.6.2
Kernel Version: 6.5.0-26-generic (64-bit)
Graphics Platform: Wayland
Comment 9 Nate Graham 2024-04-21 12:23:32 UTC
*** Bug 485695 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2024-05-21 17:26:02 UTC
Ok, I just adjusted our test app to sent "true" for the "multiple" flag and now I can test this case and reproduce the issue. Will fix it.
Comment 11 Bug Janitor Service 2024-05-21 17:42:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/1561
Comment 12 Nate Graham 2024-05-21 17:47:10 UTC
That fixes it for me. The issue is obvious now.
Comment 13 Nate Graham 2024-05-21 20:31:38 UTC
Git commit 4a0bc5a89725407e800ce44c662e21e7f4a35d4f by Nate Graham.
Committed on 21/05/2024 at 19:36.
Pushed by ngraham into branch 'master'.

Card: emit toggled() when the user clicks on the header checkbox

Checkable cards display a checkbox in the header. When clicked, they
emit toggled() which gets bubbled up to the card. However the card
doesn't emit the toggled() signal itself, instead only setting the
value of its "checked" property.

As a result, anything that's listening to the card for a toggled()
signal will not get one. Such as, for example, the screen chooser
portal code.

Fix this by emitting the signal.
FIXED-IN: 6.3

M  +1    -0    src/controls/Card.qml

https://invent.kde.org/frameworks/kirigami/-/commit/4a0bc5a89725407e800ce44c662e21e7f4a35d4f
Comment 14 luminoso 2024-06-07 09:00:21 UTC
Is there any workaround to restore the greyed out button?
Comment 15 luminoso 2024-06-07 10:42:28 UTC
never mind. the workaround is to click in the image :-)
Comment 16 Nate Graham 2024-06-14 21:49:53 UTC
*** Bug 488508 has been marked as a duplicate of this bug. ***