diff options
Diffstat (limited to 'src/WindowUtils.cpp')
-rw-r--r-- | src/WindowUtils.cpp | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/src/WindowUtils.cpp b/src/WindowUtils.cpp index eb6080f..c6b278b 100644 --- a/src/WindowUtils.cpp +++ b/src/WindowUtils.cpp @@ -1,4 +1,5 @@ #include "../include/WindowUtils.hpp" +#include "../include/Utils.hpp" #include <X11/Xatom.h> #include <X11/Xutil.h> @@ -62,7 +63,7 @@ namespace gsr { return window_has_atom(dpy, window, net_wm_state_atom) || window_has_atom(dpy, window, wm_state_atom); } - static Window window_get_target_window_child(Display *display, Window window) { + Window window_get_target_window_child(Display *display, Window window) { if(window == None) return None; @@ -212,28 +213,6 @@ namespace gsr { return result; } - static std::string strip(const std::string &str) { - int start_index = 0; - int str_len = str.size(); - - for(int i = 0; i < str_len; ++i) { - if(str[i] != ' ') { - start_index += i; - str_len -= i; - break; - } - } - - for(int i = str_len - 1; i >= 0; --i) { - if(str[i] != ' ') { - str_len = i + 1; - break; - } - } - - return str.substr(start_index, str_len); - } - std::string get_focused_window_name(Display *dpy, WindowCaptureType window_capture_type) { std::string result; const Window focused_window = get_focused_window(dpy, window_capture_type); |