mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
Fix window lastFocusedChild not being updated
This commit is contained in:
parent
bd3d973fbf
commit
cffbfbe63d
1 changed files with 8 additions and 3 deletions
|
@ -551,10 +551,15 @@ CWindow* Hy3Layout::getNextWindowCandidate(CWindow* window) {
|
|||
|
||||
void Hy3Layout::onWindowFocusChange(CWindow* window) {
|
||||
Debug::log(LOG, "Switched windows from %p to %p", this->lastActiveWindow, window);
|
||||
auto* node = this->getNodeFromWindow(this->lastActiveWindow);
|
||||
if (node != nullptr) Debug::log(LOG, "Switched focused node to %p (parent: %p)", node, node->parent);
|
||||
|
||||
this->lastActiveWindow = window;
|
||||
auto* node = this->getNodeFromWindow(this->lastActiveWindow);
|
||||
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;
|
||||
node = node->parent;
|
||||
}
|
||||
}
|
||||
|
||||
bool Hy3Layout::isWindowTiled(CWindow* window) {
|
||||
|
|
Loading…
Add table
Reference in a new issue