Commit Graph

1523 Commits

Author SHA1 Message Date
Yuxuan Shui
bf5a9ca154 tests: don't call .check() in set_window_size
So we can bundle this request together with other requests, making
reproducing time critical bugs easier.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-11-28 19:49:15 +00:00
Yuxuan Shui
fb35feb54e tests: make trigger_root_configure into a 2-step process
This is to allow us sending the root configure request together with
other requests. Making it easier to reproduce timing critical bugs.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-11-28 19:43:17 +00:00
Yuxuan Shui
248bffede7 Fix non-opengl build
Oops

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-11-03 19:03:07 +00:00
Yuxuan Shui
c9f75a53d9 core: fix leak of argb_fbconfig
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-11-02 18:43:12 +00:00
Yuxuan Shui
e3582cd996 legacy backend: render: fix leak of fbconfig
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-11-02 18:23:38 +00:00
Yuxuan Shui
685e5a9aac config_libconfig: allow overrides if supported
Related: #530

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-29 09:38:05 +00:00
yshui
8b3e70b40b Merge pull request #531 from omar-polo/next
silencing some compiler warnings
2020-10-28 23:27:38 +00:00
Omar Polo
7eddf79ed2 wrap subobject initialization with braces to silence a warning 2020-10-28 20:27:01 +01:00
Omar Polo
eeaba75a62 use the correct format control for uint64_t 2020-10-28 20:07:14 +01:00
Bernd Busse
3d358a06f2 event: Add missing check if window is managed before setting flags 2020-10-25 12:36:09 +01:00
Yuxuan Shui
9c7f852031 ci: freebsd: add missing dependency
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-25 07:03:29 +00:00
Yuxuan Shui
6b3a1e4e14 ci: build test for FreeBSD
Make sure picom builds on FreeBSD

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-25 05:23:53 +00:00
Yuxuan Shui
27d59dbb30 picom: get max hostname length with sysconf()
For FreeBSD compatibility, which doesn't define HOST_NAME_MAX.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-25 03:13:03 +00:00
Yuxuan Shui
02daff8bc8 README: fix typo
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-25 02:57:34 +00:00
Yuxuan Shui
ae62269eb7 Merge remote-tracking branch 'fix/clear-shadow-stale-on-unmap' into next 2020-10-23 17:27:40 +01:00
Yuxuan Shui
dfe4a362e2 win: clear more stale flags when destroying a window
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-23 17:22:15 +01:00
yshui
1ce8012519 Merge pull request #522 from tryone144/clang-analyzer-errors
Fix/silence memory errors reported by `scan-build`.
2020-10-23 17:06:27 +01:00
Yuxuan Shui
f5370a1ec0 tests: fix comments
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-23 17:02:54 +01:00
Yuxuan Shui
be91b443a8 tests: add testcase for 22162cb7e2
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-23 16:54:46 +01:00
Yuxuan Shui
22162cb7e2 win: don't add damage when changing shadow setting while unredirected
When the screen is unredirected, no window have a shadow image. So the
assertions in win_set_shadow don't hold. But in that case, we don't want
to add damages anyway. So we put them behind a check of whether the screen
is redirected.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-23 16:44:21 +01:00
Bernd Busse
337831e094 Fix memory errors reported by scan-build.
- Fix non-critical memory-leak in `picom.c` and `options.c` where we
don't free all allocated memory before dieing.

- Explicitly allocate new branch in `c2.c` to silence false-positive
memory-leak.
2020-10-23 17:20:59 +02:00
Yuxuan Shui
3576a92da3 x: wid_get_text_prop shouldn't return 0 strings
Downstream code expect wid_get_text_prop to return at least 1 string.
However wid_get_text_prop would return 0 strings when the property is
set to an empty string.

Fixes: dc37370a66

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-23 15:16:11 +01:00
Bernd Busse
1a720edbad win: clear SHADOW_STALE in destroy_win_start
Clear both STALE flags (`IMAGES_STALE = PIXMAP_STALE | SHADOW_STALE`)
when destroying windows (see f493447b33).

Clearing `SHADOW_STALE` as well should eliminate the recreation of a shadow
image for a window currently being destroyed which will cause the
rendering to fail because we can't properly update the flags anymore.

Should fix: #394
2020-10-23 15:46:37 +02:00
Bernd Busse
f53fbdccca Add testcase for #394 2020-10-23 15:46:37 +02:00
yshui
6c6b1afeb3 Merge pull request #516 from yshui/no-xlib
x: remove the last bit of Xlib dependency
2020-10-23 14:19:00 +01:00
Yuxuan Shui
dc37370a66 x: remove the last bit of Xlib dependency
Of course, we still use GLX, so we can't completely remove Xlib yet. But
this removes all Xlib uses outside of the backends.

This drops support for COMPOUND_TEXT Xorg strings, so people how wants
multilingual support has to use UTF8, which should be fine since most of
the applications support that.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-23 07:58:01 +01:00
yshui
b675e3f19d Merge pull request #521 from yshui/more-delayed-handling
More delayed event handlings
2020-10-23 07:50:54 +01:00
Yuxuan Shui
e53ac7a6f9 event, win: delayed handling of shape notify
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-23 04:37:38 +01:00
Yuxuan Shui
f476a78ad1 event: don't eagerly add damage for configure notify
If a window receives multiple configure notifies in between 2 frames, we
add all the in between positions into damage, when we really just need
the starting and the end position.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-23 04:27:35 +01:00
Yuxuan Shui
35b4e82085 win: cache the result of fade-exclude rules
So we don't need to call c2_match every frame something is fading. Also
saves us from some out-of-critical-section X server queries.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-23 02:08:34 +01:00
Yuxuan Shui
21e9aab6b6 event: set WIN_FLAGS_FACTOR_CHANGED on tracked property change
Previously, when some explicitly checked property (e.g.
_NET_WM_WINDOW_OPACITY) changed, it won't trigger a
win_on_factor_change, and the rules will not be re-evaluated. Because
that property stale flag will be cleared after we explicitly check the
property, so it won't be detected as a tracked property change.

Here, we instead set WIN_FLAGS_FACTOR_CHANGED directly when a tracked
property changed.

Fixes: f3ff7eff8c

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-23 01:58:12 +01:00
yshui
598e70dcea Merge pull request #519 from tryone144/picom-trans-help
Add `--help` and `--toggle` options to `picom-trans`
2020-10-23 01:44:49 +01:00
Yuxuan Shui
a099678664 win: delayed handling of configure notify
Part of the configure notify handling which requires querying the X
server, has been moved into the X critical section.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-23 01:36:04 +01:00
yshui
f447e51380 Merge pull request #518 from yshui/delayed-property-update
event: delayed handling of window property changes
2020-10-23 01:30:31 +01:00
Yuxuan Shui
f3ff7eff8c event: delayed handling of window property changes
Move handling window property changes into the X critical section.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-23 00:15:54 +01:00
Bernd Busse
a854acc2d0 picom-trans: add --toggle action to toggle between set opacity and unset.
Fixes: #472
2020-10-22 23:06:17 +02:00
Bernd Busse
c9ccd8fb71 picom-trans: Add inline --help output and update manpage
Fixes: #513
2020-10-22 22:53:02 +02:00
nia
8f78b9b631 Fix the build when memcpy is defined as a macro. (#501)
Parentheses are required around macro argument containing braced
initializer list.

memcpy(3) is a macro when using e.g. -D_FORTIFY_SOURCE=2.
2020-10-22 02:25:19 +01:00
Yuxuan Shui
ff70f6056e core: remove a bit more of Xlib dependencies
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-21 02:06:15 +00:00
Yuxuan Shui
00ee5cb4b1 diagnostics: fix missing newline
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-20 03:10:26 +00:00
Yuxuan Shui
d00c1c7a1d compile.h, utils.h: rename popcount
Rename `popcountl` to `popcntul` to avoid name conflicts with NetBSD
system headers.

Remove the unused `popcount` function.

Closes #502

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-07 19:35:55 +01:00
Bernd Busse
fb3760bbe3 config: add wintypes option blur-background 2020-10-01 23:28:05 +02:00
Bernd Busse
e92e250237 Merge pull request #500 from tryone144/fix-codeql-warning
Fix CodeQL warning
2020-10-01 23:22:45 +02:00
Bernd Busse
fbbc97eedb log: Use thread-safe version of localtime()
Fixes CodeQL warning: https://github.com/yshui/picom/security/code-scanning/1
2020-10-01 23:00:09 +02:00
Yuxuan Shui
453a9e8232 github: codeql: only install dependencies for cpp analysis
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-01 14:01:46 +01:00
yshui
aa1a32db16 github: enable CodeQL workflow
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-01 13:32:33 +01:00
Yuxuan Shui
9bb21fc726 core: remove pid file on shutdown
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-09-16 12:14:46 +01:00
jialeens
7d7eef7ff4 Accept write-pid-path option from the config file
Signed-off-by: jialeens <jialeadmin@163.com>
2020-09-16 12:14:46 +01:00
yshui
4bc1ef87c9 Merge pull request #491 from jialeens/next
update picom.sample.conf
2020-09-15 14:48:46 +01:00
jialeens
4d990b3d35 update picom.sample.conf
Signed-off-by: jialeens <jialeadmin@163.com>
2020-09-14 15:57:56 +08:00