Improvement: Change VSync mode with D-Bus & Makefile update & Misc
- Add on-the-fly VSync option modification via D-Bus, as requested by kunitoki (#80). Expose parse_vsync(), create vsync_init() and ensure_glx_context(). - Change default value of ps->drm_fd to -1. - Update Makefile. Change the install/uninstall rules and add doc installation, requested by hasufell in #85. - Mark window not damaged in map_win(). It helps in reducing flickering with inverted window color, but I'm not completely sure if it's safe. - Avoid modifying w->invert_color when window is unmapped. - Update documentation. Thanks to hasufell for pointing out.
This commit is contained in:
17
src/common.h
17
src/common.h
@ -1167,6 +1167,20 @@ normalize_d(double d) {
|
||||
return normalize_d_range(d, 0.0, 1.0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse a VSync option argument.
|
||||
*/
|
||||
static inline bool
|
||||
parse_vsync(session_t *ps, const char *str) {
|
||||
for (vsync_t i = 0; i < (sizeof(VSYNC_STRS) / sizeof(VSYNC_STRS[0])); ++i)
|
||||
if (!strcasecmp(str, VSYNC_STRS[i])) {
|
||||
ps->o.vsync = i;
|
||||
return true;
|
||||
}
|
||||
printf_errf("(\"%s\"): Invalid vsync argument.", str);
|
||||
return false;
|
||||
}
|
||||
|
||||
timeout_t *
|
||||
timeout_insert(session_t *ps, time_ms_t interval,
|
||||
bool (*callback)(session_t *ps, timeout_t *ptmout), void *data);
|
||||
@ -1421,6 +1435,9 @@ free_winprop(winprop_t *pprop) {
|
||||
void
|
||||
force_repaint(session_t *ps);
|
||||
|
||||
bool
|
||||
vsync_init(session_t *ps);
|
||||
|
||||
#ifdef CONFIG_DBUS
|
||||
/** @name DBus handling
|
||||
*/
|
||||
|
Reference in New Issue
Block a user