mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
Recalculate root node when recalculateMonitor is called
Fixes bars being overlaid on windows and mismatched fullscreen sizes.
This commit is contained in:
parent
6cf58b9c3d
commit
f4081531bd
1 changed files with 17 additions and 10 deletions
|
@ -323,18 +323,25 @@ void Hy3Layout::recalculateMonitor(const int& monitor_id) {
|
||||||
|
|
||||||
g_pHyprRenderer->damageMonitor(monitor);
|
g_pHyprRenderer->damageMonitor(monitor);
|
||||||
|
|
||||||
const auto workspace = g_pCompositor->getWorkspaceByID(monitor->activeWorkspace);
|
// todo: refactor this
|
||||||
if (workspace == nullptr) return;
|
|
||||||
|
|
||||||
if (monitor->specialWorkspaceID) {
|
auto* top_node = this->getWorkspaceRootGroup(monitor->activeWorkspace);
|
||||||
const auto top_node = this->getWorkspaceRootGroup(monitor->specialWorkspaceID);
|
if (top_node != nullptr) {
|
||||||
|
top_node->position = monitor->vecPosition + monitor->vecReservedTopLeft;
|
||||||
|
top_node->size =
|
||||||
|
monitor->vecSize - monitor->vecReservedTopLeft - monitor->vecReservedBottomRight;
|
||||||
|
|
||||||
if (top_node != nullptr) {
|
top_node->recalcSizePosRecursive();
|
||||||
top_node->position = monitor->vecPosition + monitor->vecReservedTopLeft;
|
}
|
||||||
top_node->size =
|
|
||||||
monitor->vecSize - monitor->vecReservedTopLeft - monitor->vecReservedBottomRight;
|
top_node = this->getWorkspaceRootGroup(monitor->specialWorkspaceID);
|
||||||
top_node->recalcSizePosRecursive();
|
|
||||||
}
|
if (top_node != nullptr) {
|
||||||
|
top_node->position = monitor->vecPosition + monitor->vecReservedTopLeft;
|
||||||
|
top_node->size =
|
||||||
|
monitor->vecSize - monitor->vecReservedTopLeft - monitor->vecReservedBottomRight;
|
||||||
|
|
||||||
|
top_node->recalcSizePosRecursive();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue