dispatchers: open special ws on active monitor instead of mouse monitor (#5330)

This commit is contained in:
thejch 2024-03-30 09:58:18 -07:00 committed by GitHub
parent a17d7ba87b
commit 906e498144
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1624,9 +1624,6 @@ void CKeybindManager::focusWorkspaceOnCurrentMonitor(std::string args) {
} }
void CKeybindManager::toggleSpecialWorkspace(std::string args) { void CKeybindManager::toggleSpecialWorkspace(std::string args) {
static auto PFOLLOWMOUSE = CConfigValue<Hyprlang::INT>("input:follow_mouse");
std::string workspaceName = ""; std::string workspaceName = "";
int workspaceID = getWorkspaceIDFromString("special:" + args, workspaceName); int workspaceID = getWorkspaceIDFromString("special:" + args, workspaceName);
@ -1636,7 +1633,7 @@ void CKeybindManager::toggleSpecialWorkspace(std::string args) {
} }
bool requestedWorkspaceIsAlreadyOpen = false; bool requestedWorkspaceIsAlreadyOpen = false;
const auto PMONITOR = *PFOLLOWMOUSE == 1 ? g_pCompositor->getMonitorFromCursor() : g_pCompositor->m_pLastMonitor; const auto PMONITOR = g_pCompositor->m_pLastMonitor;
int specialOpenOnMonitor = PMONITOR->specialWorkspaceID; int specialOpenOnMonitor = PMONITOR->specialWorkspaceID;
for (auto& m : g_pCompositor->m_vMonitors) { for (auto& m : g_pCompositor->m_vMonitors) {