Commit Graph

1239 Commits

Author SHA1 Message Date
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
yshui 387e247bcf
Merge pull request #195 from kapsh/scripts_bindir
build: install scripts into bindir provided by meson
2019-06-24 11:20:44 +01:00
Yuxuan Shui a52f95acd7
gl_common: fix misunderstanding of VAO
GL_ARRAY_BUFFER is not part of VAO state.

This shouldn't affect compton's behaviour at all, though.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-06-24 01:51:50 +01:00
Yuxuan Shui 85abdef765
gl_common: use explicit vertex attrib loction
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-06-24 01:34:12 +01:00
Alexander Kapshuna 87aafc1738 build: install scripts into bindir provided by meson
This will use --bindir value to install additional scripts into the same location
as compton binary (current behavior: hardcoded $prefix/bin).
Useful for custom installations and/or cross-compiling.
2019-06-23 13:14:13 +03:00
Yuxuan Shui 5a034ea169
Fix root change handling when screen is unredirected
If screen is not redirected, we don't need to reinitialize the backend
when we got a root change event.

Fixes #189

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-06-15 23:04:49 +01:00
Yuxuan Shui 863e2c82ec
new backends: don't destroy blur context when there's none
Fixes #190

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-06-13 08:14:14 +01:00
Yuxuan Shui 76e574dc94
Update man pages about blur method options
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-06-09 19:32:23 +01:00
Yuxuan Shui 67f0ec773a
new backends: blur interface update
To prepare for different blur methods, the blur interface of backends
has been splitted into two parts.

Now to use blur, a blur context must be created first; then, the blur
method should be called with the blur context created.

Updated the existing backends to the new interface. Also implemented
handling of the new blur options.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-06-09 19:26:41 +01:00
Yuxuan Shui 1eba43f888
Rename blur kernel parameter types
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-06-09 12:57:23 +01:00
Yuxuan Shui c1b2ce1fce
Update generate_blur_kernel to use abstract parameter type
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-06-09 12:44:32 +01:00
Yuxuan Shui e16e592302
Move enum blur_method to backend.h
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-06-09 12:43:51 +01:00