Commit Graph

1819 Commits

Author SHA1 Message Date
Yuxuan Shui
aca3fdcef7 core: expand X error handling
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>
2022-12-14 14:23:55 +00:00
Yuxuan Shui
4ecb8093cf x: fix CI build failure
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-12-14 14:02:57 +00:00
Yuxuan Shui
3b342afa95 general: fix compiler warning about unused results
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-12-14 13:47:38 +00:00
Yuxuan Shui
5a5ea76006 event: restore event sequence number after passing it to Xlib handlers
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>
2022-12-14 13:37:58 +00:00
Yuxuan Shui
8b189bc5ec core: print error with full_sequence
ev->sequence was just the lower 16 bits of the sequence number.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-12-14 12:35:37 +00:00
Yuxuan Shui
23a29470e5 backend: xrender: set update region for PresentPixmap request
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-12-14 07:40:42 +00:00
Yuxuan Shui
e407c5c765 x: add x_{create,destroy}_region
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-12-14 07:37:27 +00:00
Yuxuan Shui
88608027b8 backend: add a comment
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-12-14 07:36:07 +00:00
Yuxuan Shui
4594168946 utils: add rolling_avg
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-12-13 14:35:26 +00:00
Yuxuan Shui
91e023971d utils: add rolling_max
For tracking rolling max of a stream of integers.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-12-13 14:35:20 +00:00
Yuxuan Shui
882025092f Merge pull request #952 from yshui/dither 2022-12-03 03:10:30 +00:00
Yuxuan Shui
0d2b14d0c3 man: fix typo
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-12-02 17:51:30 +00:00
Yuxuan Shui
236c8228b8 backend: gl: fix use-after-scope
'format' was pointing to an array with a shorter lifetime

suggested by @tryone144

Co-authored-by: Bernd Busse <bernd@busse-net.de>
2022-12-02 02:57:28 +00:00
Yuxuan Shui
8143c07de6 Update README.md
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-12-02 02:50:52 +00:00
Yuxuan Shui
d38b0ead7d backend: gl: try different back buffer formats
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>
2022-12-01 18:54:22 +00:00
Yuxuan Shui
7612a9d1d5 Merge pull request #951 from mighty9245/next 2022-12-01 18:14:49 +00:00
Maxim Solovyov
756757ee76 README: fix meson's warnings about setup commands
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
2022-12-01 20:55:57 +03:00
Yuxuan Shui
7198874fc9 Merge pull request #947 from JakeRoggenbuck/spelling 2022-11-30 19:26:44 +00:00
Yuxuan Shui
8b4160123e README: update pcre requirements
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-11-30 19:23:47 +00:00
Yuxuan Shui
979c399ebb Merge pull request #937 from yshui/pcre2 2022-11-30 19:20:59 +00:00
Yuxuan Shui
81ab7512b5 Merge pull request #950 from summaryInfo/border-blur-fix 2022-11-30 19:18:03 +00:00
Evgeniy Baskov
de3e1a80eb win: consider border when creating the mask image
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>
2022-11-30 20:00:46 +03:00
Yuxuan Shui
d704e0f80e backend: gl: don't add dither where it's not needed
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>
2022-11-30 12:15:34 +00:00
Jake
1a82b8180a Change dreaw -> draw 2022-11-29 22:20:22 -08:00
Yuxuan Shui
1271839baf options: add dithered-present option
See also 0a2cd0f14e

Related: #602

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-11-30 05:33:21 +00:00
Yuxuan Shui
0a2cd0f14e backend: gl: add dither
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>
2022-11-30 05:08:02 +00:00
Yuxuan Shui
19a24ada9d backend: egl: fix warning 2022-11-27 18:07:05 +00:00
Yuxuan Shui
552bf77d0e backend: egl: fix undefined symbols on old systems
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>
2022-11-27 18:03:25 +00:00
Yuxuan Shui
0141bfb3a7 Merge pull request #940 from h7x4/add-egl-to-sample-config 2022-11-24 10:42:27 +00:00
h7x4
7360522e31 picom.sample.conf: Add egl to backend option doc 2022-11-24 00:08:37 +01:00
Yuxuan Shui
e2b8c3fd1e c2: replace pcre with pcre2
Because pcre has been deprecated.[1]

There are subtle changes from pcre to pcre2, so this could be a breaking
change.

Closes #895

[1]: https://www.pcre.org/original/changelog.txt

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-11-22 16:12:36 +00:00
Yuxuan Shui
6bcda50170 Merge pull request #930 from omar-polo/openbsd/mesa-p 2022-11-22 15:11:34 +00:00
Omar Polo
2d35f78dc3 backend: egl: don't assume glEGLImageTargetTexStorage exists
Use eglGetProcAddress instead.

Fixes #932
2022-11-22 15:07:09 +00:00
Yuxuan Shui
a9db7ab41e win: fix leaking of the mask image
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>
2022-11-21 15:20:32 +00:00
Yuxuan Shui
ec02fc619c Merge pull request #929 from omar-polo/fmt
Use proper printf directive for uint64_t
2022-11-18 14:30:32 +00:00
Omar Polo
5580f461dc fix log_debug call 2022-11-18 10:13:49 +00:00
Yuxuan Shui
706acb78b7 backend: gl: handle blur context creation failure
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-11-17 22:16:52 +00:00
Yuxuan Shui
e61b3ea7a3 backend: gl: fix crash when shadow radius is 0
Fixes #927

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-11-17 22:13:22 +00:00
Yuxuan Shui
7233601be3 Fix typo
Fixes #922

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-11-16 15:40:10 +00:00
Yuxuan Shui
9d7cbe49f1 win: assert we won't clobber existing mask
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-11-15 18:03:31 +00:00
Yuxuan Shui
7d0d693ca7 backend: gl: fix shadow from mask
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>
2022-11-11 15:56:39 +00:00
Yuxuan Shui
abea823f5d doc: remove mention of raw string pattern
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-10-29 20:59:28 +01:00
Yuxuan Shui
d59ec6a34a Bump version number
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-10-29 20:44:02 +01:00
Yuxuan Shui
5ec79a0364 Merge pull request #877 from yshui/help-message 2022-10-29 19:52:15 +01:00
Yuxuan Shui
59de702ea8 options: improve usage message printing
Laying the usage message out by hand is tedious, also error prone
because the option names are duplicated at 2 places and have to be
consistent.

Create a struct to hold the option names and help messages, and
do layout programmatically.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-10-29 19:42:36 +01:00
Yuxuan Shui
9f04d824b7 Rename COMPTON_VERSION to PICOM_VERSION
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-10-29 19:31:12 +01:00
Yuxuan Shui
2dae094981 Merge pull request #738 from stefanradziuk/transparent-clipping-ignore
Related #907 #663
2022-10-24 00:28:45 +01:00
Stefan Radziuk
2328b97c23 Exclude transparent-clipping-excluded windows from updating the ignored region
Transparent clipping interacts poorly with programs whose transparent
interface elements must show windows below them for functionality,
for example screenshot utilities.
2022-10-23 23:28:26 +01:00
Yuxuan Shui
8a373c38a6 win: fix leak in win_bind_mask
Related: #905

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-10-10 13:55:26 +01:00
Yuxuan Shui
7107241519 meson.build: no -Wimplicit-fallthrough when building with clang
clang does not recognize the fallthrough annotation used in uthash.h, so we
change -Wimplicit-fallthrough to the single argument form currently only
supported by GCC.

We are still detecting implicit fallthroughs with GCC in CI.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-09-30 11:26:50 +01:00