d6d5751886d5a3be6115ccb65b8834706d36316c

Author
outfoxxed <outfoxxed@outfoxxed.me>
Committer
outfoxxed <outfoxxed@outfoxxed.me>
Date

Message

Fix window focus tree being set to the previously focused window

Don't know why this was here tbh

Diff

 1diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp
 2index 16434827df3f44949f3b39aa80c4d368a9911fdd..4d0a863e1e56e75648300e9fbbe88bcb9aa3326d 100644
 3--- a/src/Hy3Layout.cpp
 4+++ b/src/Hy3Layout.cpp
 5@@ -551,11 +551,9 @@ CWindow* Hy3Layout::getNextWindowCandidate(CWindow* window) {
 6 }
 7 
 8 void Hy3Layout::onWindowFocusChange(CWindow* window) {
 9-	Debug::log(LOG, "Switched windows from %p to %p", this->lastActiveWindow, window);
10-	this->lastActiveWindow = window;
11-	auto* node = this->getNodeFromWindow(this->lastActiveWindow);
12+	Debug::log(LOG, "Switched windows from to %p", window);
13+	auto* node = this->getNodeFromWindow(window);
14 	if (node == nullptr) return;
15-	Debug::log(LOG, "Switched focused node to %p (parent: %p)", node, node->parent);
16 
17 	while (node->parent != nullptr) {
18 		node->parent->data.as_group.lastFocusedChild = node;
19diff --git a/src/Hy3Layout.hpp b/src/Hy3Layout.hpp
20index 6e88f9b5143422775508a457f469312ec1498ee7..301adef8fd254df70acfbd6dcda48feece30851c 100644
21--- a/src/Hy3Layout.hpp
22+++ b/src/Hy3Layout.hpp
23@@ -115,8 +115,6 @@ public:
24 
25 	std::list<Hy3Node> nodes;
26 private:
27-	CWindow* lastActiveWindow = nullptr;
28-
29 	struct {
30 		bool started = false;
31 		bool xExtent = false;