mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 21:45:59 +01:00
workspace: fix missing name via focusworkspaceoncurrentmonitor (#8484)
This commit is contained in:
parent
ace7ece4f2
commit
38b6f3babb
1 changed files with 2 additions and 2 deletions
|
@ -1849,7 +1849,7 @@ SDispatchResult CKeybindManager::moveWorkspaceToMonitor(std::string args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
SDispatchResult CKeybindManager::focusWorkspaceOnCurrentMonitor(std::string args) {
|
SDispatchResult CKeybindManager::focusWorkspaceOnCurrentMonitor(std::string args) {
|
||||||
auto workspaceID = getWorkspaceIDNameFromString(args).id;
|
auto [workspaceID, workspaceName] = getWorkspaceIDNameFromString(args);
|
||||||
if (workspaceID == WORKSPACE_INVALID) {
|
if (workspaceID == WORKSPACE_INVALID) {
|
||||||
Debug::log(ERR, "focusWorkspaceOnCurrentMonitor invalid workspace!");
|
Debug::log(ERR, "focusWorkspaceOnCurrentMonitor invalid workspace!");
|
||||||
return {.success = false, .error = "focusWorkspaceOnCurrentMonitor invalid workspace!"};
|
return {.success = false, .error = "focusWorkspaceOnCurrentMonitor invalid workspace!"};
|
||||||
|
@ -1865,7 +1865,7 @@ SDispatchResult CKeybindManager::focusWorkspaceOnCurrentMonitor(std::string args
|
||||||
auto pWorkspace = g_pCompositor->getWorkspaceByID(workspaceID);
|
auto pWorkspace = g_pCompositor->getWorkspaceByID(workspaceID);
|
||||||
|
|
||||||
if (!pWorkspace) {
|
if (!pWorkspace) {
|
||||||
pWorkspace = g_pCompositor->createNewWorkspace(workspaceID, PCURRMONITOR->ID);
|
pWorkspace = g_pCompositor->createNewWorkspace(workspaceID, PCURRMONITOR->ID, workspaceName);
|
||||||
// we can skip the moving, since it's already on the current monitor
|
// we can skip the moving, since it's already on the current monitor
|
||||||
changeworkspace(pWorkspace->getConfigName());
|
changeworkspace(pWorkspace->getConfigName());
|
||||||
return {};
|
return {};
|
||||||
|
|
Loading…
Reference in a new issue