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

fix: incorrect line opacity mapping #296

Merged
merged 1 commit into from
May 27, 2024

Conversation

N-R-K
Copy link
Collaborator

@N-R-K N-R-K commented May 18, 2023

current code treats opacity as [0, 100] even though the manpage documents it as being [0, 255].

Fixes: #281

current code treats opacity as [0, 100] even though the manpage
documents it as being [0, 255].

Fixes: resurrecting-open-source-projects#281
@N-R-K N-R-K added the bug Something isn't working label May 18, 2023
@N-R-K
Copy link
Collaborator Author

N-R-K commented May 18, 2023

It should fix the issue, but some actual real-world testing is still needed.

@guijan
Copy link
Contributor

guijan commented May 21, 2023

The opacity setting doesn't seem to work in general:

scrot -s -l width=4,opacity=1

I see no difference between master and this PR, both are broken, the line isn't transparent at all, it does blend oddly with whatever is under it however.

Why not just remove it since nobody complained about it not working in all this time?

@N-R-K
Copy link
Collaborator Author

N-R-K commented May 21, 2023

The opacity setting doesn't seem to work in general:

Are you running under a compositor that supports _NET_WM_WINDOW_OPACITY?

scrot/man/scrot.txt

Lines 163 to 164 in 6e2b522

100% transparent. For the opacity of the line this is only
effective if a Composite Manager is running.

since nobody complained about it not working in all this time?

It seems to be working fine (except the 100 vs 255 part) for the person that opened the bug report #281:

Instead, opacity=255 is slightly see through, but opacity=100 is completely opaque.

@guijan
Copy link
Contributor

guijan commented May 21, 2023

I'm running xcompmgr, seems it doesn't. picom (a fork of xcompmgr) also doesn't it seems.

@guijan
Copy link
Contributor

guijan commented May 21, 2023

Should probably document that it can't be any compositor, too.

@N-R-K
Copy link
Collaborator Author

N-R-K commented May 22, 2023

picom (a fork of xcompmgr) also doesn't it seems

What WM were you running? Perhaps this flag makes it work?

https://github.com/yshui/picom/blob/3aed5599c3f73cbfa53b0249795e76ab07cf9ecd/man/picom.1.asciidoc?plain=1#L130C1-L131

@guijan
Copy link
Contributor

guijan commented May 22, 2023

spectrwm. Still doesn't work with that flag.

@N-R-K N-R-K requested a review from daltomi October 16, 2023 22:42
@N-R-K
Copy link
Collaborator Author

N-R-K commented May 24, 2024

If no one can test this, I'll just merge it in a day or two, since the math adds up.

@N-R-K N-R-K merged commit 95350f6 into resurrecting-open-source-projects:master May 27, 2024
14 checks passed
@N-R-K N-R-K deleted the line_opacity branch May 27, 2024 07: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 ready for testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

-l opacity does not work as documented
2 participants