Commit Graph

1739 Commits

Author SHA1 Message Date
Yuxuan Shui
a252cbf028 clang-tidy: disable some noisy warnings
Also fix some of the warnings

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-23 05:19:06 +01:00
Yuxuan Shui
748cd665f4 backend: glx: fix glx vendor check
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-22 10:41:16 +01:00
Yuxuan Shui
9f01d0dfbe Merge pull request #875 from yshui/legacy-backend 2022-08-21 23:05:42 +01:00
Yuxuan Shui
5d6326ae28 meson.build: autostart picom
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-21 06:25:55 +01:00
Yuxuan Shui
b0fbfec4f0 man: fix typos
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-21 06:13:24 +01:00
Yuxuan Shui
7e607bfe81 Make experimental backends the new default
Experimental no longer.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-21 06:09:27 +01:00
Yuxuan Shui
3dfc422edf Merge pull request #851 from yshui/507
Closes #386  #507
2022-08-21 05:46:56 +01:00
Yuxuan Shui
35b403ac9c man: describe where to put a shader file
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-21 05:43:33 +01:00
Yuxuan Shui
fcaf0f993e man: include a default shader
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-21 05:37:59 +01:00
Yuxuan Shui
1de1d67126 picom.sample.conf: add window-shader-fg and window-shader-fg-rule
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-21 05:37:28 +01:00
Yuxuan Shui
19c852b3ae options: mention the "default" shader
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-21 05:22:15 +01:00
Yuxuan Shui
affe408d76 meson: fix meson warnings
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-17 17:55:53 +00:00
Yuxuan Shui
4e0fad5880 man: define the custom shader interface
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-12 14:27:05 +01:00
Yuxuan Shui
32478df27c core: force redraw if animated shader is in-use
I also noticed there is an opportunity to unify fades, animated shaders,
and the benchmark mode. We should be able to get rid of the fade timer.
A TODO for the future.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-12 13:45:30 +01:00
Yuxuan Shui
ec9243cf3c issue_template: suggest uploading OpenGL traces
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-12 11:19:47 +01:00
Yuxuan Shui
83e1cd9a19 backend: add and implement get_shader_attributes
Used for passing back information about whether a shader needs to be
re-rendered every frame.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-11 04:53:14 +01:00
Yuxuan Shui
eb54974ac0 core: init/deinit shaders when init/deinit-ing the backend
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-11 04:41:47 +01:00
Yuxuan Shui
a1f4cafda4 backend: gl: improve error reporting when creating shaders
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-11 04:41:44 +01:00
Yuxuan Shui
eeabf5807e backend: gl: handle custom shader image property
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-11 04:41:20 +01:00
Bernd Busse
c95152e83e backend: gl_common: add time uniform to (custom) window shader 2022-08-11 04:41:17 +01:00
Yuxuan Shui
81768f4a11 backend: gl: implement create_shader/destroy_shader 2022-08-11 04:41:12 +01:00
Yuxuan Shui
947077f329 backend: add custom shader image property
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-11 04:40:43 +01:00
Yuxuan Shui
f5b40ba10e backend: add shader related APIs
Current this API can only create shader from a single source file. This
could be changed in the future.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-11 04:29:50 +01:00
Bernd Busse
5577363aaf win: keep track of window specific shader in managed_win 2022-08-11 04:29:47 +01:00
Yuxuan Shui
654772b8cf config: add options window-shader-fg and window-shader-fg-rules
Used for setting custom window shaders and rules for choosing custom
window shaders.

Added a "c2_userdata_free" parameter to c2_list_free, so allocated userdata
stored in nodes can be freed.

Signed-off-by: Bernd Busse <bernd@busse-net.de>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-11 04:28:48 +01:00
Yuxuan Shui
896acabab1 doc: remove mention of raw string pattern
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-07-18 19:04:50 +01:00
Yuxuan Shui
db6f11624b c2: fix typo
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-07-17 18:15:09 +01:00
Yuxuan Shui
5d79da6387 c2: return if foreach function returned early
Useful for error handling.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-07-17 18:09:20 +01:00
Yuxuan Shui
23c56ab328 c2: add list iterating functions
Also renames free_wincondlst to c2_list_free and move it to c2.h.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-07-17 17:48:13 +01:00
Yuxuan Shui
7e833744b7 string_utils: add trim_both
trim_both removes whitespaces from both side of a string.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-07-17 15:43:47 +01:00
Yuxuan Shui
e757a6461d test.h: update to upstream 368c467
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-07-17 15:39:50 +01:00
Yuxuan Shui
cb0b846dbe test.h: update to upstream ee49b276a3
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-07-17 15:29:10 +01:00
Yuxuan Shui
8c3ba22ae0 c2: deprecate raw string pattern
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-07-17 14:08:44 +01:00
Yuxuan Shui
d621f7a3e2 Merge pull request #848 from yshui/silence-warning 2022-07-16 15:22:48 +01:00
Yuxuan Shui
2634ae4817 tests: add special config for config parsing test
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-07-16 15:18:53 +01:00
Yuxuan Shui
96fcc6089e c2: silence a compiler warning
GCC warns about a use after free, because a pointer is used in pointer
comparison after it was freed. This particular case is completely safe,
but GCC warns anyway.

Move the free after the comparison requires me duplicating the free a
couple of times, so instead I made use of the cleanup attribute to auto
free the pointer when it goes out of scope.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-07-16 15:05:03 +01:00
Yuxuan Shui
60c9695394 ci: update coding style check
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-07-14 18:37:26 +01:00
Yuxuan Shui
a8b15f3a1b config_libconfig: resolve symlinks when setting include dir
If the config file is loaded from a symlink'd locaiton, it could be
confusing that include dir is set based on the location of the symlink
instead of the real file.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-07-14 18:30:03 +01:00
Yuxuan Shui
e2ed9125ed Merge pull request #843 from tokyoneon78/grammar_fix
Fix a typo in the man docs
2022-07-12 11:16:24 +01:00
tokyoneon78
8aa4512f75 Made a typo fix in the man docs 2022-07-10 02:10:30 +00:00
Yuxuan Shui
cd50596f0e Merge pull request #813 from softmoth/readme_confidence
README: Move old historical info out of main README
2022-04-13 17:04:58 +01:00
Tim Siegel
5a2115033e README: Move old historical info out of main README
The picom project is no longer a fledgling fork needing to justify its
existence. The README should present the user with relevant information
regarding the current project rather than apologies for a 6-year-old
fork of a longer-defunct prior project.

1. Rename README_orig.md to History.md, so it can contain other content
   of a historical nature.
2. Move still-relevant historical content from README to History.
3. Add a brief intro blurb to README saying that picom is an X
   compositor.
4. Mention Compton in the CONTRIBUTORS section.
5. Point to licensing information from README.
2022-04-12 09:43:57 -04:00
Yuxuan Shui
61faf42b9e Merge pull request #812 from i-c-u-p/chmod_+x-meson/install.sh 2022-04-12 11:48:49 +01:00
i-c-u-p
34b2d75f91 Made meson/install.sh executable
Changed permissions of meson/install.sh from 644 to 755 to be able to run it via "./install.sh" without first executing "chmod +x install.sh".
2022-04-12 05:41:41 +00:00
Yuxuan Shui
aa316aa360 ci: fix codeql tasks
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-02-13 14:07:12 +00:00
Yuxuan Shui
f8914dda23 backend: gl: apply postprocessing to border_color
Previously postprocessing is omitted when estimating the color of the
border (e.g. dimming, opacity, inversion, etc.), causing the border to
be drawn with the wrong color.

Related: #770

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-02-13 13:54:25 +00:00
Yuxuan Shui
e63ec3fd16 backend: gl: fix corner being drawn with wrong color
The outer pixels of the corner are drawn with antialiasing, but it color
used for antialiasing is wrong. The estimated border color is used when
there is actually no border.

Related: #770

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-02-13 13:49:45 +00:00
Yuxuan Shui
ea2ba58efd backend: gl: don't fill window with big border_width
If a window's border_width is bigger than its corner_radius, the inner
radius of the border become less than 0, causing the entire window to be
filled.

Fixes #778

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-02-10 07:47:48 +00:00
Yuxuan Shui
01649b68b9 backend: don't trust device_status after a reset
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-02-08 10:31:41 +00:00
Yuxuan Shui
e17eaefb89 backend: handle device reset
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-02-08 10:31:41 +00:00