diff --git a/src/bar/Bar.hpp b/src/bar/Bar.hpp index a3b4699..ffdc205 100644 --- a/src/bar/Bar.hpp +++ b/src/bar/Bar.hpp @@ -31,7 +31,7 @@ struct SBarModule { uint64_t updateEveryMs; std::chrono::system_clock::time_point updateLast; - xcb_gcontext_t bgcontext = NULL; // deprecated + xcb_gcontext_t bgcontext = 0; // deprecated // PADS bool isPad = false; diff --git a/src/bar/BarCommands.cpp b/src/bar/BarCommands.cpp index 8ca68bb..8b09b6a 100644 --- a/src/bar/BarCommands.cpp +++ b/src/bar/BarCommands.cpp @@ -134,13 +134,13 @@ std::string BarCommands::parseCommand(std::string command) { std::string result = ""; - for (int i = 0; i < command.length(); ++i) { + for (long unsigned int i = 0; i < command.length(); ++i) { const auto c = command[i]; if (c == '%') { // find the next one - for (int j = i + 1; i < command.length(); ++j) { + for (long unsigned int j = i + 1; i < command.length(); ++j) { if (command[j] == '%') { // found! auto toSend = command.substr(i + 1); @@ -157,7 +157,7 @@ std::string BarCommands::parseCommand(std::string command) { else if (c == '$') { // find the next one - for (int j = i + 1; i < command.length(); ++j) { + for (long unsigned int j = i + 1; i < command.length(); ++j) { if (command[j] == '$') { // found! auto toSend = command.substr(i + 1); diff --git a/src/helpers/Vector.hpp b/src/helpers/Vector.hpp index dc79626..9466582 100644 --- a/src/helpers/Vector.hpp +++ b/src/helpers/Vector.hpp @@ -14,11 +14,6 @@ class Vector2D { // returns the scale double normalize(); - Vector2D& operator=(Vector2D a) { - this->x = a.x; this->y = a.y; - - return *this; - } Vector2D operator+(Vector2D a) { return Vector2D(this->x + a.x, this->y + a.y); } diff --git a/src/ipc/ipc.cpp b/src/ipc/ipc.cpp index dab8043..8d2d941 100644 --- a/src/ipc/ipc.cpp +++ b/src/ipc/ipc.cpp @@ -36,7 +36,7 @@ void IPCSendMessage(const std::string path, SIPCMessageBarToMain smessage) { std::string message = ""; // write the WID - message += "wid" + IPC_MESSAGE_EQUALITY + std::to_string(g_pWindowManager->statusBar->getWindowID()) + IPC_MESSAGE_SEPARATOR; + message += "wid" + IPC_MESSAGE_EQUALITY + std::to_string(smessage.windowID) + IPC_MESSAGE_SEPARATOR; // append the EOF message += IPC_END_OF_FILE; diff --git a/src/windowManager.cpp b/src/windowManager.cpp index 81e3957..a4d5dfa 100644 --- a/src/windowManager.cpp +++ b/src/windowManager.cpp @@ -470,7 +470,6 @@ void CWindowManager::setFocusedWindow(xcb_drawable_t window) { PLASTWIN->setEffectiveBorderColor(CFloatingColor(ConfigManager::getInt("col.active_border"))); } - float values[1]; if (const auto PWINDOW = g_pWindowManager->getWindowFromDrawable(window); PWINDOW) { // Apply rounded corners, does all the checks inside. // The border changed so let's not make it rectangular maybe @@ -719,8 +718,6 @@ void CWindowManager::setEffectiveSizePosUsingConfig(CWindow* pWindow) { if (!pWindow || pWindow->getIsFloating()) return; - auto START = std::chrono::high_resolution_clock::now(); - const auto MONITOR = getMonitorFromWindow(pWindow); const auto BARHEIGHT = (MONITOR->ID == ConfigManager::getInt("bar:monitor") ? (ConfigManager::getInt("bar:enabled") == 1 ? ConfigManager::getInt("bar:height") : ConfigManager::parseError == "" ? 0 : ConfigManager::getInt("bar:height")) : 0); @@ -752,8 +749,6 @@ void CWindowManager::setEffectiveSizePosUsingConfig(CWindow* pWindow) { } CWindow* CWindowManager::findWindowAtCursor() { - const auto POINTERCOOKIE = xcb_query_pointer(DisplayConnection, Screen->root); - Vector2D cursorPos = getCursorPos(); const auto WORKSPACE = activeWorkspaces[getMonitorFromCursor()->ID]; @@ -1648,7 +1643,6 @@ bool CWindowManager::shouldBeFloatedOnInit(int64_t window) { // Type stuff // PROP(wm_type_cookie, HYPRATOMS["_NET_WM_WINDOW_TYPE"], UINT32_MAX); - xcb_atom_t TYPEATOM = NULL; if (wm_type_cookiereply == NULL || xcb_get_property_value_length(wm_type_cookiereply) < 1) { Debug::log(LOG, "No preferred type found. (shouldBeFloatedOnInit)");