Initial implementation of active window

TODO:
- Sometimes the active event arrives before the create, in which case the window is not activated.
- The window title event also looks unreliable in some cases, will need to investigate
This commit is contained in:
Pol Rivero
2025-05-01 20:22:18 +02:00
parent 59c270ec06
commit 72404a77f0
6 changed files with 57 additions and 5 deletions

View File

@@ -97,9 +97,9 @@ WindowRepr WindowCreationPayload::repr(Workspaces &workspace_manager) {
return std::get<Repr>(m_window);
}
if (std::holds_alternative<ClassAndTitle>(m_window)) {
auto [window_class, window_title] = std::get<ClassAndTitle>(m_window);
auto const &[window_class, window_title] = std::get<ClassAndTitle>(m_window);
return {m_windowAddress, window_class, window_title,
workspace_manager.getRewrite(window_class, window_title)};
workspace_manager.getRewrite(window_class, window_title), m_isActive};
}
// Unreachable
spdlog::error("WorkspaceWindow::repr: Unreachable");