Closed phw closed 7 years ago
Ah, just noticed GDK_BACKEND=x11 is already applied. I of course ran it from command line. Still you would have the option to support this natively :)
Umm who says it doesn't work? It works here with Wayland with Fedora 25. A lot of people tested it. And Green Recorder already uses GDK_BACKEND=x11 to run itself. And SelectArea method can be used, but we need to allow the user to specify an area instead of just entering the values. So using xwininfo (which will work thanks to x11 backend) was a good option for us.
The second problem is that we won't be able to show the icon in the notifications area for some reason if we "supported it nativly". The appindicator library seems to be having some problems with Wayland (or maybe our implementation). So using GDK_BACKEND=x11 was a solution for both problems.
See my comment above, I missed the fact about GDK_BACKEND already being applied, since I ran it from command line. Still you could consider using SelectArea from org.gnome.Shell.Screenshot (it will allow the user to select an area) if you want to have this native.
If you keep using GDK_BACKEND=x11 you could add a warning dialog when running with Wayland backend that this is not supported. At least this is what I will do for Peek (which has exactly the same issue).
Well, using SelectArea from screenshot object would be a better option to allow the user to select a free area (because using a separated window makes the user unable to record the top bar). But I didn't want to depend heavily on GNOME objects since KWin may add such functionality to be able to record soon. Thus, using xwininfo with X11 backend on Wayland KWin should also work in the future to grab any area.
could add a warning dialog when running with Wayland backend that this is not supported
Who/which do you mean by "not supported"?
Who/which do you mean by "not supported"?
What you said above: If you run green-recorder with the Wayland GDK backend (that is not with GDK_BACKEND=x11
) some functionality does not work. But for the user this is not directly clear. So informing the user that this is unsupported and green-recorder should be run with GDK_BACKEND=x11
might be helpful.
Yes. You are right. Although most users will just run from the .desktop file. It may be a better option to add a warning to define that variable automatically when running the program to avoid any problem. On the to-do list.
@phw and @mhsabbagh You guys should work together! You both are working on screen recorders :)
Just a heads up that the screen area recording does not work under wayland, since you use xwininfo for selecting the area.
I think the best option for you is to just use the
SelectArea
method of theorg.gnome.Shell.Screenshot
DBus service instead of the custom area choosing window. See https://github.com/GNOME/gnome-shell/blob/master/data/org.gnome.Shell.Screenshot.xmlA current workaround to still use the custom window would be to use XWayland by launching green-recorder with
GDK_BACKEND=x11
set (and of course requiring XWayland to be available).See also the discussions on https://github.com/phw/peek/issues/33