Commit Graph

1300 Commits

Author SHA1 Message Date
Yuxuan Shui a229f34eaa
new backend: fix background blur of window with opacity set
Only render blur with transparency when window is fading in/out.
Otherwise, a window with a set opacity will always have a completely
blurred background.

Fixes #198

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-26 23:43:28 +01:00
Yuxuan Shui 79fc36b3e3
win: don't change window OPACITY property
Don't override the OPACITY property set by the user on the window.

Fixes #134

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-26 22:29:42 +01:00
Yuxuan Shui 3434ea25f4
new xrender: fix nothing gets rendered without vsync
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-26 20:25:17 +01:00
Yuxuan Shui c7bb6b0fe3
Clarify some of the backend interface functions
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-26 18:32:39 +01:00
Yuxuan Shui e3b93a4f84
Additional blur artifact fix
There were still some artifacts left when multiple semi-transparent
windows are stacked on top of each other.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-26 18:28:22 +01:00
Yuxuan Shui 0109fe181e
gl_common: fix memory leak in _gl_fill
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-26 03:53:24 +01:00
Yuxuan Shui 4772103334
Remove some unused members of session_t
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-26 03:39:01 +01:00
Yuxuan Shui 357968c815
options: remove a spurious warning
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-26 02:44:42 +01:00
yshui 04ae6934e1
Merge pull request #206 from yshui/fix-blur-artifacts
Fix blur artifacts in experimental backends

Closes #194 #50
2019-07-26 02:34:06 +01:00
Yuxuan Shui d37a4136ee
new xrender: implement partial updates
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-26 02:31:45 +01:00
Yuxuan Shui 5a861d5d6a
gl_common, new glx: implement partial updates
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-26 02:22:05 +01:00
Yuxuan Shui 06dba4b196
backend: do partial updates
Although the functionality is not implemented by any backends yet.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-26 02:05:06 +01:00
Yuxuan Shui f86d6b7cbd
backend: update present interface for partial updates
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-26 02:05:00 +01:00
Yuxuan Shui bc3ca92e04
gl common: render into a texture
Instead of rendering into the back buffer, render into a intermediate
texture.

This is a preparation for partial screen updating, which is necessary to
eliminate artifacts visible when using blur and use-damage together.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-26 01:20:11 +01:00
Yuxuan Shui 3d84f3f92a
gl_common: fix type mismatch when calling glVertexAttribPointer
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-26 01:19:55 +01:00
Yuxuan Shui 8dae86a8cf
dbus: log resets
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-25 21:32:59 +01:00
Yuxuan Shui 159a45b9e9
core: root_image freeing shouldn't be in a loop 2019-07-25 21:25:43 +01:00
Yuxuan Shui 80d77b4ee8
core: don't reuse X connection across resets
In theory, it should be fine. But it causes mesa to stuck in
xcb_wait_for_special_event, indicating X connection setup issues.

Instead of investigating what went wrong in mesa, I choose to apply this
simple fix.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-25 21:15:47 +01:00
Yuxuan Shui f9703cdc04
dbus: fix resetting
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-25 21:01:40 +01:00
Yuxuan Shui 79b135dccc
Fix warnings when opengl is disabled
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-25 02:52:37 +01:00
Yuxuan Shui 72cedea5a3
config: fix warning when config_file is disabled
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-25 02:46:46 +01:00
Yuxuan Shui 4c814a7b81
Update test.h
Some compiler warnings are fixed there.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-25 02:44:07 +01:00
Yuxuan Shui 9194506696
core: destroy debug window in session_destroy
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-25 02:38:03 +01:00
Yuxuan Shui 5094400ab7
core: don't deinit tls logger in session_destroy
tls logger is initialized by main(), so only main() could deinit it.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-25 02:37:43 +01:00
Yuxuan Shui bb756b2238
Fix compiler warning about unused parameters
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-25 02:27:02 +01:00
Yuxuan Shui c3c0578d14
meson.build: add -Wempty-body
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-25 01:57:38 +01:00
Yuxuan Shui 3f2a6718df
meson.build: rename build_docs to with_docs
Fix meson complaint.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-25 01:29:42 +01:00
Yuxuan Shui 6f8ea5f740
meson.build: update warning flags
-Wextra is removed, some of the warning flags included in -Wextra are
now explicitly set.

-Wno-unused-parameter is removed. The warnings will take a while to fix.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-25 01:29:39 +01:00
Yuxuan Shui 62878d7c57
gl_common: use a dummy pass to unify blur code paths
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-25 00:36:42 +01:00
Yuxuan Shui 4c9ded837f
new backend: add interface for query blur size
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-24 23:27:51 +01:00
Yuxuan Shui 9cb7fcf645
Update CONTRIBUTORS
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-19 22:49:23 +01:00
yshui 35ad3059f1
Merge pull request #187 from tatokis/xcb-fullscreen-query
Use XCB to check if an application is fullscreen
2019-07-19 15:43:53 +01:00
Tasos Sahanidis 93642e537f
Add --no-ewmh-fullscreen
This arg reverts to the old behaviour of checking for fullscreen
windows.
2019-07-19 14:13:41 +03:00
Tasos Sahanidis 10d5c9b2f9
Use XCB to check if an application is fullscreen 2019-07-19 14:11:15 +03:00
Yuxuan Shui d45ed14b23
Bump version number
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-18 20:52:51 +01:00
Yuxuan Shui ad30b4f826
gl_common: use texelFetch
This relieves us from the need to normalize texture coordinates.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-14 16:21:22 +01:00
Yuxuan Shui 8a794e0ce1
Improve the compatibility of gl_has_extension
Fix infinite loop when running under RenderDoc

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-13 19:30:26 +01:00
Yuxuan Shui 372f4f816e
new backend: ignore window tranparency info from the backend
Doing this forces compton to blur every windows' background.

However, doing this can be beneficial, we will figure out a way
to do this properly in the future.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-13 12:44:41 +01:00
Yuxuan Shui 426043baa7
Improve transparency detection for blur
Previously, only the WM windows (window manager usually reparents the
application windows under its own window so it can manage them) are
checked for alpha channels. Some of the window managers (e.g. awesome)
acquire alpha channels for all of the WM windows, whether the underlying
application windows have alpha channel or not.

With this change, the application windows are also checked for alpha
channels. If a WM window has alpha but its child doesn't, only the WM
frame will be considered to be semi-transparent. Thus preventing some
unnecessary blurring.

Closes #191

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-13 12:37:28 +01:00
Yuxuan Shui 7d28309a47
Stop debug mode from being used without the new backends
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-07 19:55:34 +01:00
Yuxuan Shui 722b01ca6a
Fix creation of X convolution kernel
During normalization of the kernel, the center element is added to the
sum twice, causing the resulting elements to be smaller than they should
be.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-07 19:51:42 +01:00
Yuxuan Shui 4c460a7bd5
new xrender: fix black border around blurred area
Similar fix to 6d646b54.

Also ping #50

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-07 19:49:23 +01:00
Yuxuan Shui e62971a0c3
gl common: fix memory leak
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-07 19:09:15 +01:00
Yuxuan Shui 182a207afd
new xrender: fix offset when using multi-pass blur
Also makes the code a bit more readable by replacing stateful variables.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-07 18:55:20 +01:00
Yuxuan Shui 6d646b543f
new glx: fix black border around blurred areas
This is done by extending the blur area internally when process
blurring.

Ping: #50, cause this fixes that problem but only when using the
experiemental backends.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-07 18:39:46 +01:00
Yuxuan Shui 4a0092c808
Don't register as compositor manager in debug mode
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-07 17:25:26 +01:00
yshui 3cd61c9281
Merge pull request #201 from yshui/debug-mode
Debug mode
2019-07-07 16:22:29 +01:00
Yuxuan Shui d31e9dae20
Don't render the debug window
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-07 16:20:08 +01:00
Yuxuan Shui 0b0d896ffe
Add debug mode
When enabled, the result will be redirected to a window, and compton
won't take over the screen.

Makes debugging easier.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-07 16:20:00 +01:00
Yuxuan Shui 640b4b1c99
Move resize_region to region.h
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-07-06 13:26:25 +01:00