mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 01:05:59 +01:00
dispatchers: open special ws on active monitor instead of mouse monitor (#5330)
This commit is contained in:
parent
a17d7ba87b
commit
906e498144
1 changed files with 1 additions and 4 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue