-
-
Notifications
You must be signed in to change notification settings - Fork 592
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
terminals in floating scratchpads lose transparency after restarting i3 #299
Comments
sometimes it happens to regular windows too (as opposed to floating scratchpads) |
this is the log when picom is ran from a terminal and i restart i3
also i just noticed that a config does not matter |
i found this #284, but it doesn't seem like my case. i set my wallpaper with feh |
This might be an i3 bug. Please run this command: xwininfo -id $(xwininfo -children | awk '/Parent/ { print $4; }') , click on the window which has lost its transparency, then post the output here. |
|
Thanks. does reapplying the wallpaper fix your problem? |
no |
OK. I need more information to figure out what this is. Can you capture an apitrace? |
okay so here's what it outputed into stdin
and |
btw this issue wasn't an issue when i used old compton. (i'm on arch) |
I can reproduce a similar problem with this minimal example:
$ Xephyr :10
$ unset I3SOCK; DISPLAY=:10 i3 -c i3-config.txt
i3 version: 4.16, 4.17.1, 4.18. |
@xzfc Can you check if this has been fixed in the latest |
@yshui No, same result.
|
@xzfc I cannot reproduce this locally. Also you are on a commit that does not exist in this repo? |
I'm on 85086bc. |
@xzfc Ah, sorry. Can you attach your picom configuration? |
@xzfc Did you meant to have |
Never mind, I figured it out. |
I have no picom configuration. |
No problem. I think this is not a problem in the new backends as long as you have a wallpaper, and I will fix the no wallpaper case. Something odd is going on in the old backends, so I will be looking into it. |
It's still reproducible with |
Do you have a screenshot? Because I tried that and didn't see any problem. |
This is very odd, I cannot make it happen on my computer. I believe I am doing the exact same thing as you. I am using your i3-config.txt, and running picom with Edit: oops, never mind. it's happening now. |
I've bisected it to the first bad commit: 426043b. |
I think I've found the root of the problem. See how window hierarchy is changed during the i3 restart process:
And seems ¹ as of the first bad commit 426043b |
@xzfc That's a very good observation. That helps a lot, thanks. |
|
|
@xzfc I think I fixed this in |
TODO: add a testcase for this issue |
It still happens, although it's not every time. It's rare (~1/20) if there is only one window on the workspace, but it's more often if there are multiple windows. To reproduce, open 4 Screenshots: without-artifacts.png with-artifacts.png Also, there is a minor issue: after the restart (assuming there is no trail), the border is not transparent until you move the window. |
Ah, this is very annoying 😢 Looks like a bug dependent on in what order things happen. At least we are going the right direction. |
I think I know Things happen in this order:
picom only starts to listen for child destroy event after 2. So if we received/handled the MapNotify too late, we won't get the DestroyNotify for the placeholder, and thing will break. |
And there is no guaranteed way to do this "fast enough". The moment we learn about the frame window, step 1-3 could have all happened. Looks like we need a different strategy. |
i am terribly sorry. stupid github |
I have an automated test script in place to reproduce it. I have a tentative fix in place, but this issue is still reproducible ~2% of the time. |
This reverts commit 04fe4a7. This brings back the previous incomplete fix attempt for #299. See the commit message of the revert for why it's incomplete. A different fix is then attempted, see commit xxxxxxx for how that fix works. However, the second fix is incomplete by itself as well. The reason is that i3 reparent the real window to the frame first, before destroying the placeholder client of that frame. So briefly, that frame would have 2 client windows. And the frame is mapped before the placeholder is destroyed. So even though we only call win_recheck_client when/if the frame window is mapped, it can still be called when there are 2 client windows, it would pick up the wrong client window in that case. So what we need is to combine both fixes. The second fix makes sure we are up to date on the client window information when we starts to listen for events on the frame window; while the first fix would keep us up to date afterwards. This revert also includes a fix for assertion failure raised in #371 See #299 for root cause of the bug. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This reverts commit 04fe4a7. This brings back the previous incomplete fix attempt for #299. See the commit message of the revert for why it's incomplete. A different fix is then attempted, see commit xxxxxxx for how that fix works. However, the second fix is incomplete by itself as well. The reason is that i3 reparent the real window to the frame first, before destroying the placeholder client of that frame. So briefly, that frame would have 2 client windows. And the frame is mapped before the placeholder is destroyed. So even though we only call win_recheck_client when/if the frame window is mapped, it can still be called when there are 2 client windows, it would pick up the wrong client window in that case. So what we need is to combine both fixes. The second fix makes sure we are up to date on the client window information when we starts to listen for events on the frame window; while the first fix would keep us up to date afterwards. This revert also includes a fix for assertion failure raised in #371 See #299 for root cause of the bug. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
win_on_factor_change is called when client window changed for a frame, in that case, the mode of the window could change. Related: #299 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Related: #299 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This reverts commit 04fe4a7. This brings back the previous incomplete fix attempt for #299. See the commit message of the revert for why it's incomplete. A different fix is then attempted, see commit xxxxxxx for how that fix works. However, the second fix is incomplete by itself as well. The reason is that i3 reparent the real window to the frame first, before destroying the placeholder client of that frame. So briefly, that frame would have 2 client windows. And the frame is mapped before the placeholder is destroyed. So even though we only call win_recheck_client when/if the frame window is mapped, it can still be called when there are 2 client windows, it would pick up the wrong client window in that case. So what we need is to combine both fixes. The second fix makes sure we are up to date on the client window information when we starts to listen for events on the frame window; while the first fix would keep us up to date afterwards. This revert also includes a fix for assertion failure raised in #371 See #299 for root cause of the bug. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
win_on_factor_change is called when client window changed for a frame, in that case, the mode of the window could change. Related: #299 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Related: #299 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
@xzfc Should've been fixed in |
Thank you. |
|
Platform
archlinux, fully up to date
GPU, drivers, and screen setup
intel uhd 620, xf86-video-intel v1:2.99.917+899+gf66d3954-1
Environment
i3 (without gaps)
picom version
v7.5
Configuration:
Steps of reproduction
Expected behavior
Current Behavior
the window is no longer transparent and there is a trail behind last entered symbol
Stack trace
Other details
herre's a video https://vimeo.com/384925512
The text was updated successfully, but these errors were encountered: