mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-26 07:49:49 +01:00
Merge branch 'main' into hyprlang-migration
This commit is contained in:
commit
27370f3e07
5 changed files with 13 additions and 12 deletions
|
@ -2165,7 +2165,7 @@ void CCompositor::moveWorkspaceToMonitor(CWorkspace* pWorkspace, CMonitor* pMoni
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug::log(LOG, "moveWorkspaceToMonitor: Plugging gap with existing {}", nextWorkspaceOnMonitorID);
|
Debug::log(LOG, "moveWorkspaceToMonitor: Plugging gap with existing {}", nextWorkspaceOnMonitorID);
|
||||||
POLDMON->changeWorkspace(nextWorkspaceOnMonitorID);
|
POLDMON->changeWorkspace(nextWorkspaceOnMonitorID, false, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// move the workspace
|
// move the workspace
|
||||||
|
@ -2206,6 +2206,7 @@ void CCompositor::moveWorkspaceToMonitor(CWorkspace* pWorkspace, CMonitor* pMoni
|
||||||
if (const auto PWORKSPACE = getWorkspaceByID(pMonitor->activeWorkspace); PWORKSPACE)
|
if (const auto PWORKSPACE = getWorkspaceByID(pMonitor->activeWorkspace); PWORKSPACE)
|
||||||
getWorkspaceByID(pMonitor->activeWorkspace)->startAnim(false, false);
|
getWorkspaceByID(pMonitor->activeWorkspace)->startAnim(false, false);
|
||||||
|
|
||||||
|
setActiveMonitor(pMonitor);
|
||||||
pMonitor->activeWorkspace = pWorkspace->m_iID;
|
pMonitor->activeWorkspace = pWorkspace->m_iID;
|
||||||
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(pMonitor->ID);
|
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(pMonitor->ID);
|
||||||
|
|
||||||
|
|
|
@ -571,8 +571,8 @@ void CMonitor::changeWorkspace(CWorkspace* const pWorkspace, bool internal, bool
|
||||||
g_pCompositor->updateSuspendedStates();
|
g_pCompositor->updateSuspendedStates();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMonitor::changeWorkspace(const int& id, bool internal) {
|
void CMonitor::changeWorkspace(const int& id, bool internal, bool noMouseMove, bool noFocus) {
|
||||||
changeWorkspace(g_pCompositor->getWorkspaceByID(id), internal);
|
changeWorkspace(g_pCompositor->getWorkspaceByID(id), internal, noMouseMove, noFocus);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMonitor::setSpecialWorkspace(CWorkspace* const pWorkspace) {
|
void CMonitor::setSpecialWorkspace(CWorkspace* const pWorkspace) {
|
||||||
|
|
|
@ -142,7 +142,7 @@ class CMonitor {
|
||||||
bool isMirror();
|
bool isMirror();
|
||||||
float getDefaultScale();
|
float getDefaultScale();
|
||||||
void changeWorkspace(CWorkspace* const pWorkspace, bool internal = false, bool noMouseMove = false, bool noFocus = false);
|
void changeWorkspace(CWorkspace* const pWorkspace, bool internal = false, bool noMouseMove = false, bool noFocus = false);
|
||||||
void changeWorkspace(const int& id, bool internal = false);
|
void changeWorkspace(const int& id, bool internal = false, bool noMouseMove = false, bool noFocus = false);
|
||||||
void setSpecialWorkspace(CWorkspace* const pWorkspace);
|
void setSpecialWorkspace(CWorkspace* const pWorkspace);
|
||||||
void setSpecialWorkspace(const int& id);
|
void setSpecialWorkspace(const int& id);
|
||||||
void moveTo(const Vector2D& pos);
|
void moveTo(const Vector2D& pos);
|
||||||
|
|
|
@ -1466,14 +1466,18 @@ void CKeybindManager::exitHyprland(std::string argz) {
|
||||||
void CKeybindManager::moveCurrentWorkspaceToMonitor(std::string args) {
|
void CKeybindManager::moveCurrentWorkspaceToMonitor(std::string args) {
|
||||||
CMonitor* PMONITOR = g_pCompositor->getMonitorFromString(args);
|
CMonitor* PMONITOR = g_pCompositor->getMonitorFromString(args);
|
||||||
|
|
||||||
if (!PMONITOR)
|
if (!PMONITOR) {
|
||||||
|
Debug::log(ERR, "Ignoring moveCurrentWorkspaceToMonitor: monitor doesnt exist");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// get the current workspace
|
// get the current workspace
|
||||||
const auto PCURRENTWORKSPACE = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace);
|
const auto PCURRENTWORKSPACE = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace);
|
||||||
|
|
||||||
if (!PCURRENTWORKSPACE)
|
if (!PCURRENTWORKSPACE) {
|
||||||
|
Debug::log(ERR, "moveCurrentWorkspaceToMonitor invalid workspace!");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
g_pCompositor->moveWorkspaceToMonitor(PCURRENTWORKSPACE, PMONITOR);
|
g_pCompositor->moveWorkspaceToMonitor(PCURRENTWORKSPACE, PMONITOR);
|
||||||
}
|
}
|
||||||
|
|
|
@ -601,12 +601,8 @@ void CInputManager::processMouseDownNormal(wlr_pointer_button_event* e) {
|
||||||
const auto mouseCoords = g_pInputManager->getMouseCoordsInternal();
|
const auto mouseCoords = g_pInputManager->getMouseCoordsInternal();
|
||||||
const auto w = g_pCompositor->vectorToWindowUnified(mouseCoords, ALLOW_FLOATING | RESERVED_EXTENTS | INPUT_EXTENTS);
|
const auto w = g_pCompositor->vectorToWindowUnified(mouseCoords, ALLOW_FLOATING | RESERVED_EXTENTS | INPUT_EXTENTS);
|
||||||
|
|
||||||
if (w && !m_bLastFocusOnLS) {
|
if (w && !m_bLastFocusOnLS && w->checkInputOnDecos(INPUT_TYPE_BUTTON, mouseCoords, e))
|
||||||
if (g_pCompositor->m_pLastWindow != w && **PFOLLOWMOUSE != 3)
|
return;
|
||||||
g_pCompositor->focusWindow(w);
|
|
||||||
if (w->checkInputOnDecos(INPUT_TYPE_BUTTON, mouseCoords, e))
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// clicking on border triggers resize
|
// clicking on border triggers resize
|
||||||
// TODO detect click on LS properly
|
// TODO detect click on LS properly
|
||||||
|
|
Loading…
Reference in a new issue