From 796cdb52ccacc0396ac6ad02836a133ee7f1ac3e Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Sun, 1 Jan 2017 15:45:18 +0100 Subject: [PATCH] refactor: Rename restack function --- include/utils/bspwm.hpp | 2 +- include/utils/i3.hpp | 2 +- src/components/bar.cpp | 4 ++-- src/utils/bspwm.cpp | 4 ++-- src/utils/i3.cpp | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/utils/bspwm.hpp b/include/utils/bspwm.hpp index 89afa9a6..cf0223a1 100644 --- a/include/utils/bspwm.hpp +++ b/include/utils/bspwm.hpp @@ -25,7 +25,7 @@ namespace bspwm_util { }; vector root_windows(connection& conn); - bool restack_above_root(connection& conn, const monitor_t& mon, const xcb_window_t win); + bool restack_to_root(connection& conn, const monitor_t& mon, const xcb_window_t win); string get_socket_path(); diff --git a/include/utils/i3.hpp b/include/utils/i3.hpp index 58e481b7..8e643a70 100644 --- a/include/utils/i3.hpp +++ b/include/utils/i3.hpp @@ -19,7 +19,7 @@ namespace i3_util { shared_ptr focused_workspace(const connection_t&); vector root_windows(connection& conn, const string& output_name = ""); - bool restack_above_root(connection& conn, const monitor_t& mon, const xcb_window_t win); + bool restack_to_root(connection& conn, const monitor_t& mon, const xcb_window_t win); } namespace { diff --git a/src/components/bar.cpp b/src/components/bar.cpp index 55d33256..c887d50f 100644 --- a/src/components/bar.cpp +++ b/src/components/bar.cpp @@ -366,10 +366,10 @@ void bar::restack_window() { auto restacked = false; if (wm_restack == "bspwm") { - restacked = bspwm_util::restack_above_root(m_connection, m_opts.monitor, m_opts.window); + restacked = bspwm_util::restack_to_root(m_connection, m_opts.monitor, m_opts.window); #if ENABLE_I3 } else if (wm_restack == "i3" && m_opts.override_redirect) { - restacked = i3_util::restack_above_root(m_connection, m_opts.monitor, m_opts.window); + restacked = i3_util::restack_to_root(m_connection, m_opts.monitor, m_opts.window); } else if (wm_restack == "i3" && !m_opts.override_redirect) { m_log.warn("Ignoring restack of i3 window (not needed when `override-redirect = false`)"); wm_restack.clear(); diff --git a/src/utils/bspwm.cpp b/src/utils/bspwm.cpp index 2ab8045c..e5786057 100644 --- a/src/utils/bspwm.cpp +++ b/src/utils/bspwm.cpp @@ -34,12 +34,12 @@ namespace bspwm_util { } /** - * Restack given window above the bspwm root window + * Restack given window relative to the bspwm root window * for the given monitor. * * Fixes the issue with always-on-top window's */ - bool restack_above_root(connection& conn, const monitor_t& mon, const xcb_window_t win) { + bool restack_to_root(connection& conn, const monitor_t& mon, const xcb_window_t win) { for (auto&& root : root_windows(conn)) { auto geom = conn.get_geometry(root); diff --git a/src/utils/i3.cpp b/src/utils/i3.cpp index 29177a1d..d170790b 100644 --- a/src/utils/i3.cpp +++ b/src/utils/i3.cpp @@ -55,12 +55,12 @@ namespace i3_util { } /** - * Restack given window above the i3 root window + * Restack given window relative to the i3 root window * defined for the given monitor * * Fixes the issue with always-on-top window's */ - bool restack_above_root(connection& conn, const monitor_t& mon, const xcb_window_t win) { + bool restack_to_root(connection& conn, const monitor_t& mon, const xcb_window_t win) { for (auto&& root : root_windows(conn, mon->name)) { const uint32_t value_mask = XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE; const uint32_t value_list[2]{root, XCB_STACK_MODE_BELOW};