fix: fixed some broken stuff

This commit is contained in:
Kaley, Fischer 2023-12-28 16:32:49 +01:00
parent d15c25a855
commit 63e6a793dd
2 changed files with 4 additions and 9 deletions

View file

@ -96,11 +96,8 @@ void Hy3Layout::onWindowCreatedTiling(CWindow* window, eDirection) {
Hy3Node* opening_into;
Hy3Node* opening_after = nullptr;
int specialWorkspaceID = monitor->specialWorkspaceID;
int workspace_id = specialWorkspaceID ? specialWorkspaceID : monitor->activeWorkspace;
if (workspace_id != -1) {
auto* root = this->getWorkspaceRootGroup(workspace_id);
if (monitor->activeWorkspace != -1) {
auto* root = this->getWorkspaceRootGroup(monitor->activeWorkspace);
if (root != nullptr) {
opening_after = root->getFocusedNode();
@ -1433,7 +1430,7 @@ void Hy3Layout::applyNodeDataToWindow(Hy3Node* node, bool no_animation) {
);
}
if (!g_pCompositor->isWorkspaceSpecial(node->workspace_id) && monitor == nullptr) {
if (monitor == nullptr) {
hy3_log(
ERR,
"node {:x}'s workspace has no associated monitor, cannot apply node data",

View file

@ -9,9 +9,7 @@
int workspace_for_action() {
if (g_pLayoutManager->getCurrentLayout() != g_Hy3Layout.get()) return -1;
int specialWorkspaceID = g_pCompositor->m_pLastMonitor->specialWorkspaceID;
int workspace_id
= specialWorkspaceID ? specialWorkspaceID : g_pCompositor->m_pLastMonitor->activeWorkspace;
int workspace_id = g_pCompositor->m_pLastMonitor->activeWorkspace;
if (workspace_id == -1) return -1;
auto* workspace = g_pCompositor->getWorkspaceByID(workspace_id);