naelstrof / maim

maim (make image) takes screenshots of your desktop. It has options to take only a region, and relies on slop to query for regions. maim is supposed to be an improved scrot.
Other
2.13k stars 78 forks source link

maim capture the selection rectangle #257

Open vincentbernat opened 2 years ago

vincentbernat commented 2 years ago

Hey!

I am using:

maim -u -s -b 5 -l -c 0.3,0.4,0.6,0.4 \
            | xclip -selection clipboard -t image/png

Often, the selection rectangle is part of the screenshot.

 13:18 ❱ picom --version
v9
 13:18 ❱ maim --version
v5.7.4
foxpy commented 2 years ago

Probably a good idea to leave more information about your config (picom config, window manager/desktop environment, etc)

vincentbernat commented 2 years ago

Also, it seems easier to reproduce by capturing an area than by capturing a window. I don't remember having the issue when capturing a window. Using --noopengl does not help. A very simple workaround is to use -d 0.1. I was thinking that maybe with a compositor, one has to wait for a vsync cycle before being sure the screen is up-to-date?

foxpy commented 2 years ago

Where did you install picom from? What is your distro? I want to reproduce your environment.

0Karakurt0 commented 1 year ago

Do you use any scaling on your screen?

vincentbernat commented 1 year ago

No scaling from xrandr point of view, but scaling by the toolkit (Xft/DPI, Gdk/WindowScalingFactor, stuff like that).

@foxpy, sorry, I did miss your questions. I am running Debian sid and picom comes from the picom Debian package.

foxpy commented 1 year ago

I am running Debian sid and picom comes from the picom Debian package.

Uh, this leaves me with following two questions:

vincentbernat commented 1 year ago

You can install either testing or stable and update to unstable with apt full-upgrade after changing sources. But you can just test with testing, the differences with unstable are small. All my machines are with an AMD GPU. I use the radeon driver in the kernel and the modesetting driver in X. I don't remember if I had the issue with an Intel GPU, but I don't have the appropriate laptop anymore.

If you have trouble reproducing, maybe don't put too much effort on it. The -d 0.1 workaround is fine for me. The issue may help people running into the same problem and they may provide additional inputs to see what's the common point among us could be.

foxpy commented 1 year ago

If you have trouble reproducing, maybe don't put too much effort on it.

Right, currently I don't have an unused Radeon machine at my disposal, hence it would be really hard for me to reproduce the bug. Let's just leave this issue as it is.

mangelozzi commented 1 year ago

I have the same problem with rectangular selection screen shots, for example here, bottom right you can see a black dot of the cross hair (all images end up having that black dot):

image

Also using i3wm, Ubuntu 22.04, installed via sudo apt install -y maim