Commit Graph

14 Commits

Author SHA1 Message Date
Yuxuan Shui 1a327b06ab
Fix abort because we used log too early
Can't use log in get_early_config.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-02-08 22:46:28 +00:00
Yuxuan Shui 5fffb6f3f6
Fork as early as possible
If fork is requested, we fork as early as possible, way before anything
is initialized. This way, we don't need to do the gymnastics to make
OpenGL work properly across fork.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-02-08 01:33:42 +00:00
Yuxuan Shui 205427d7da
Exit with exit code 1 when argument parsing failed
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-30 22:19:05 +00:00
Yuxuan Shui 9d64decf2a
`compton -h` should quit after printing help
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-29 23:36:34 +00:00
Yuxuan Shui f649a949e2
Even more includes
Expand the modulemap to cover some of the system headers too.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-20 22:09:22 +00:00
Yuxuan Shui 916e23861a
Improve the header includes, cont'd
Also check in the modulemap file, and add a option to build with clang's
-fmodules.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-01-20 17:10:06 +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 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 f8c86d51b3
Mark fallthrough switch case
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-21 23:04:51 +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
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