mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-03 05:31:59 -07:00
keybinds: Fix focus not moving along when moving workspace (#4660)
--------- Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
@@ -1459,14 +1459,18 @@ void CKeybindManager::exitHyprland(std::string argz) {
|
||||
void CKeybindManager::moveCurrentWorkspaceToMonitor(std::string args) {
|
||||
CMonitor* PMONITOR = g_pCompositor->getMonitorFromString(args);
|
||||
|
||||
if (!PMONITOR)
|
||||
if (!PMONITOR) {
|
||||
Debug::log(ERR, "Ignoring moveCurrentWorkspaceToMonitor: monitor doesnt exist");
|
||||
return;
|
||||
}
|
||||
|
||||
// get the current workspace
|
||||
const auto PCURRENTWORKSPACE = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace);
|
||||
|
||||
if (!PCURRENTWORKSPACE)
|
||||
if (!PCURRENTWORKSPACE) {
|
||||
Debug::log(ERR, "moveCurrentWorkspaceToMonitor invalid workspace!");
|
||||
return;
|
||||
}
|
||||
|
||||
g_pCompositor->moveWorkspaceToMonitor(PCURRENTWORKSPACE, PMONITOR);
|
||||
}
|
||||
|
Reference in New Issue
Block a user