clang-format
This commit is contained in:
parent
21f6f7818a
commit
c29e4837df
@ -58,7 +58,10 @@ void config::set_included(file_list included) {
|
|||||||
|
|
||||||
void config::ignore_key(const string& section, const string& key) const {
|
void config::ignore_key(const string& section, const string& key) const {
|
||||||
if (has(section, key)) {
|
if (has(section, key)) {
|
||||||
m_log.warn("The config parameter '%s.%s' is deprecated, it will be removed in the future. Please remove it from your config", section, key);
|
m_log.warn(
|
||||||
|
"The config parameter '%s.%s' is deprecated, it will be removed in the future. Please remove it from your "
|
||||||
|
"config",
|
||||||
|
section, key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,9 +253,7 @@ void controller::read_events(bool confwatch) {
|
|||||||
if (confwatch) {
|
if (confwatch) {
|
||||||
eloop->fs_event_handle(
|
eloop->fs_event_handle(
|
||||||
m_conf.filepath(), [this](const char* path, uv_fs_event events) { confwatch_handler(path, events); },
|
m_conf.filepath(), [this](const char* path, uv_fs_event events) { confwatch_handler(path, events); },
|
||||||
[this](int err) {
|
[this](int err) { m_log.err("libuv error while watching config file for changes: %s", uv_strerror(err)); });
|
||||||
m_log.err("libuv error while watching config file for changes: %s", uv_strerror(err));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_ipc) {
|
if (m_ipc) {
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
#include <csignal>
|
#include "components/screen.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <csignal>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
#include "components/config.hpp"
|
#include "components/config.hpp"
|
||||||
#include "components/logger.hpp"
|
#include "components/logger.hpp"
|
||||||
#include "components/screen.hpp"
|
|
||||||
#include "components/types.hpp"
|
#include "components/types.hpp"
|
||||||
#include "events/signal.hpp"
|
#include "events/signal.hpp"
|
||||||
#include "events/signal_emitter.hpp"
|
#include "events/signal_emitter.hpp"
|
||||||
@ -121,22 +122,20 @@ void screen::handle(const evt::randr_screen_change_notify& evt) {
|
|||||||
bool screen::have_monitors_changed() const {
|
bool screen::have_monitors_changed() const {
|
||||||
auto monitors = randr_util::get_monitors(m_connection, m_root, true, false);
|
auto monitors = randr_util::get_monitors(m_connection, m_root, true, false);
|
||||||
|
|
||||||
if(monitors.size() != m_monitors.size()) {
|
if (monitors.size() != m_monitors.size()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto m : m_monitors) {
|
for (auto m : m_monitors) {
|
||||||
auto it = std::find_if(monitors.begin(), monitors.end(),
|
auto it =
|
||||||
[m] (auto& monitor) -> bool {
|
std::find_if(monitors.begin(), monitors.end(), [m](auto& monitor) -> bool { return m->equals(*monitor); });
|
||||||
return m->equals(*monitor);
|
|
||||||
});
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Every monitor in the stored list should also exist in the newly fetched
|
* Every monitor in the stored list should also exist in the newly fetched
|
||||||
* list. If this holds then the two lists are equivalent since they have
|
* list. If this holds then the two lists are equivalent since they have
|
||||||
* the same size
|
* the same size
|
||||||
*/
|
*/
|
||||||
if(it == monitors.end()) {
|
if (it == monitors.end()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
Loading…
Reference in New Issue
Block a user