From d6d5751886d5a3be6115ccb65b8834706d36316c Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sun, 23 Apr 2023 14:12:34 -0700 Subject: [PATCH] Fix window focus tree being set to the previously focused window Don't know why this was here tbh --- src/Hy3Layout.cpp | 6 ++---- src/Hy3Layout.hpp | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp index 1643482..4d0a863 100644 --- a/src/Hy3Layout.cpp +++ b/src/Hy3Layout.cpp @@ -551,11 +551,9 @@ CWindow* Hy3Layout::getNextWindowCandidate(CWindow* window) { } void Hy3Layout::onWindowFocusChange(CWindow* window) { - Debug::log(LOG, "Switched windows from %p to %p", this->lastActiveWindow, window); - this->lastActiveWindow = window; - auto* node = this->getNodeFromWindow(this->lastActiveWindow); + Debug::log(LOG, "Switched windows from to %p", window); + auto* node = this->getNodeFromWindow(window); if (node == nullptr) return; - Debug::log(LOG, "Switched focused node to %p (parent: %p)", node, node->parent); while (node->parent != nullptr) { node->parent->data.as_group.lastFocusedChild = node; diff --git a/src/Hy3Layout.hpp b/src/Hy3Layout.hpp index 6e88f9b..301adef 100644 --- a/src/Hy3Layout.hpp +++ b/src/Hy3Layout.hpp @@ -115,8 +115,6 @@ public: std::list nodes; private: - CWindow* lastActiveWindow = nullptr; - struct { bool started = false; bool xExtent = false;