Currently if the shadow image fails to bind, the entire window is marked
as having image errors. So nothing of that window will render, even if
the window image itself is fine.
The commit cause shadow to be disabled when shadow image fails, instead
of marking the window.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
For big windows, their shadow images might exceed the maximum request
length limit of Xorg. libxcb will shutdown the connection to X server if
we try to send that image. So we have to break the image apart and send
it piecemeal.
In the future we probably should migrate to MIT-SHM.
Fixes#255#274
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Unredirect the screen when some window sets _NET_WM_BYPASS_COMPOSITOR
to 1, but ignore the case where some window requests the screen to be
redirected by setting _NET_WM_BYPASS_COMPOSITOR to 2.
Closes#267
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
In file included from ../src/log.h:8,
from ../src/backend/gl/glx.h:18,
from ../src/common.h:45,
from ../src/picom.c:32:
../src/compiler.h:98:11: fatal error: threads.h: No such file or directory
98 | # include <threads.h>
| ^~~~~~~~~~~
Transparent windows usually blends on top of other windows, this commit
adds an option to make transparent windows clip other windows like
non-transparent windows do.
Closes#265
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Previously win_set_shadow tries to release the shadow image when turning
off shadow for a window. When shadow is turned off _immediately_ after
it's turned on, picom won't have a chance to handle the delayed creation
of the shadow before win_set_shadow tries to release the shadow image,
causing a assertion failure because win_set_shadow tried to release a
non-existing image.
This commit makes releasing the shadow image delayed as well.
In theory, we could check the STALE flag in win_set_shadow before
release the image, but that duplicates the logic that is already in
win_process_flags.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
The compositor crashes when a window does:
has shadow -> no shadow -> has shadow
This is because when the shadow is turned off, the shadow image is not
freed, and this is catched by a later assertion.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
The assertion check for condition that are too board.
If we get multiple root config event in a row, then we might find
ourselves trying to release a image that was released in a previous
backend destruction and is yet to be bound (IOW, the window will have
IMAGES_NONE _and_ IMAGES_STALE set), causing the assertion to fail.
This commit relax the check, so we don't check if STALE is set when NONE
is set.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
deinit then init the logging system after resets, because otherwise
duplicated log handlers will be added by session_init, and we will
see duplicated logs.
Doing this also enables us to add log handlers for early logging.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Automatically reset picom and reload the configuration when a change in
the configuration file is detected.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Unsupported backends were rejected when we try to initialize them, now
we reject them in the option parsing phase.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Instead of allocating new textures everytime gl_average_texture_color is
called, we keep two textures per gl_image and reuse those.
Doing this significantly improves CPU usage on AMDGPU driver for some
reason. But in general, less texture allocation is always better.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Rationale:
- "bug to be expected" -> "bugs to be expected". Usually the noun is plural in this expression (since more than one bug is likely to be found in the future).
- "because that seems to be unmaintained" -> "because it seems to be unmaintained". Using a demonstrative pronoun ("that") versus a personal pronoun ("it") suggests that we need to specify which of several Comptons is unmaintained.
- "features" -> "feature" and "stabilizes" -> "stabilize". The new backends are plural, should be conjugated without the trailing "s".
- "used" -> "use". The command used to launch picom has already been run. Changing to "use" indicates the command that habitually launches picom. Also changed "command line" (the interface, e.g. the prompt) to "command".
- "Rational" (adjective: based on reason) -> "Rationale" (noun: the reasons or logic that motivated an action)
- "when people searches" -> "when people search". Usually conjugated as plural [1](https://english.stackexchange.com/q/263046)
- "to solve aforementioned problems" -> "to solve the aforementioned problems". "Aforementioned" is preceded by a definite article when modifying a noun.
- "mentions to" (usually used in suggesting an 'honourable mention'/accolade regarding somebody) -> "mentions of" (instances of)