Bug 475433

Summary: Add the option to take a rectangle area screenshot
Product: [Plasma] xdg-desktop-portal-kde Reporter: Aura_Mancer <auramanceralt>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: aleixpol, jgrulich, nate, noahadvs, puspitaadak9876
Priority: NOR    
Version First Reported In: 5.27.8   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: The desktop portal window in question, showing the dropdown lacking the desired feature.

Description Aura_Mancer 2023-10-10 15:14:32 UTC
Created attachment 162190 [details]
The desktop portal window in question, showing the dropdown lacking the desired feature.

SUMMARY

Adding the option to area screenshot in the KDE desktop portal would allow better ease of use with certain apps, for example, Frog, an optical character recognition application, would work best selecting parts of the screen instead of an entire window.

STEPS TO REPRODUCE
1. Use any app that requests a screenshot
2. KDE Desktop Portal window "Request screenshot - Portal" appears
3. There is not an option to take a rectangle region screenshot in the "Area: " dropdown

OBSERVED RESULT
There is not an option to take a rectangle region screenshot in the "Area: " dropdown

EXPECTED RESULT
In the "Area: " drop-down, there is the option to take a screenshot of a rectangular region.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 

KDE Plasma Version:  5.27.8
KDE Frameworks Version: 5.110.10
Qt Version: 5.15.10

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2023-10-11 15:55:15 UTC
It's a good idea, but I'm afraid the protocol governing portal-based screenshots currently says nothing about rectangular region screenshots; see https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Screenshot.

The protocol would need to be extended upstream first; only then could we add support for the new protocol feature for rectangular region screenshots.
Comment 2 Puspam Adak 2023-11-25 09:32:09 UTC
(In reply to Nate Graham from comment #1)
> It's a good idea, but I'm afraid the protocol governing portal-based
> screenshots currently says nothing about rectangular region screenshots; see
> https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.
> Screenshot.
> 
> The protocol would need to be extended upstream first; only then could we
> add support for the new protocol feature for rectangular region screenshots.

Gnome already have this feature in its portal implementation. An application just wants a screenshot, so it wouldn't matter what screenshot we provide to the application. Extending the protocol can be done, but for the time being, users shouldn't be left with no option.
Comment 3 Nate Graham 2023-11-29 19:38:45 UTC
Ah, right.