fix: moveNodeToWorkspace breakage across monitors (hy3 dispatchers)

This commit is contained in:
outfoxxed 2024-06-07 14:10:23 -07:00
parent 2728dbed6a
commit cf919397d4
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
2 changed files with 7 additions and 0 deletions

View file

@ -2,6 +2,7 @@
# Upcoming
- Fixed IPC and wlr-foreign-toplevel not getting fullscreen and maximize events.
- Fixed glitches when moving nodes between monitors with hy3 dispatchers.
## hl0.40.0 and before

View file

@ -953,9 +953,12 @@ void changeNodeWorkspaceRecursive(Hy3Node& node, const PHLWORKSPACE& workspace)
if (node.data.is_window()) {
auto window = node.data.as_window();
g_pHyprRenderer->damageWindow(window);
window->moveToWorkspace(workspace);
window->m_iMonitorID = workspace->m_iMonitorID;
window->updateToplevel();
window->updateDynamicRules();
window->uncacheWindowDecos();
} else {
for (auto* child: node.data.as_group().children) {
changeNodeWorkspaceRecursive(*child, workspace);
@ -996,6 +999,7 @@ void Hy3Layout::moveNodeToWorkspace(const PHLWORKSPACE& origin, std::string wsna
if (focused_window != nullptr
&& (focused_window_node == nullptr || focused_window->m_bIsFullscreen))
{
g_pHyprRenderer->damageWindow(focused_window);
g_pCompositor->moveWindowToWorkspaceSafe(focused_window, workspace);
} else {
if (node == nullptr) return;
@ -1015,6 +1019,8 @@ void Hy3Layout::moveNodeToWorkspace(const PHLWORKSPACE& origin, std::string wsna
changeNodeWorkspaceRecursive(*node, workspace);
this->insertNode(*node);
g_pCompositor->updateWorkspaceWindows(origin->m_iID);
g_pCompositor->updateWorkspaceWindows(workspace->m_iID);
}
if (follow) {