Respect follow mode from defaults struct

This commit is contained in:
Benedikt Heine 2018-10-03 13:47:32 +02:00
parent 403e4cc176
commit 2ef74c0d64

View File

@ -17,6 +17,16 @@
struct settings settings; struct settings settings;
static const char *follow_mode_to_string(enum follow_mode f_mode)
{
switch(f_mode) {
case FOLLOW_NONE: return "none";
case FOLLOW_MOUSE: return "mouse";
case FOLLOW_KEYBOARD: return "keyboard";
default: return "";
}
}
static enum follow_mode parse_follow_mode(const char *mode) static enum follow_mode parse_follow_mode(const char *mode)
{ {
if (!mode) if (!mode)
@ -273,7 +283,7 @@ void load_settings(char *cmdline_config_path)
{ {
char *c = option_get_string( char *c = option_get_string(
"global", "global",
"follow", "-follow", NULL, "follow", "-follow", follow_mode_to_string(defaults.f_mode),
"Follow mouse, keyboard or none?" "Follow mouse, keyboard or none?"
); );