Fix window focus tree being set to the previously focused window

Don't know why this was here tbh
This commit is contained in:
outfoxxed 2023-04-23 14:12:34 -07:00
parent 8a12cb4b64
commit d6d5751886
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
2 changed files with 2 additions and 6 deletions

View file

@ -551,11 +551,9 @@ CWindow* Hy3Layout::getNextWindowCandidate(CWindow* window) {
} }
void Hy3Layout::onWindowFocusChange(CWindow* window) { void Hy3Layout::onWindowFocusChange(CWindow* window) {
Debug::log(LOG, "Switched windows from %p to %p", this->lastActiveWindow, window); Debug::log(LOG, "Switched windows from to %p", window);
this->lastActiveWindow = window; auto* node = this->getNodeFromWindow(window);
auto* node = this->getNodeFromWindow(this->lastActiveWindow);
if (node == nullptr) return; if (node == nullptr) return;
Debug::log(LOG, "Switched focused node to %p (parent: %p)", node, node->parent);
while (node->parent != nullptr) { while (node->parent != nullptr) {
node->parent->data.as_group.lastFocusedChild = node; node->parent->data.as_group.lastFocusedChild = node;

View file

@ -115,8 +115,6 @@ public:
std::list<Hy3Node> nodes; std::list<Hy3Node> nodes;
private: private:
CWindow* lastActiveWindow = nullptr;
struct { struct {
bool started = false; bool started = false;
bool xExtent = false; bool xExtent = false;