This does not ever happen in practice. But conceptually, the GL backend
holds 2 kinds of images: those in GL coordinate system, and those in X
coordinate system. They are differentiated by the `y_inverted` variable,
and applying alpha to them needs differs in whether y needs to be
inverted. Right now we never invert y, because we only ever call apply
alpha on images in the X coordinate system.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
I also noticed there is an opportunity to unify fades, animated shaders,
and the benchmark mode. We should be able to get rid of the fade timer.
A TODO for the future.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Used for setting custom window shaders and rules for choosing custom
window shaders.
Added a "c2_userdata_free" parameter to c2_list_free, so allocated userdata
stored in nodes can be freed.
Signed-off-by: Bernd Busse <bernd@busse-net.de>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
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>