Use the DPMS extension to detect if screen is turned off, and unredirect
if it is. This also helps working around the problem where OpenGL
buffers lose data when screen is turned off, causing screen to flicker
later when it turns back on if use-damage is enabled.
Unfortunately the DPMS extension doesn't define an event, so we have to
periodically poll the screen state.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
We used to have a list of X errors we should ignore in case they do
occur. This commit expands that functionality to also allow us aborting
on certain errors.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
We set event sequence number to the last sequence xlib knows about to
silence its complaint about missing sequence numbers, but we forgot to
restore it back afterwards.
This used to break error ignoring mechanism in `should_ignore`. In the
last commit we updated it to use full_sequence which incidently fixed
this problem. But let's restore the sequence number anyway for good
measure.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Prefer RGB formats first, because they use less memory; but fallback to
RGBA formats, as they are formats required by OpenGL.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
If a pixel is perfectly representable as an 8-bit number, don't add
dither. Reduce artifacts where dither is unnecessary.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Add bayer ordered dithering when presenting to screen. Reduce banding
when using a strong blur. Also use 16-bit intermediary textures to
preserve precision in the rendering pipeline.
Related: #602
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
this fixes `WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.` warning while setting up the project
With rounded corners, X11 native border and blur enabled, left and
bottom 2*border_width pixels were not blurred, since mask did not
include border_width, only content width and height.
Create mask image with dimensions that include border width.
Signed-off-by: Evgeniy Baskov <j-basevgser@yandex.ru>
Users with an old EGL version won't be able to use the egl backend. OTOH
we shouldn't prevent them from running picom because of a feature they
won't even use.
Don't assume the existence of EGL 1.5 symbols.
Fixes#945
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
destroy_win_finish doesn't call win_release_images to free the images,
so we need to add a release_mask call there.
Related: #892
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
The intermediate texture used for shadow from mask calculation did not
properly set the min/mag filter to linear, which is required by the blur
methods. Because they use texture interpolation to accelerate
the convolution calculation.
Fixes#916
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>