https://bugs.kde.org/show_bug.cgi?id=387721

            Bug ID: 387721
           Summary: "screenshotArea" dbus API needs a "selectArea" method
                    or similar
           Product: kwin
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kwin-bugs-n...@kde.org
          Reporter: je...@zemarmot.net
  Target Milestone: ---

I have implemented screenshot through KWin API in GIMP. It is working fine
except for the rectangular area screenshot.

"org.kde.kwin.Screenshot" provides a "screenshotArea" method, but it requires
to get coordinates. While this could be done in X11, in Wayland, this can only
be done through an API.

Here is for instance GNOME API for screenshots:
https://git.gnome.org/browse/gnome-shell/tree/data/org.gnome.Shell.Screenshot.xml
As you can see it provides a "SelectArea" method which allows to select a
rectangular area interactively and returns coordinates and width/length.

Could KDE implement something similar?

It looks like you could also make good usage of it. In Spectacle code, I see
that grabRectangularRegion() shows an "// unsupported", so I assume it doesn't
work in your own screenshot application (untested, just assumption! :P):
https://cgit.kde.org/spectacle.git/tree/src/PlatformBackends/KWinWaylandImageGrabber.cpp

Anyway thanks!

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to