mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 22:49:48 +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;
|
||||
}
|
||||
|
||||
void CCompositor::deactivateAllWLRWorkspaces() {
|
||||
void CCompositor::deactivateAllWLRWorkspaces(wlr_ext_workspace_handle_v1* exclude) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ public:
|
|||
void moveWindowToTop(CWindow*);
|
||||
void cleanupWindows();
|
||||
CWindow* getWindowInDirection(CWindow*, char);
|
||||
void deactivateAllWLRWorkspaces();
|
||||
void deactivateAllWLRWorkspaces(wlr_ext_workspace_handle_v1* exclude = nullptr);
|
||||
CWindow* getNextWindowOnWorkspace(CWindow*);
|
||||
int getNextAvailableNamedWorkspace();
|
||||
bool isPointOnAnyMonitor(const Vector2D&);
|
||||
|
|
|
@ -113,7 +113,7 @@ void Events::listener_newOutput(wl_listener* listener, void* data) {
|
|||
|
||||
PNEWMONITOR->scale = monitorRule.scale;
|
||||
|
||||
g_pCompositor->deactivateAllWLRWorkspaces();
|
||||
g_pCompositor->deactivateAllWLRWorkspaces(PNEWWORKSPACE->m_pWlrHandle);
|
||||
wlr_ext_workspace_handle_v1_set_active(PNEWWORKSPACE->m_pWlrHandle, true);
|
||||
|
||||
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);
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ void CKeybindManager::changeworkspace(std::string args) {
|
|||
g_pCompositor->focusWindow(g_pCompositor->getFirstWindowOnWorkspace(workspaceToChangeTo));
|
||||
|
||||
// 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);
|
||||
|
||||
Debug::log(LOG, "Changed to workspace %i", workspaceToChangeTo);
|
||||
|
@ -247,7 +247,7 @@ void CKeybindManager::changeworkspace(std::string args) {
|
|||
g_pCompositor->fixXWaylandWindowsOnWorkspace(OLDWORKSPACE);
|
||||
|
||||
// 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);
|
||||
|
||||
// mark the monitor dirty
|
||||
|
|
Loading…
Reference in a new issue