GCC warns about a use after free, because a pointer is used in pointer
comparison after it was freed. This particular case is completely safe,
but GCC warns anyway.
Move the free after the comparison requires me duplicating the free a
couple of times, so instead I made use of the cleanup attribute to auto
free the pointer when it goes out of scope.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
If the config file is loaded from a symlink'd locaiton, it could be
confusing that include dir is set based on the location of the symlink
instead of the real file.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
The picom project is no longer a fledgling fork needing to justify its
existence. The README should present the user with relevant information
regarding the current project rather than apologies for a 6-year-old
fork of a longer-defunct prior project.
1. Rename README_orig.md to History.md, so it can contain other content
of a historical nature.
2. Move still-relevant historical content from README to History.
3. Add a brief intro blurb to README saying that picom is an X
compositor.
4. Mention Compton in the CONTRIBUTORS section.
5. Point to licensing information from README.
Previously postprocessing is omitted when estimating the color of the
border (e.g. dimming, opacity, inversion, etc.), causing the border to
be drawn with the wrong color.
Related: #770
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
The outer pixels of the corner are drawn with antialiasing, but it color
used for antialiasing is wrong. The estimated border color is used when
there is actually no border.
Related: #770
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
If a window's border_width is bigger than its corner_radius, the inner
radius of the border become less than 0, causing the entire window to be
filled.
Fixes#778
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This is meant to be used to detect GPU resets.
Implemented in the glx backend using the GL_ARB_robustness extension.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Previously we reply to requests sent to _any_ object path, even though
we only declare /com/github/chjj/compton. This commit makes sure we only
reply to request sent to the right path.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
It was deprecated in v4, but warning message wasn't printed for
specifying it on the command line.
Properly deprecate it now.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>