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,19 +323,26 @@ void Hy3Layout::recalculateMonitor(const int& monitor_id) {
|
|||
|
||||
g_pHyprRenderer->damageMonitor(monitor);
|
||||
|
||||
const auto workspace = g_pCompositor->getWorkspaceByID(monitor->activeWorkspace);
|
||||
if (workspace == nullptr) return;
|
||||
// todo: refactor this
|
||||
|
||||
if (monitor->specialWorkspaceID) {
|
||||
const auto top_node = this->getWorkspaceRootGroup(monitor->specialWorkspaceID);
|
||||
auto* top_node = this->getWorkspaceRootGroup(monitor->activeWorkspace);
|
||||
if (top_node != nullptr) {
|
||||
top_node->position = monitor->vecPosition + monitor->vecReservedTopLeft;
|
||||
top_node->size =
|
||||
monitor->vecSize - monitor->vecReservedTopLeft - monitor->vecReservedBottomRight;
|
||||
|
||||
top_node->recalcSizePosRecursive();
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
top_node->recalcSizePosRecursive();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Hy3Layout::recalculateWindow(CWindow* window) {
|
||||
|
|
Loading…
Add table
Reference in a new issue