Commit Graph

1944 Commits

Author SHA1 Message Date
Arda Atci
44cfa0b0ef randr_mon position fix 2023-02-14 23:24:51 +03:00
Arda Atci
bb2b4801f7 randr anim fix 2023-02-06 23:12:45 +03:00
Arda Atci
36e6b73cde randr extension 2023-02-04 23:10:18 +03:00
Arda Atci
90f57e9b1a shadow fix 2023-02-04 15:40:21 +03:00
Arda Atci
157ecd2077 shadow fix 2023-02-04 07:11:23 +03:00
Arda Atci
3a791ab559 Merge branch 'next' into nextt
Some checks failed
coding-style / check (push) Has been cancelled
2023-02-04 07:10:45 +03:00
Arda Atci
f5e8351507 shadow fix 2023-02-04 07:09:20 +03:00
Arda Atci
9f14c43989 Merge pull request #18 from yshui/next
merge yshui/next
2023-02-04 05:49:58 +03:00
Yuxuan Shui
cee1287562 github: update git-clang-format-lint action
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2023-01-29 16:23:26 +00:00
Yuxuan Shui
317275abf6 Merge pull request #995 from absolutelynothelix/begone-xinerama 2023-01-29 15:36:04 +00:00
Maxim Solovyov
986b3c1cb3 core: drop xinerama
there are two x extensions for working with monitors (especially
multiple): xinerama and randr. xinerama is old, feature-poor and in
general isn't used anymore compared to the randr: new, feature-rich and
widely-used. for some reason we were using both of them, so let's drop
xinerama to keep things simple, clean and small. and to be modern.

the drop was done in three steps:
* first step was to replace all the xinerama-based code with the
  randr-based one and to replace or remove all the xinerama mentions;
* second step was to replace the xinerama's terminology with the
  randr's one. xinerama was referring only to the word "screen", while
  randr refers to multiple words and i think the word "monitor" is the
  most suitable for us and, hopefully, clear both to a contributor and
  to an end user;
* third step was to refactor the new randr-based code if needed and to
  address related todo's (mostly about moving related functions
  elsewhere).

all the steps were done well except addressing a leftover todo about
moving the win_update_monitor function to the x.c which wasn't done.

the xinerama-shadow-crop option was renamed to crop-shadow-to-monitor,
but it's previous name is still accepted, has effect and the
deprecation message is printed to preserve backwards-compatibility.
2023-01-29 10:51:12 +03:00
Yuxuan Shui
102a0bc5e0 backend: mask can be null in blur()
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2023-01-29 06:35:28 +00:00
Arda Atci
97d9c960e0 animations added, picom upstreamed yshui/next 2023-01-23 07:36:50 +03:00
Arda Atci
d41a291fd6 fix lerping on shadows, closes #4 2023-01-23 07:34:35 +03:00
Arda Atci
c3a7cf29ab AUR pkg, closes #15, thanks fxzzi 2023-01-23 07:34:35 +03:00
Arda Atci
3b1930d2c6 fixed open window type anim, closes #12 2023-01-23 07:34:35 +03:00
Yuxuan Shui
92a32808ae doc: list cases that trigger unredirect
unredir-if-possible doesn't just happen for fullscreen windows, be more
accurate.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2023-01-23 07:34:35 +03:00
Maxim Solovyov
d3c467f4c0 opengl: fix segfault in ensure_glx_context 2023-01-23 07:34:35 +03:00
Maxim Solovyov
4be96a92c7 backend: egl: fix creating eglpixmap
according to the specification of the EGL_KHR_image_pixmap extension,
if target is EGL_NATIVE_PIXMAP_KHR then ctx must be EGL_NO_CONTEXT,
otherwise, the EGL_BAD_PARAMETER error is generated. source:
https://registry.khronos.org/EGL/extensions/KHR/EGL_KHR_image_pixmap.txt

fixes #981
2023-01-23 07:34:35 +03:00
Maxim Solovyov
ab766b6386 picom: fix xcb_request_check memory leaks 2023-01-23 07:34:35 +03:00
Maxim Solovyov
7e975cdc5d picom: free root image properly
fixes #982
2023-01-23 07:34:35 +03:00
Maxim Solovyov
349f2f37db backend: egl: simplify getting a framebuffer configuration
we're using the first available framebuffer configuration that
meets our needs so there is no need to ask for more than one
2023-01-23 07:34:35 +03:00
Maxim Solovyov
7846b17c54 use _checked functions with xcb_request_check 2023-01-23 07:34:35 +03:00
Maxim Solovyov
a667886959 xrender: make corner-radius respect inactive-dim
for the new xrender backend it's enough to clip with a rounded rectangle after dimming, not before

partially fixes #867
2023-01-23 07:34:35 +03:00
Maxim Solovyov
6c08650f3c xrender: fix leak in release_rounded_corner_cache
calling wrong free function did nothing and produced ton of x errors

fixes at least #892
2023-01-23 07:34:35 +03:00
Maxim Solovyov
7f533c0b23 xrender: fix leak in deinit
and check should we actually free something

fixes at least #960
2023-01-23 07:34:35 +03:00
Maxim Solovyov
efa3d9c227 xrender: fix leak in bind_pixmap 2023-01-23 07:34:35 +03:00
Maxim Solovyov
0b965b2e5a x: fix leak in x_create_picture_with_pictfmt_and_pixmap 2023-01-23 07:34:35 +03:00
Yuxuan Shui
ba2e24af3e core: detect screen off
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>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
0278a1fb0b backend: xrender: fix using of invalid picture when vsync is disabled
Fixes #974

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
931c1b8bf6 x: fix missing _checked
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
6906e6694a core: add set_cant_fail_cookie
Enables picom to abort when certain requests fail.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
f1bff49b1c 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>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
fe3f53f3a4 x: fix CI build failure
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
57956fb219 general: fix compiler warning about unused results
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
c51020aef7 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>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
eec8bf79d2 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>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
227cb55ca5 backend: xrender: set update region for PresentPixmap request
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
e9ff18e1bd x: add x_{create,destroy}_region
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
43d8d3ed5d backend: add a comment
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
bf0832cd4c utils: add rolling_avg
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
9c3204cc72 utils: add rolling_max
For tracking rolling max of a stream of integers.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
bc1f99f2ae 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>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
d21fb34e55 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>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
7f18e74b8f 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>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
2173654fbd options: add dithered-present option
See also 0a2cd0f14e

Related: #602

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
123ef51210 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>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
4ecc3e65a9 man: fix typo
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2023-01-23 07:34:35 +03:00
Yuxuan Shui
4a7a9e8079 Update README.md
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2023-01-23 07:34:35 +03:00
Maxim Solovyov
dacadb9fc3 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
2023-01-23 07:34:35 +03:00