Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Border color is distorted with classic mode #379

Open
N-R-K opened this issue May 29, 2024 · 1 comment
Open

Border color is distorted with classic mode #379

N-R-K opened this issue May 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@N-R-K
Copy link
Collaborator

N-R-K commented May 29, 2024

For testing I was using the following to select a video playing on firefox:

$ ./scrot -s -lmode=classic,width=8,color=#ff3838

When the border was over the playing video, the color was completely distorted. I also noticed this happen when the border was above an xterm window's "selected" region. It was almost as if the border color is being blended with the background color.

edge mode doesn't seem to have this problem.

@N-R-K N-R-K added the bug Something isn't working label May 29, 2024
@daltomi
Copy link
Collaborator

daltomi commented Jun 2, 2024

edge mode doesn't seem to have this problem.

Yes because edge is a real shaped window, while classic mode is pixel logical operation(GXxor) on root GC (It was always the way scrot worked)

The first draw clears the previous, the second draws.

if (sel->rect.w)
selectionClassicDraw();
selectionCalculateRect(x0, y0, x1, y1);
selectionClassicDraw();

The possible solution would be to remove the following lines and leave the black and white originally and warn the user that the color is only for edge mode

XColor color;
scrotSelectionGetLineColor(&color);
if (color.pixel != blackColor)
pc->gcValues.foreground = color.pixel;

Ref: de9e67f ("Allow to change the color to the line style.", 2019-08-19)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants