refactor: Cleanup

This commit is contained in:
Michael Carlberg 2016-10-10 18:53:16 +02:00
parent 98380c442a
commit a9553ff850
3 changed files with 21 additions and 39 deletions

View File

@ -9,27 +9,27 @@ struct cached_atom {
xcb_atom_t* atom;
};
xcb_atom_t _NET_WM_NAME;
xcb_atom_t _NET_WM_WINDOW_TYPE;
xcb_atom_t _NET_WM_WINDOW_TYPE_DOCK;
xcb_atom_t _NET_WM_WINDOW_TYPE_NORMAL;
xcb_atom_t _NET_WM_PID;
xcb_atom_t _NET_WM_STATE;
xcb_atom_t _NET_WM_STATE_STICKY;
xcb_atom_t _NET_WM_STATE_SKIP_TASKBAR;
xcb_atom_t _NET_WM_STATE_ABOVE;
xcb_atom_t WM_PROTOCOLS;
xcb_atom_t WM_DELETE_WINDOW;
xcb_atom_t _XEMBED;
xcb_atom_t _XEMBED_INFO;
xcb_atom_t _NET_SYSTEM_TRAY_OPCODE;
xcb_atom_t MANAGER;
xcb_atom_t WM_STATE;
xcb_atom_t _NET_SYSTEM_TRAY_ORIENTATION;
xcb_atom_t WM_TAKE_FOCUS;
static xcb_atom_t _NET_WM_NAME;
static xcb_atom_t _NET_WM_WINDOW_TYPE;
static xcb_atom_t _NET_WM_WINDOW_TYPE_DOCK;
static xcb_atom_t _NET_WM_WINDOW_TYPE_NORMAL;
static xcb_atom_t _NET_WM_PID;
static xcb_atom_t _NET_WM_STATE;
static xcb_atom_t _NET_WM_STATE_STICKY;
static xcb_atom_t _NET_WM_STATE_SKIP_TASKBAR;
static xcb_atom_t _NET_WM_STATE_ABOVE;
static xcb_atom_t WM_PROTOCOLS;
static xcb_atom_t WM_DELETE_WINDOW;
static xcb_atom_t _XEMBED;
static xcb_atom_t _XEMBED_INFO;
static xcb_atom_t _NET_SYSTEM_TRAY_OPCODE;
static xcb_atom_t MANAGER;
static xcb_atom_t WM_STATE;
static xcb_atom_t _NET_SYSTEM_TRAY_ORIENTATION;
static xcb_atom_t WM_TAKE_FOCUS;
// clang-format off
cached_atom ATOMS[18] = {
static cached_atom ATOMS[18] = {
{"_NET_WM_NAME", sizeof("_NET_WM_NAME") - 1, &_NET_WM_NAME},
{"_NET_WM_WINDOW_TYPE", sizeof("_NET_WM_WINDOW_TYPE") - 1, &_NET_WM_WINDOW_TYPE},
{"_NET_WM_WINDOW_TYPE_DOCK", sizeof("_NET_WM_WINDOW_TYPE_DOCK") - 1, &_NET_WM_WINDOW_TYPE_DOCK},

View File

@ -12,8 +12,9 @@ file(GLOB_RECURSE source_files "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
make_executable(testrunner
SOURCES
${source_files}
TARGET_DEPENDS
lemonlib_static
CMAKE_DEPENDS
${app_binary}
cppunit
xpp)

View File

@ -11,25 +11,6 @@ class test_logger : public unit_test {
CPPUNIT_TEST_SUITE_END();
void test_output() {
// signal(SIGPIPE, SIG_IGN);
// std::string socket_path = BSPWM_SOCKET_PATH;
// const char *env_bs = std::getenv("BSPWM_SOCKET");
// if (env_bs != nullptr)
// socket_path = std::string(env_bs);
// thread t([&]{
// this_thread::yield();
// auto conn = socket_util::make_unix_connection(string{socket_path});
//
// while (true) {
// if (conn->poll(POLLHUP, 0))
// printf("conn closed\n");
// if (conn->poll(POLLIN))
// printf("has data\n");
// this_thread::sleep_for(100ms);
// }
// });
// t.join();
//
auto l = logger::configure<logger>(loglevel::TRACE).create<logger>();
l.err("error");
l.warn("warning");