From neugens at redhat.com Wed Oct 6 18:29:58 2021 From: neugens at redhat.com (Mario Torre) Date: Wed, 6 Oct 2021 20:29:58 +0200 Subject: Tomorrow's sync up Message-ID: Hi everyone! I may not be able to join tomorrow's call. From my side the only small progress was to add a QT based screenshot testcase to my wakefield branch, the code doesn't take the screenshot if under wayland however (not even returning an empty pixel array or a black one), so there's a lot more to explore here too. Cheers, Mario -- Mario Torre Manager, Software Engineering, core OpenJDK Red Hat GmbH 9704 A60C B4BE A8B8 0F30 9205 5D7E 4952 3F65 7898 From victor.dyakov at oracle.com Wed Oct 6 19:59:17 2021 From: victor.dyakov at oracle.com (Victor D'yakov) Date: Wed, 6 Oct 2021 12:59:17 -0700 Subject: Tomorrow's sync up In-Reply-To: References: Message-ID: Hi Mario, Since we do not have new items/questions from Alexander this time I'm going to cancel tomorrow's meeting. See you next time, Victor On 10/6/21 11:29 AM, Mario Torre wrote: > Hi everyone! > > I may not be able to join tomorrow's call. From my side the only small > progress was to add a QT based screenshot testcase to my wakefield > branch, the code doesn't take the screenshot if under wayland however > (not even returning an empty pixel array or a black one), so there's a > lot more to explore here too. > > Cheers, > Mario > From jadahl at redhat.com Thu Oct 7 12:34:26 2021 From: jadahl at redhat.com (Jonas =?iso-8859-1?Q?=C5dahl?=) Date: Thu, 7 Oct 2021 14:34:26 +0200 Subject: Persistent screen sharing Message-ID: Hi, A concern about being able to capture the screen via portals has been that the user currently have to explicitly select what is shared each time. What was mentioned in the past is that there has been talks about how to improve this, to make it less problematic for an application that might want less restrictions. This is currently being discussed upstream, in this pull request: https://github.com/flatpak/xdg-desktop-portal/pull/638 I hope this helps. Jonas From zzambers at redhat.com Mon Oct 18 21:49:54 2021 From: zzambers at redhat.com (=?UTF-8?B?WmRlbsSbayDFvWFtYmVyc2vDvQ==?=) Date: Mon, 18 Oct 2021 23:49:54 +0200 Subject: Screenshot through x11 on Xwayland Message-ID: Hi, I experimented a bit with X11 approach. I made simple program [1], which obtains pixel data for each top-level X11 window, combines them to single buffer and then saves it to png file. It has some limitations, most notably not being able to capture native wayland windows and loss of transparency information. However, I think, it is still interesting. I created 2 screenshots from gnome-shell on wayland (RHEL-8), first one [2] is screenshot as produced by this program, second one [3] shows what was actually visible on VMs display. I have not yet tested it on Xwayland with other graphical environments than gnome-shell. (But feel free to experiment with this program on your wayland desktop.) Some technical notes (from testing on gnome-shell): - Xwayland is xserver, which runs as wayland client in "rootless" mode (see [4]), ? in which root window has no pixel storage, but otherwise it still exists. ? (not to be confused with running xserver as non-root user, which is sometimes also referred as rootless mode) - XGetImage for both root window and "Composite Overlay Window" (defined in composite extension [5]) fail with BadMatch - XQueryTree [6] can be used on root window to obtain list of it's children (x11 windows) in stacking order (bottom to top) - Image of individual top-level windows (children of the root window) can be obtained by XGetImage [7], ? but window has to meet following conditions (otherwise it fails with BadMatch): ? - class is InputOutput (not InputOnly) ? - map_state is IsViewable ? - area specified does not lies fully inside of the root window - pixel data obtained by XGetImage do not contain alpha information (btw. xserver (Xwayland) reports 24bit depth), ? so transparent pixels became opaque (see window shadows by gnome shell and shaped window (xeyes) on linked screenshots) - nor pixel data nor any other information about native wayland windows can be obtained through x11 (Xwayland), ? so they are completely missing on the screenshot (also areas of x11 windows covered by them become visible) This approach is far from perfect, but perhaps could be used as last resort to support some sort of screenshot on Xwayland in graphical environment agnostic way (needs to be tested). (Probably still better than array of black pixels after XGetImage on root window fails...) [1] https://github.com/zzambers/wayland-experiments/tree/main/x11-screenshot [2] https://github.com/zzambers/wayland-experiments/blob/fff27096e89bcb76ee43329ce987ccbb66dc4099/Screenshot-gnome-x11.png [3] https://github.com/zzambers/wayland-experiments/blob/fff27096e89bcb76ee43329ce987ccbb66dc4099/Screenshot-gnome-vm.png [4] https://gitlab.freedesktop.org/xorg/xserver/-/blob/ca1dfdc9aa4b548de624d3a9af5147a998ba3d79/miext/rootless/README.txt [5] https://www.x.org/releases/X11R7.5/doc/compositeproto/compositeproto.txt [6] https://www.x.org/releases/current/doc/libX11/libX11/libX11.html#XQueryTree [7] https://www.x.org/releases/current/doc/libX11/libX11/libX11.html#XGetImage -- Zden?k ?ambersk? OpenJDK QE Red Hat From zzambers at redhat.com Mon Oct 18 23:51:20 2021 From: zzambers at redhat.com (=?UTF-8?B?WmRlbsSbayDFvWFtYmVyc2vDvQ==?=) Date: Tue, 19 Oct 2021 01:51:20 +0200 Subject: Screenshot through x11 on Xwayland In-Reply-To: References: Message-ID: On 18. 10. 21 23:49, Zden?k ?ambersk? wrote: > Hi, > > I experimented a bit with X11 approach. I made simple program [1], > which obtains > pixel data for each top-level X11 window, combines them to single > buffer and then > saves it to png file. It has some limitations, most notably not being > able to > capture native wayland windows and loss of transparency information. > However, I think, it is still interesting. > > I created 2 screenshots from gnome-shell on wayland (RHEL-8), first > one [2] is screenshot > as produced by this program, second one [3] shows what was actually > visible on VMs display. > > I have not yet tested it on Xwayland with other graphical environments > than gnome-shell. > (But feel free to experiment with this program on your wayland desktop.) > > > Some technical notes (from testing on gnome-shell): > - Xwayland is xserver, which runs as wayland client in "rootless" mode > (see [4]), > ? in which root window has no pixel storage, but otherwise it still > exists. > ? (not to be confused with running xserver as non-root user, which is > sometimes also referred as rootless mode) > - XGetImage for both root window and "Composite Overlay Window" > (defined in composite extension [5]) fail with BadMatch > - XQueryTree [6] can be used on root window to obtain list of it's > children (x11 windows) in stacking order (bottom to top) > - Image of individual top-level windows (children of the root window) > can be obtained by XGetImage [7], > ? but window has to meet following conditions (otherwise it fails with > BadMatch): > ? - class is InputOutput (not InputOnly) > ? - map_state is IsViewable > ? - area specified does not lies fully inside of the root window * area specified lies fully inside of the root window > - pixel data obtained by XGetImage do not contain alpha information > (btw. xserver (Xwayland) reports 24bit depth), > ? so transparent pixels became opaque (see window shadows by gnome > shell and shaped window (xeyes) on linked screenshots) > - nor pixel data nor any other information about native wayland > windows can be obtained through x11 (Xwayland), > ? so they are completely missing on the screenshot (also areas of x11 > windows covered by them become visible) > > > This approach is far from perfect, but perhaps could be used as last > resort > to support some sort of screenshot on Xwayland in graphical > environment agnostic way (needs to be tested). > (Probably still better than array of black pixels after XGetImage on > root window fails...) > > > [1] > https://github.com/zzambers/wayland-experiments/tree/main/x11-screenshot > [2] > https://github.com/zzambers/wayland-experiments/blob/fff27096e89bcb76ee43329ce987ccbb66dc4099/Screenshot-gnome-x11.png > [3] > https://github.com/zzambers/wayland-experiments/blob/fff27096e89bcb76ee43329ce987ccbb66dc4099/Screenshot-gnome-vm.png > [4] > https://gitlab.freedesktop.org/xorg/xserver/-/blob/ca1dfdc9aa4b548de624d3a9af5147a998ba3d79/miext/rootless/README.txt > [5] > https://www.x.org/releases/X11R7.5/doc/compositeproto/compositeproto.txt > [6] > https://www.x.org/releases/current/doc/libX11/libX11/libX11.html#XQueryTree > [7] > https://www.x.org/releases/current/doc/libX11/libX11/libX11.html#XGetImage > -- Zden?k ?ambersk? OpenJDK QE Red Hat From victor.dyakov at oracle.com Tue Oct 19 20:17:58 2021 From: victor.dyakov at oracle.com (Victor D'yakov) Date: Tue, 19 Oct 2021 13:17:58 -0700 Subject: Tomorrow's sync up In-Reply-To: References: Message-ID: I'm going to cancel a meeting this week as we are doing some progress, but nothing is detailed enough to share so far. Let's meet next time as already scheduled. Thanks, Victor Java Client Group Manager, Oracle America, Inc. On 10/6/21 11:29 AM, Mario Torre wrote: > Hi everyone! > > I may not be able to join tomorrow's call. From my side the only small > progress was to add a QT based screenshot testcase to my wakefield > branch, the code doesn't take the screenshot if under wayland however > (not even returning an empty pixel array or a black one), so there's a > lot more to explore here too. > > Cheers, > Mario >