Commit Graph

1648 Commits

Author SHA1 Message Date
Bert Gijsbers
1e8fcd00a9 Fix 2 examples in manpage which had obsolete options. 2022-01-12 23:03:19 +01:00
ktprograms
31e58712ec Use python3 for tests
The testcase python files were already compatible with python3, but the
shebang was wrongly set to just 'python'
2021-11-25 10:52:31 +00:00
ktprograms
4dfb979c52 Fix segfaults on 32bit arch with --log-level=debug
There were a few improper uses of %ld for 64 bit numbers, as well as
some other 32 bit related warnings that I've fixed.

Signed-off-by: ktprograms <ktprograms@gmail.com>
2021-11-25 10:52:31 +00:00
Yuxuan Shui
1c7a4ff5a3 backend: xrender: fix clone_image
We were using default_clone_image, but:

1) it's copying the wrong type, xrender_image has an extra member.
2) it doesn't clone the rounded corner cache properly, that has to be
   separately reference counted.

Reported-in: #728
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-11-20 01:27:24 +00:00
yshui
6555703b03 Merge pull request #716 from yshui/new-backend-rounded-corner-1
New backend rounded corner, part 1
2021-11-08 12:14:56 +00:00
Yuxuan Shui
8eb5bb08f8 backend: explicitly initialize corner_radius
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-11-08 00:23:45 +00:00
Yuxuan Shui
ffb8bc5b29 backend: xrender: fix accidentally deleted refcount decrement
Thanks, @tryone144

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-11-08 00:23:36 +00:00
yshui
fade045ead Merge pull request #708 from TK009/next
allow dots (.) in condition targets
2021-10-31 23:27:30 +00:00
Tuomas Kinnunen
6bf0478d29 allow dots (.) in condition targets 2021-10-31 23:23:13 +00:00
yshui
9366f67795 Merge pull request #713 from rkitover/android-fix
Fix lack of timespec_get() on Android.
2021-10-30 02:19:56 +01:00
Rafael Kitover
062f50af39 Fix lack of timespec_get() on Android.
Some versions of the Android libc do not have timespec_get(), use
clock_gettime() instead on Android.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-10-29 18:42:22 +00:00
yshui
e74fbfc733 Merge pull request #717 from yshui/update-clang-format-pipeline
github: update git-clang-format-lint
2021-10-26 10:35:42 +01:00
Yuxuan Shui
1b979212e8 github: update git-clang-format-lint
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-10-25 19:42:22 +01:00
yshui
d5f3079a43 Merge pull request #685 from tom-doerr/patch-1
Add build dependency Debian
2021-10-25 18:42:28 +01:00
Yuxuan Shui
1dea294051 backend: xrender: cache rounded rectangle mask
xcb_render_triangle is slow because (at least for Glamor) it's
rasterizing the triangles on CPU.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-10-25 13:48:45 +01:00
Yuxuan Shui
76db8cca06 backend: xrender: handle corner radius
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-10-25 13:46:45 +01:00
Yuxuan Shui
d397b307dd backend: set corner radius property
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-10-23 12:53:17 +01:00
Yuxuan Shui
6d72bf2974 options: don't disable rounded corner for new backends
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-10-23 12:53:12 +01:00
Yuxuan Shui
1fec938740 backend: gl_common: handle corner radius property
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-10-23 12:22:29 +01:00
Yuxuan Shui
de31cd4096 backend: add new image property: corner radius
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-10-23 12:21:52 +01:00
Yuxuan Shui
ad18d129cc docs: explain the detect-client-leader option better
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-09-22 15:44:33 +01:00
yshui
4f817c452d Merge pull request #694 from jpribyl/patch-1
Don't set `detect-client-leader` in sample conf
2021-09-22 15:39:45 +01:00
Istvan Petres
de959f910b Fixed ugly dark shadows in case of smaller window than shadow radius. (#695) 2021-09-21 18:01:18 +02:00
Johnny Pribyl
bcb815d877 Use default detect-client-leader in sample conf 2021-09-19 18:30:57 -06:00
Tom Dörr
efdb68917b Add build dependency Debian 2021-09-04 00:29:45 +02:00
yshui
ee7d96101d Merge pull request #674 from tryone144/blur-textures
Experimental GL backend: Do not use larger-than-screen textures for blur buffers
2021-08-24 15:19:24 +01:00
Bernd Busse
1dbffec3ae backend: gl: do not use larger-than-screen textures for blur buffers
Blur-texture sampling has been changed to `CLAMP_TO_EDGE` in commit
4b0ff37b36 and to using the buffer
textures at screen position instead of texture origin in commit
89c18afac6.

When using the above approach, expanding the buffer textures by the same
amount as the damage region is not needed anymore, as we cannot render
more than the screen region anyways. Having larger-than-screen buffer
textures might lead to a slight darkening at the upper and right edges
since we don't necessarily trigger the `CLAMP_TO_EDGE` condition in the
intermediate steps. This becomes apparent when using dual-kawase at large
blur-strengths with light backgrounds.

These changes do not affect the general approach of rendering a
larger-than-window region with the blur to accommodate the necessary
increase in damage region.

Related: 6d646b543f
2021-08-16 17:34:19 +02:00
Bernd Busse
78e8666498 core: fix rare double-free when xinerama update fails
Explicitly set `xinerama_scr_regs` to `NULL` after calling free() to
avoid freeing them again.

Under normal operation we free the old xinerama screen region list on
root screen changes and allocate a new one with the updated regions.
On rare occasions — mainly reproducable by changing monitors while DPMS
is in standby — updating the region list might fail as for whatever
reason the xinerama extension is marked as inactive. This would leave
us with an invalid pointer to the already freed region list we would
then attempt to free again on the next root screen change.
2021-08-04 17:32:44 +02:00
Subhaditya Nath
24b4450726 picom-trans: Added SPDX-License-Identifier 2021-07-23 21:15:53 +01:00
Subhaditya Nath
084b670f6a Rewrite picom-trans
Rewrite picom-trans (#634)

Notable changes:

* Support arguments like `--arg=val`
* Allow trailing %-signs in opacity
* Improve error message
* Improve compatibility across different shells
2021-07-22 21:26:17 +01:00
yshui
057a939431 Merge pull request #656 from tryone144/shadow-crop-window
Add `clip-shadow-above` configuration and wintype option
2021-07-14 14:47:32 +01:00
Bernd Busse
4b5cc050d5 Add clip-shadow-above configuration and wintype option
Added the new `clip-shadow-above` configuration and wintype option.
These allow the user to select windows to clip from the shadow region of
other windows, i.e. don't paint shadows on top of them.

This should provide a more useful and userfriendly alternative to the
deprecated `shadow-exclude-reg` option — especially for docks and bars.
2021-07-14 14:43:28 +02:00
yshui
98fe8998c7 Merge pull request #657 from yshui/backend-improvements
Backend improvements
2021-07-14 10:46:52 +01:00
Yuxuan Shui
73c35c20f3 backend: remove unnecessary clone_image calls
No need to clone image to set_image_property, they are only needed for
image_op.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-07-13 22:14:30 +01:00
yshui
fd381dacff Merge pull request #641 from kwand/__GL_MaxFramesAllowed
Set GL_MaxFramesAllowed=1 instead of GL_YIELD=usleep
2021-07-11 14:16:59 +01:00
Daniel Kwan
976d0740fd Partially revert commit 0efdb6c; use glFinish only for non-NVIDIA 2021-07-10 18:14:20 -04:00
Daniel Kwan
e8147e0658 Set GL_MaxFramesAllowed=1 instead of GL_YIELD=usleep 2021-07-10 18:14:20 -04:00
yshui
e92403bd67 Merge pull request #655 from tryone144/frame-extents-fixed
Fix incorrect frame region in new backends
2021-07-10 14:06:00 +01:00
Yuxuan Shui
d9836a6751 backend: fix NULL dereference when rendering inverted windows
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-07-09 19:15:16 +01:00
Yuxuan Shui
f44d6cd7c1 backend: remove a redundant if
set_image_property is a cheap operation.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-07-09 19:01:31 +01:00
Bernd Busse
b5ce81aa47 event: never ignore changed frame extents
Changes to frame extents were only tracked if the frame was visible, but
we have to keep this information current even for invisible frames to
(not) render the correct area.
2021-07-09 19:27:42 +02:00
Bernd Busse
83c19491b8 win: use correct geometry in calculation of window frame region
Use window geometry (width, height) including border-width as the base
for frame region calculation with `_NET_FRAME_EXTENTS`, instead of
including the extents themselves.
Fixes issues where the frame would get incorrectly blurred *outside* the
window area.

fixes: #413 #590

related: fb3305fb9b
2021-07-09 19:27:37 +02:00
yshui
5388ba0946 Merge pull request #649 from tryone144/xerror-handling
Do not try to filter X errors before session is initialized
2021-07-06 19:18:12 +01:00
Bernd Busse
c2aea1803e core: do not try to ignore xerrors before session is initialized
If the user has no access to the GPU, initialization of the GLX context
fails. In the legacy backend, this occurs BEFORE the session has been
successfully initialized.
At this point we cannot meaningfully filter xerrors as the session
hasn't been initialized yet. So we don't try to.
2021-07-06 16:26:37 +02:00
yshui
049d347f52 Merge pull request #648 from tryone144/fix-pixmap-texture-nvidia
nvidia driver does not support attaching pixmap texture to fbo
2021-07-06 12:44:20 +01:00
yshui
c26fad80f7 Merge pull request #650 from tryone144/xrender-frame-opacity
Fix non-transparent frames for opaque windows in experimental xrender backend
2021-07-06 12:37:41 +01:00
Bernd Busse
0c7e237a75 backend: xrender: Force 32-bit ARGB visual for alpha target pixmaps
Force a 32-bit ARGB visual when cloning pixmaps for
`IMAGE_OP_APPLY_ALPHA`.
Fixes non-transparent frames for 24-bit windows (without alpha-channel)
even when using `frame-opacity != 1`.

fixes: #342
2021-06-24 21:49:38 +02:00
Bernd Busse
bf79653fa2 backend: gl_common: Copy texture by explict rendering to framebuffer
At least on nvidia, binding the textures from a glx pixmap to a
framebuffer results in `GL_FRAMEBUFFER_UNSUPPORTED`. Instead of using
binding the source texture to a framebuffer and using `glCopyTexImage2D()`
to copy into a new texture, explicitly render the source texture to the
new texture attached to a framebuffer.

Fixes black/invisible windows on nvidia with `frame-opacity != 1`.

see: #647

related: 2a60836a9b
2021-06-24 18:59:34 +02:00
Bernd Busse
f11710a885 backend: gl_common: Add descriptive checks for framebuffer-completeness
Added more descriptive checks for framebuffer-completeness after adding
attaching textures (for the first time).
Also check for GL errors after `IMAGE_OP_APPLY_ALPHA`.
2021-06-24 18:59:24 +02:00
Bernd Busse
e09679c7cf backend: glx: Fix texture access in max-brightness calculation
Correctly unpack the inner `gl_texture` from the backend image.

related: 2a60836a9b
2021-06-22 22:00:23 +02:00