mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 16:25:58 +01:00
Fix missing focusedmon event on focusmonitor dispatcher
This commit is contained in:
parent
d0e47d9fe0
commit
653b9ed0e4
1 changed files with 5 additions and 1 deletions
|
@ -722,6 +722,10 @@ void CKeybindManager::changeworkspace(std::string args) {
|
||||||
if (anotherMonitor) {
|
if (anotherMonitor) {
|
||||||
Vector2D middle = PMONITOR->vecPosition + PMONITOR->vecSize / 2.f;
|
Vector2D middle = PMONITOR->vecPosition + PMONITOR->vecSize / 2.f;
|
||||||
g_pCompositor->warpCursorTo(middle);
|
g_pCompositor->warpCursorTo(middle);
|
||||||
|
|
||||||
|
// event for focusedmon, as we changed.
|
||||||
|
g_pEventManager->postEvent(SHyprIPCEvent{"focusedmon", PMONITOR->szName + "," + PWORKSPACETOCHANGETO->m_szName});
|
||||||
|
g_pCompositor->m_pLastMonitor = PMONITOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set active and deactivate all other in wlr
|
// set active and deactivate all other in wlr
|
||||||
|
@ -1135,7 +1139,7 @@ void CKeybindManager::alterSplitRatio(std::string args) {
|
||||||
void CKeybindManager::focusMonitor(std::string arg) {
|
void CKeybindManager::focusMonitor(std::string arg) {
|
||||||
const auto PMONITOR = g_pCompositor->getMonitorFromString(arg);
|
const auto PMONITOR = g_pCompositor->getMonitorFromString(arg);
|
||||||
|
|
||||||
if (!PMONITOR)
|
if (!PMONITOR || PMONITOR == g_pCompositor->m_pLastMonitor)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
changeworkspace("[internal]" + std::to_string(PMONITOR->activeWorkspace));
|
changeworkspace("[internal]" + std::to_string(PMONITOR->activeWorkspace));
|
||||||
|
|
Loading…
Reference in a new issue