Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
fix:crash in fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
DreamMaoMao committed Apr 15, 2024
1 parent df5558a commit 9d8fa51
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 7 additions & 0 deletions src/dispatchers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,9 @@ void dispatch_enteroverview(std::string arg)

}

// enable hook fullscreenActive funciton
g_hycov_pFullscreenActiveHook->hook();

//disable changeworkspace
if(g_hycov_disable_workspace_change) {
g_hycov_pChangeworkspaceHook->hook();
Expand Down Expand Up @@ -586,6 +589,10 @@ void dispatch_leaveoverview(std::string arg)

//mark has exited overview mode
g_hycov_isOverViewExiting = false;

// disable hook fullscreenActive funciton
g_hycov_pFullscreenActiveHook->unhook();

return;
}

Expand Down
6 changes: 1 addition & 5 deletions src/globaleventhook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,7 @@ static void hkFullscreenActive(std::string args) {
if (!pWindow)
return;

auto pNode = g_hycov_OvGridLayout->getNodeFromWindow(pWindow);

if (g_pCompositor->isWorkspaceSpecial(pNode->workspaceID))
if (pWindow->m_pWorkspace->m_bIsSpecialWorkspace)
return;

if (g_hycov_isOverView && want_auto_fullscren(pWindow) && !g_hycov_auto_fullscreen) {
Expand Down Expand Up @@ -428,6 +426,4 @@ void registerGlobalEventHook()
g_hycov_pOnKeyboardKeyHook->hook();
}

// enable hook fullscreenActive funciton
g_hycov_pFullscreenActiveHook->hook();
}

0 comments on commit 9d8fa51

Please sign in to comment.