mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 02:05:58 +01:00
parent
3b657257ec
commit
ffacd2efd1
1 changed files with 7 additions and 0 deletions
|
@ -228,8 +228,15 @@ static std::string getWorkspaceData(CWorkspace* w, HyprCtl::eHyprCtlOutputFormat
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string activeWorkspaceRequest(HyprCtl::eHyprCtlOutputFormat format) {
|
std::string activeWorkspaceRequest(HyprCtl::eHyprCtlOutputFormat format) {
|
||||||
|
if (!g_pCompositor->m_pLastMonitor)
|
||||||
|
return "unsafe state";
|
||||||
|
|
||||||
std::string result = "";
|
std::string result = "";
|
||||||
auto w = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace);
|
auto w = g_pCompositor->getWorkspaceByID(g_pCompositor->m_pLastMonitor->activeWorkspace);
|
||||||
|
|
||||||
|
if (!w)
|
||||||
|
return "internal error";
|
||||||
|
|
||||||
return getWorkspaceData(w, format);
|
return getWorkspaceData(w, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue