mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 12:45:59 +01:00
deactivate exclusive
This commit is contained in:
parent
17bd1779ea
commit
51172129d7
5 changed files with 7 additions and 7 deletions
|
@ -703,9 +703,9 @@ CWindow* CCompositor::getWindowInDirection(CWindow* pWindow, char dir) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCompositor::deactivateAllWLRWorkspaces() {
|
void CCompositor::deactivateAllWLRWorkspaces(wlr_ext_workspace_handle_v1* exclude) {
|
||||||
for (auto& w : m_lWorkspaces) {
|
for (auto& w : m_lWorkspaces) {
|
||||||
if (w.m_pWlrHandle)
|
if (w.m_pWlrHandle && w.m_pWlrHandle != exclude)
|
||||||
wlr_ext_workspace_handle_v1_set_active(w.m_pWlrHandle, false);
|
wlr_ext_workspace_handle_v1_set_active(w.m_pWlrHandle, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ public:
|
||||||
void moveWindowToTop(CWindow*);
|
void moveWindowToTop(CWindow*);
|
||||||
void cleanupWindows();
|
void cleanupWindows();
|
||||||
CWindow* getWindowInDirection(CWindow*, char);
|
CWindow* getWindowInDirection(CWindow*, char);
|
||||||
void deactivateAllWLRWorkspaces();
|
void deactivateAllWLRWorkspaces(wlr_ext_workspace_handle_v1* exclude = nullptr);
|
||||||
CWindow* getNextWindowOnWorkspace(CWindow*);
|
CWindow* getNextWindowOnWorkspace(CWindow*);
|
||||||
int getNextAvailableNamedWorkspace();
|
int getNextAvailableNamedWorkspace();
|
||||||
bool isPointOnAnyMonitor(const Vector2D&);
|
bool isPointOnAnyMonitor(const Vector2D&);
|
||||||
|
|
|
@ -113,7 +113,7 @@ void Events::listener_newOutput(wl_listener* listener, void* data) {
|
||||||
|
|
||||||
PNEWMONITOR->scale = monitorRule.scale;
|
PNEWMONITOR->scale = monitorRule.scale;
|
||||||
|
|
||||||
g_pCompositor->deactivateAllWLRWorkspaces();
|
g_pCompositor->deactivateAllWLRWorkspaces(PNEWWORKSPACE->m_pWlrHandle);
|
||||||
wlr_ext_workspace_handle_v1_set_active(PNEWWORKSPACE->m_pWlrHandle, true);
|
wlr_ext_workspace_handle_v1_set_active(PNEWWORKSPACE->m_pWlrHandle, true);
|
||||||
|
|
||||||
if (!pMostHzMonitor || monitorRule.refreshRate > pMostHzMonitor->refreshRate)
|
if (!pMostHzMonitor || monitorRule.refreshRate > pMostHzMonitor->refreshRate)
|
||||||
|
|
|
@ -43,7 +43,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
||||||
wlr_ext_workspace_group_handle_v1_output_enter(PMONITOR->pWLRWorkspaceGroupHandle, PMONITOR->output);
|
wlr_ext_workspace_group_handle_v1_output_enter(PMONITOR->pWLRWorkspaceGroupHandle, PMONITOR->output);
|
||||||
|
|
||||||
// set active workspace and deactivate all other in wlr
|
// set active workspace and deactivate all other in wlr
|
||||||
g_pCompositor->deactivateAllWLRWorkspaces();
|
g_pCompositor->deactivateAllWLRWorkspaces(g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace)->m_pWlrHandle);
|
||||||
wlr_ext_workspace_handle_v1_set_active(g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace)->m_pWlrHandle, true);
|
wlr_ext_workspace_handle_v1_set_active(g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace)->m_pWlrHandle, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -214,7 +214,7 @@ void CKeybindManager::changeworkspace(std::string args) {
|
||||||
g_pCompositor->focusWindow(g_pCompositor->getFirstWindowOnWorkspace(workspaceToChangeTo));
|
g_pCompositor->focusWindow(g_pCompositor->getFirstWindowOnWorkspace(workspaceToChangeTo));
|
||||||
|
|
||||||
// set active and deactivate all other in wlr
|
// set active and deactivate all other in wlr
|
||||||
g_pCompositor->deactivateAllWLRWorkspaces();
|
g_pCompositor->deactivateAllWLRWorkspaces(g_pCompositor->getWorkspaceByID(workspaceToChangeTo)->m_pWlrHandle);
|
||||||
wlr_ext_workspace_handle_v1_set_active(g_pCompositor->getWorkspaceByID(workspaceToChangeTo)->m_pWlrHandle, true);
|
wlr_ext_workspace_handle_v1_set_active(g_pCompositor->getWorkspaceByID(workspaceToChangeTo)->m_pWlrHandle, true);
|
||||||
|
|
||||||
Debug::log(LOG, "Changed to workspace %i", workspaceToChangeTo);
|
Debug::log(LOG, "Changed to workspace %i", workspaceToChangeTo);
|
||||||
|
@ -247,7 +247,7 @@ void CKeybindManager::changeworkspace(std::string args) {
|
||||||
g_pCompositor->fixXWaylandWindowsOnWorkspace(OLDWORKSPACE);
|
g_pCompositor->fixXWaylandWindowsOnWorkspace(OLDWORKSPACE);
|
||||||
|
|
||||||
// set active and deactivate all other
|
// set active and deactivate all other
|
||||||
g_pCompositor->deactivateAllWLRWorkspaces();
|
g_pCompositor->deactivateAllWLRWorkspaces(PWORKSPACE->m_pWlrHandle);
|
||||||
wlr_ext_workspace_handle_v1_set_active(PWORKSPACE->m_pWlrHandle, true);
|
wlr_ext_workspace_handle_v1_set_active(PWORKSPACE->m_pWlrHandle, true);
|
||||||
|
|
||||||
// mark the monitor dirty
|
// mark the monitor dirty
|
||||||
|
|
Loading…
Reference in a new issue