mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-08 14:41:57 +08:00
Added support on X11 for a global option to delay switching screens
when the mouse reaches a jump zone.
This commit is contained in:
@@ -624,6 +624,9 @@ CConfig::getOptionName(OptionID id)
|
||||
if (id == kOptionHeartbeat) {
|
||||
return "heartbeat";
|
||||
}
|
||||
if (id == kOptionScreenSwitchDelay) {
|
||||
return "switchDelay";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -659,7 +662,8 @@ CConfig::getOptionValue(OptionID id, OptionValue value)
|
||||
return "none";
|
||||
}
|
||||
}
|
||||
if (id == kOptionHeartbeat) {
|
||||
if (id == kOptionHeartbeat ||
|
||||
id == kOptionScreenSwitchDelay) {
|
||||
return CStringUtil::print("%d", value);
|
||||
}
|
||||
|
||||
@@ -767,6 +771,9 @@ CConfig::readSectionOptions(std::istream& s)
|
||||
else if (name == "heartbeat") {
|
||||
addOption("", kOptionHeartbeat, parseInt(value));
|
||||
}
|
||||
else if (name == "switchDelay") {
|
||||
addOption("", kOptionScreenSwitchDelay, parseInt(value));
|
||||
}
|
||||
else {
|
||||
throw XConfigRead("unknown argument");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user