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

frame opacity doesn't work with experimental xrender backend #342

Closed
absolutelynothelix opened this issue Mar 17, 2020 · 10 comments · Fixed by #650
Closed

frame opacity doesn't work with experimental xrender backend #342

absolutelynothelix opened this issue Mar 17, 2020 · 10 comments · Fixed by #650
Milestone

Comments

@absolutelynothelix
Copy link
Collaborator

picom built from last commit
picom --experimental-backends --backend xrender --frame-opacity 0.5

frame changes it's color but there is no opacity
hmu if you can't reproduce this and need additional info on my setup

@yshui
Copy link
Owner

yshui commented Mar 18, 2020

Cannot reproduce:

a

@absolutelynothelix
Copy link
Collaborator Author

ok, i'll post additional info and screenshots when i'll be at home. could it be a driver issue since it's xrender, not glx?

@yshui
Copy link
Owner

yshui commented Mar 18, 2020

@mighty9245 my screenshot is from xrender.

@absolutelynothelix
Copy link
Collaborator Author

@yshui, hey, can you please test with opaque terminal? i mean you probably have terminal background opacity configured somewhere. what if you make terminal background opaque?

@yshui
Copy link
Owner

yshui commented Mar 18, 2020

@mighty9245

what if you make terminal background opaque?

still works.

@absolutelynothelix
Copy link
Collaborator Author

absolutelynothelix commented Mar 18, 2020

weird... well, that's what i have
image

you can see how the picom was launched and the results: two instances of kitty have background_opacity set to 1.0 (which means opaque background) and the third one has background_opacity set to 0.95 (which means barely transparent) but in this case frame opacity applied correctly and i can see background through it. the same issue persists for all opaque windows (e. g. browser)

specs:
arch linux x86_64 5.5.9-arch1-2
bspwm 0.9.7-10-g2ffd9c1
picom built from 33a5cc6
modesetting driver
intel uhd graphics 620

also reproducible on amd r9 380 (amdgpu driver)

do you need anything else?

@yshui
Copy link
Owner

yshui commented Mar 18, 2020

@mighty9245 and the glx background doesn't have this problem?

@absolutelynothelix
Copy link
Collaborator Author

@yshui, yeah, running the same command but setting backed to glx works just fine, every window got it's transparent frame.

@absolutelynothelix
Copy link
Collaborator Author

absolutelynothelix commented Mar 22, 2020

@yshui, hey, i think i know what the problem is. if window doesn't have any transparent parts it has 24bit depth, adding transparent parts to it (e. g. changing background opacity in terminal) changes it's depth to 32bit. as a workaround i changed xrender's copy method to set visual to 0x1b3 and depth to 32 for every image it creates and the issue is gone. however, i don't know how to fix this in a decent way.

also idk if problem is really in depth or in visual, because changing depth without changing visual causes picture creation failure. i think they are tied.

@yshui
Copy link
Owner

yshui commented Apr 1, 2020

I think you are right.

@yshui yshui added this to the v9 milestone Apr 1, 2020
tryone144 added a commit to tryone144/picom that referenced this issue Jun 24, 2021
Force a 32-bit ARGB visual when cloning pixmaps for
`IMAGE_OP_APPLY_ALPHA`.
Fixes non-transparent frames for 24-bit windows (without alpha-channel)
even when using `frame-opacity != 1`.

fixes: yshui#342
tryone144 added a commit to tryone144/picom that referenced this issue Jun 24, 2021
Force a 32-bit ARGB visual when cloning pixmaps for
`IMAGE_OP_APPLY_ALPHA`.
Fixes non-transparent frames for 24-bit windows (without alpha-channel)
even when using `frame-opacity != 1`.

fixes: yshui#342
tryone144 added a commit to tryone144/picom that referenced this issue Jun 28, 2021
Force a 32-bit ARGB visual when cloning pixmaps for
`IMAGE_OP_APPLY_ALPHA`.
Fixes non-transparent frames for 24-bit windows (without alpha-channel)
even when using `frame-opacity != 1`.

fixes: yshui#342
@yshui yshui closed this as completed in #650 Jul 6, 2021
F0xedb pushed a commit to ODEX-TOS/picom that referenced this issue Feb 20, 2022
Force a 32-bit ARGB visual when cloning pixmaps for
`IMAGE_OP_APPLY_ALPHA`.
Fixes non-transparent frames for 24-bit windows (without alpha-channel)
even when using `frame-opacity != 1`.

fixes: yshui#342
FT-Labs pushed a commit to FT-Labs/picom that referenced this issue Jan 23, 2023
Force a 32-bit ARGB visual when cloning pixmaps for
`IMAGE_OP_APPLY_ALPHA`.
Fixes non-transparent frames for 24-bit windows (without alpha-channel)
even when using `frame-opacity != 1`.

fixes: yshui#342
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants