In gimp you have the option to create an image from a screenshot and therein you can select a region to grab.
In X11 I can select any region of my screen(s).
With wayland I can only select a region in the Gimp windows not outside. This drastically limits the interest of this function.
Is this a problem of wayland or of gimp?
In Wayland by design client cannot access any information not belonging to this client. There is no native Wayland protocol to allow it. There is sideband solution (xdg-portal) that has screenshot support. It must be implemented both by Wayland compositor (server) and by Wayland client. I doubt Gimp supports it even if your (unkown) Wayland compositor does.
@phil524 , You can try spectacle. If it work then this is a gimp problem.
In an effort to replicate your problem I installed plasma x11 and plasma wayland session to try it in gimp and I can replicate your problem. Before I wrote this post I tried logging in again in plasma wayland but I had troubled with the invisible mouse cursor that didn’t happened in this machine before in plasma 5. so I wasn’t able to try spectacle if it is working properly in wayland.
I had spectacle installed and indeed I can select a region of the screen(s) to grab.
So the problem is with gimp. Tumbleweed has version 2.10-36 and the next version 3 is expected in a few months and it should support wayland AFAIK.
I don’t use gimp a lot, but when I do I run it in an Xorg session. For Plasma Wayland at least I only get a transparent window when launching gimp, so unable to test further here.
@phil524 , after the today’s snapshot I was able to get the mouse cursor in plasma wayland.
Gimp still has the problem. I tried spectacle and all screenshot feature works.
So I open gimp and create a new blank project I use spectacle to take the screenshot and drag and drop the screenshot taken by spectacle to gimp and it worked.
That’s right. And KDE supports Screenshot method. So it is up to the application to use it. Example of application that captures screenshot using xdg-portal is Flameshot.
Spectacle works, it is directly using KDE specific interfaces via kwin. It is unreasonable to expect external program to support each DE specific methods to take screenshot. But …
… it seems Gimp supports xdg-portal Screenshot interface. At least judging by
It is plugin screenshot; may be it needs to be loaded explicitly or Gimp configured to use this plugin or this plugin configured to use xdg-portal, I am not familiar with Gimp.
… it seems that screenshot plugin sequentially checks each backend and takes the first available. And it finds X11 first. I suppose if Gimp supports native Wayland and you can force it to run as native Wayland client and not as X11 client under Xwayland it will select xdg-portal. But as mentioned, I am not familiar with Gimp.
I’m testing KDE with wayland and I’ll look at the differences between native wayland client and client under Xwayland and how to change the default program load.
After having slept on it, may be Gimp should prefer xdg-portal for screenshot and only fall back to native X11 if it is not available. Technically it is one liner (just swap the order of checks). You may consider contacting Gimp community.
I have xdg-desktop-portal, xdg-desktop-portal-gtk, xdg-desktop-portal-kde6 installed.
Currently the gimp maintainers are finalizing the port from GTK2 to GTK3 and if I understand correctly they should have “wayland” support