mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
Fix the last selected node on a workspace always being highlighted
If a floating window or other workspace was focused, the highlight would remain.
This commit is contained in:
parent
102360f96a
commit
96bd425544
1 changed files with 4 additions and 1 deletions
|
@ -1816,7 +1816,10 @@ bool Hy3Layout::shouldRenderSelected(CWindow* window) {
|
|||
auto* root = this->getWorkspaceRootGroup(window->m_iWorkspaceID);
|
||||
if (root == nullptr || root->data.as_group.focused_child == nullptr) return false;
|
||||
auto* focused = root->getFocusedNode();
|
||||
if (focused == nullptr) return false;
|
||||
if (focused == nullptr
|
||||
|| (focused->data.type == Hy3NodeData::Window
|
||||
&& focused->data.as_window != g_pCompositor->m_pLastWindow))
|
||||
return false;
|
||||
|
||||
switch (focused->data.type) {
|
||||
case Hy3NodeData::Window: return focused->data.as_window == window;
|
||||
|
|
Loading…
Add table
Reference in a new issue