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

            Bug ID: 412731
           Summary: Please add API to get list of all window IDs on
                    Wayland (so that I can iterate over them and make
                    screenshots using org.kde.kwin.Screenshot)
           Product: kwin
           Version: 5.14.5
          Platform: Debian unstable
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: wayland-generic
          Assignee: kwin-bugs-n...@kde.org
          Reporter: safinas...@mail.ru
  Target Milestone: ---

My final task is this: I want to capture videos from all my opened videos.
Every window should produce its own video. Even covered windows should produce
video and ideally minimized ones, too.

Currently I do this using small C++ program written using Xlib.

Unfortunately the world is moving to Wayland, so I start to research how to do
similar thing on Wayland. I discovered that Wayland (as opposed to X11) doesn't
have standard way to get window images, so I should use some tricks, specific
for particular Wayland server implementation. (Note here: yes, I know about
xdg-desktop-portal, but as well as I know it doesn't give a way to take
screenshot or a video from particular specified window, so xdg-desktop-portal
is not for me.) So I started to research my Wayland server implementation, i.
e. kwin_wayland.

I discovered that kwin_wayland offers a way to take screenshot of a particular
window:

dbus-send --dest=org.kde.KWin /Screenshot
org.kde.kwin.Screenshot.screenshotForWindow <winid>

Unfortunately, I was unable to understand what is this <winid>. On X11 this is
(it seems) usual X11 window id. But on Wayland?! And how to get list of such
ids?

So, I ask for adding some way to get list of all IDs suitable to pass to
org.kde.kwin.Screenshot.screenshotForWindow . Preferably this should be another
dbus interface.

This will allow me to write program I need. This program will repeatedly call
screenshotForWindow for all windows on the system, thus creating videos.

Without such interface "screenshotForWindow" is completely useless and should
be removed.

Also screenshotForWindow doesn't take fd as opposed to other functions in
org.kde.kwin.Screenshot . This is bad, too, please, fix this.

SOFTWARE/OS VERSIONS
Linux Debian sid (created Oct 2019) amd64. KDE Plasma. Wayland

(available in About System)
KDE Plasma Version: 5.14.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.11.3

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

Reply via email to