yshui / picom

A lightweight compositor for X11
Other
3.92k stars 576 forks source link

NO WINDOW LEFT BEHIND #1273

Closed yshui closed 1 week ago

yshui commented 3 weeks ago

Track the entire window tree. Fix window rules for WMs like i3, KDE.

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 70.32058% with 287 lines in your changes missing coverage. Please review.

Project coverage is 51.68%. Comparing base (88c8ba8) to head (d0ee47f).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/yshui/picom/pull/1273/graphs/tree.svg?width=650&height=150&src=pr&token=NRSegi0Gze&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui)](https://app.codecov.io/gh/yshui/picom/pull/1273?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui) ```diff @@ Coverage Diff @@ ## next #1273 +/- ## ========================================== + Coverage 51.55% 51.68% +0.12% ========================================== Files 62 64 +2 Lines 13347 13567 +220 ========================================== + Hits 6881 7012 +131 - Misses 6466 6555 +89 ``` | [Files](https://app.codecov.io/gh/yshui/picom/pull/1273?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui) | Coverage Δ | | |---|---|---| | [src/c2.h](https://app.codecov.io/gh/yshui/picom/pull/1273?src=pr&el=tree&filepath=src%2Fc2.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL2MyLmg=) | `100.00% <ø> (ø)` | | | [src/opengl.h](https://app.codecov.io/gh/yshui/picom/pull/1273?src=pr&el=tree&filepath=src%2Fopengl.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL29wZW5nbC5o) | `55.55% <ø> (ø)` | | | [src/renderer/command\_builder.c](https://app.codecov.io/gh/yshui/picom/pull/1273?src=pr&el=tree&filepath=src%2Frenderer%2Fcommand_builder.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL3JlbmRlcmVyL2NvbW1hbmRfYnVpbGRlci5j) | `79.16% <ø> (ø)` | | | [src/renderer/damage.c](https://app.codecov.io/gh/yshui/picom/pull/1273?src=pr&el=tree&filepath=src%2Frenderer%2Fdamage.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL3JlbmRlcmVyL2RhbWFnZS5j) | `90.17% <ø> (+0.40%)` | :arrow_up: | | [src/renderer/layout.c](https://app.codecov.io/gh/yshui/picom/pull/1273?src=pr&el=tree&filepath=src%2Frenderer%2Flayout.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL3JlbmRlcmVyL2xheW91dC5j) | `97.87% <100.00%> (-0.03%)` | :arrow_down: | | [src/renderer/renderer.c](https://app.codecov.io/gh/yshui/picom/pull/1273?src=pr&el=tree&filepath=src%2Frenderer%2Frenderer.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL3JlbmRlcmVyL3JlbmRlcmVyLmM=) | `60.41% <100.00%> (ø)` | | | [src/utils/dynarr.h](https://app.codecov.io/gh/yshui/picom/pull/1273?src=pr&el=tree&filepath=src%2Futils%2Fdynarr.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL3V0aWxzL2R5bmFyci5o) | `100.00% <ø> (ø)` | | | [src/utils/misc.h](https://app.codecov.io/gh/yshui/picom/pull/1273?src=pr&el=tree&filepath=src%2Futils%2Fmisc.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL3V0aWxzL21pc2MuaA==) | `45.65% <ø> (ø)` | | | [src/wm/win.h](https://app.codecov.io/gh/yshui/picom/pull/1273?src=pr&el=tree&filepath=src%2Fwm%2Fwin.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL3dtL3dpbi5o) | `100.00% <100.00%> (+2.38%)` | :arrow_up: | | [src/wm/wm.h](https://app.codecov.io/gh/yshui/picom/pull/1273?src=pr&el=tree&filepath=src%2Fwm%2Fwm.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui#diff-c3JjL3dtL3dtLmg=) | `100.00% <100.00%> (+100.00%)` | :arrow_up: | | ... and [11 more](https://app.codecov.io/gh/yshui/picom/pull/1273?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui) | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/yshui/picom/pull/1273/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Yuxuan+Shui)
yshui commented 2 weeks ago

Update: kind of redesigned how windows are imported into the tree. The inherent racy-ness of X11 protocol really fucked this over. (don't know if you can tell, but I am not happy with this code).

This comment goes into a bit more detail about what's going on.

yshui commented 1 week ago

Fixed a use after free, when an incomplete import is deleted before we can completely import it.