resurrecting-open-source-projects / scrot

SCReenshOT - command line screen capture utility
Other
511 stars 51 forks source link

`scrot --select` borders caught up in the screenshot #284

Closed guijan closed 1 year ago

guijan commented 1 year ago

Someone made a Youtube video about scrot and described a bug in it: https://yewtu.be/watch?v=aD17Rd2D27c&t=250 The gist of it is that scrot --select (which implicitly means scrot --select --line mode=classic) seems to have a bug when selecting a video that is currently being played, the selection edges lag behind. Then, when you finally take the screenshot, those edges can be caught by the screenshot.

We could simply make --line mode=edge the default and deprecate --line mode=classic to fix this. However, it would also be wise to figure out why this bug is there. It would also be wise to figure out which option is "better" and deprecate the other, maybe edge is not better. Also, the man page says edge and classic support different but overlapping customization options, so the missing functionality should be added to one or the other.

N-R-K commented 1 year ago

According to the FAQ the edge mode doesn't work properly when a compositor is running.

https://github.com/resurrecting-open-source-projects/scrot/blob/80660e7b14c8882da92a138df0db38ee616c5298/FAQ#L30-L32

N-R-K commented 1 year ago

I was trying to look at what slop does in it's pure X implementation and found this comment

# This should really never be disabled. The pure-X mode of slop is very expensive and buggy.
# It also doesn't work on Wayland. Though if a system is never running a compositor, or
# doesn't have OpenGL, this could remove some linking dependencies I suppose.

So it seems like even slop (running in pure X mode) has issues when there's a compositor running.

If I get around setting up a compositor to test things out then I can probably try and see what's going on. Whatever it is, I suspect it should be possible to fix (since it apparently works fine with opengl), but I don't suspect it to be easy at all.

N-R-K commented 1 year ago

Closed this since the default is now edge when no compositor is running. The issues with compositor is tracked in #76.