Yuxuan Shui
edb1139507
Add some comments to backend.h
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 23:30:45 +00:00
Yuxuan Shui
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
Yuxuan Shui
3b2e149369
Add missing include in x.h
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 14:30:53 +00:00
Yuxuan Shui
0b94bde004
Remove unused variable in backend/xrender.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 14:08:35 +00:00
Yuxuan Shui
6226ab1228
Fix memory leak in backend/xrender.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 08:22:57 +00:00
Yuxuan Shui
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
Yuxuan Shui
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
Yuxuan Shui
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
Yuxuan Shui
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
Yuxuan Shui
f322bd4a53
Remove backend/gl/glx.h
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 01:53:25 +00:00
Yuxuan Shui
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
Yuxuan Shui
3e7b7bd608
Move glx_fbconfig_t to opengl.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-31 00:38:13 +00:00
Yuxuan Shui
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
Yuxuan Shui
14f357ea2b
Clean up ps->sync_fence after error
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-30 08:05:16 +00:00
Yuxuan Shui
d12b3c1e1d
Add missing header files
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-30 08:00:22 +00:00
Yuxuan Shui
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
Yuxuan Shui
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
Yuxuan Shui
bc0382d962
Remove usage of Xlib from x.c
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-30 06:05:39 +00:00
Yuxuan Shui
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
Yuxuan Shui
669cbcdb14
Fix some static analyzer errors
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-27 20:47:58 +00:00
Yuxuan Shui
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
Yuxuan Shui
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
Yuxuan Shui
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
Yuxuan Shui
1c0770dc66
Fix typo in man page
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-25 01:31:54 +00:00
yshui
9881e1168e
Merge pull request #80 from yshui/wintypes
...
Fix wintypes options handling
2018-12-24 21:40:12 +00:00
Yuxuan Shui
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
Yuxuan Shui
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
Yuxuan Shui
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
Yuxuan Shui
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
yshui
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
Yuxuan Shui
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
yshui
d6a54c25e9
Merge pull request #75 from yshui/split-backend-prepare
...
Split backend prepare
2018-12-22 00:36:06 +00:00
Yuxuan Shui
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
Yuxuan Shui
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
Yuxuan Shui
af9d5ece00
Update CONTRIBUTORS
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-22 00:15:09 +00:00
yshui
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
yshui
699d40fce9
Merge pull request #73 from yshui/x-helpers
...
Some new x helper functions
2018-12-21 23:57:46 +00:00
Yuxuan Shui
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
Yuxuan Shui
f8c86d51b3
Mark fallthrough switch case
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-21 23:04:51 +00:00
Yuxuan Shui
e211c395fa
Append to log file, not overwrite
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-21 23:02:19 +00:00
Yuxuan Shui
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
Yuxuan Shui
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
Avi ד
09e372cc9d
Fix vsync-drm
2018-12-21 17:25:24 -05:00
Yuxuan Shui
fa98564040
Update README
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-21 21:23:45 +00:00
yshui
4dce20fab4
Merge pull request #72 from yshui/clean-opt2
...
Option/config parsing clean up
2018-12-21 17:23:47 +00:00
Yuxuan Shui
c8a9f32b05
Add debug logging to get_atom
...
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-21 17:22:10 +00:00
Yuxuan Shui
cb7d852b0f
Clean up options/config file parsing
...
* Pass a options_t, not session_t
* Slightly improve error handling when setting vsync method via dbus
The goal here is to limit the scope of what a given function can access.
And session_t contains basically everything, so don't pass it around.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-21 17:21:52 +00:00
Yuxuan Shui
ee2be09958
Rename argparse.* to options.*
...
Seems to be a more appropriate name.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-21 13:10:49 +00:00
yshui
d2cc4e0243
Merge pull request #69 from yshui/arg
...
Clean ups
2018-12-21 00:01:48 +00:00
Yuxuan Shui
2a2958b68d
Split the first and second pass of get_cfg
...
They are not separate functions
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-20 23:58:47 +00:00