34eb14fb0f
Tweak the default shadow-radius
...
We need to make the radius 1.5x bigger to achieve the same effect.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2019-01-02 11:14:27 +00:00
6d3ea3564b
Implement vsync for the new xrender backend
...
We use the Present extension for that, since it is the best option we
have.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2019-01-01 14:59:56 +00:00
6413ccbd71
Improve XSync extension detection
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2019-01-01 14:09:55 +00:00
428c24a6fa
Speed up shadow generation for small windows
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2019-01-01 11:35:59 +00:00
3686bf7a33
Use functions in backend/backend_common.c
...
Build backend_common.c even when new_backend=false.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2019-01-01 11:01:47 +00:00
4aeffa36b8
Refactor shadow generation
...
Trying to make the code easier to understand. The logic is unchanged.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2019-01-01 10:54:21 +00:00
edb1139507
Add some comments to backend.h
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-31 23:30:45 +00:00
86713c8170
Add make_shadow and paint_all_new to backend_common.c
...
Also made make_shadow private in render.c
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-31 14:30:58 +00:00
3b2e149369
Add missing include in x.h
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-31 14:30:53 +00:00
0b94bde004
Remove unused variable in backend/xrender.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-31 14:08:35 +00:00
6226ab1228
Fix memory leak in backend/xrender.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-31 08:22:57 +00:00
cb12430633
Use options_t::shadow_radius for shadow size calculation
...
No need to access gaussian_map
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-31 08:15:36 +00:00
4039a6db64
Remove all use of psglx from backend/glx.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-31 07:37:49 +00:00
a2022661e6
Move glx_init_blur to gl_common.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-31 07:18:38 +00:00
8629fee78f
Fix some static analyzer complains in glx.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-31 06:54:59 +00:00
f322bd4a53
Remove backend/gl/glx.h
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-31 01:53:25 +00:00
61f55f69a6
Add backend/gl/glx.c to build
...
Still a long way to go for the glx backend.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-31 01:32:31 +00:00
3e7b7bd608
Move glx_fbconfig_t to opengl.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-31 00:38:13 +00:00
e7a8adf2cc
Clear ps->sync_fence after error, part 2
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-30 22:13:30 +00:00
14f357ea2b
Clean up ps->sync_fence after error
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-30 08:05:16 +00:00
d12b3c1e1d
Add missing header files
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-30 08:00:22 +00:00
4bfed7f7e3
Use one global XSync fence
...
And only sync once per frame.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-30 07:43:24 +00:00
80847dd3fa
Refactor the XSync fence code
...
Use a temporary fence everytime. Convert the Xlib XSync functions to use
xcb_sync_*.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-30 07:06:47 +00:00
bc0382d962
Remove usage of Xlib from x.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-30 06:05:39 +00:00
2e26c511c4
Fix allocation with 0 size
...
Thanks to the static analyzer
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-27 20:56:05 +00:00
669cbcdb14
Fix some static analyzer errors
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-27 20:47:58 +00:00
51d03132bf
A bit more xcb conversion
...
None -> XCB_NONE
Window -> xcb_window_t
Atom -> xcb_atom_t
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-27 20:45:38 +00:00
86e744345e
Fix build with gcc 6
...
gcc want _Noreturn to be the first thing in declaration.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-25 14:55:01 +00:00
311fa65840
Mark report_allocation_failure as noreturn
...
Silence an static analyzer warning
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-25 04:11:29 +00:00
1c0770dc66
Fix typo in man page
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-25 01:31:54 +00:00
9881e1168e
Merge pull request #80 from yshui/wintypes
...
Fix wintypes options handling
2018-12-24 21:40:12 +00:00
4f1dddd072
-C and -G *disables* shadow, not enabling them
...
Well, I made a mistake.
Fixes #79
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-24 19:58:25 +00:00
f41765fca5
Refactor setting the default winopts
...
Move filling winopts with default values to after command line options have
been parsed, not after parsing the config file. This is more intuitive.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-24 19:57:16 +00:00
b434451abb
Lower x_print_error to log_debug
...
This information is only really useful for debugging anyway.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-22 14:29:26 +00:00
1b947658ff
Enable opengl by default
...
Was disabled by accident in 0c4b690b2
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-22 00:58:38 +00:00
068611e2e7
Merge pull request #76 from yshui/split-backends-part1
...
First step of split backend into modules
2018-12-22 00:53:47 +00:00
0c4b690b2b
First step of split backend into modules
...
This commit introduced a new, modular backend interface. The interface
is not very good, since I don't think I fully understand all the
requirements writing a backend have. But this is a good first step.
This commit also includes an initial xrender backend written using the
new interface, and some opengl backend related helper functions, which
are taken from the old opengl backend.
However, there is not integration with the core compton yet. compton
will still use the old backend code. This commit is here so we can get
the automated build test.
What is implemented in the new xrender backend:
* Windows with transparency
* Shadow
* Opacity
* Wallpaper (getting the root pixmap)
* Blur
Known problem with the xrender backend:
* It is slower
Things that still need to be figured out:
* What is the better way to add vsync to the new backends
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-22 00:50:25 +00:00
d6a54c25e9
Merge pull request #75 from yshui/split-backend-prepare
...
Split backend prepare
2018-12-22 00:36:06 +00:00
2cf04544d8
Add some window related helper
...
For the backend refactoring.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-22 00:34:08 +00:00
db5a78790c
Make make_shadow() public
...
Some the refactored backends can use it.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-22 00:30:45 +00:00
af9d5ece00
Update CONTRIBUTORS
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-22 00:15:09 +00:00
7993758bf9
Merge pull request #74 from Avi-D-coder/next
...
Fix compile errors triggered by vsync-drm option
2018-12-22 00:13:52 +00:00
699d40fce9
Merge pull request #73 from yshui/x-helpers
...
Some new x helper functions
2018-12-21 23:57:46 +00:00
6c00d46d7a
Some new x helper functions
...
They should be useful for the refactored backends.
Renamed x_create_picture to x_create_picture_with_pictfmt.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-21 23:47:31 +00:00
f8c86d51b3
Mark fallthrough switch case
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-21 23:04:51 +00:00
e211c395fa
Append to log file, not overwrite
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-21 23:02:19 +00:00
8bb7027393
Fix memory leak in get_cfg
...
When setting --shadow-exclude-reg from both the config file and the
command line, one of the strings is not freed.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-21 22:59:28 +00:00
7915ade1be
Make --logpath work again
...
Also add a new option "log-file" to config file and command line, it
doesn the same thing as --logpath.
--logpath was never documented, and "log-file" is more consistent with
the naming of options.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-21 22:59:21 +00:00
09e372cc9d
Fix vsync-drm
2018-12-21 17:25:24 -05:00
fa98564040
Update README
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com >
2018-12-21 21:23:45 +00:00