mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-29 20:05:59 +01:00
keybinds: handle null monitor in pinActive (#7122)
This commit is contained in:
parent
3b9b5346b8
commit
8a5f9bbb39
1 changed files with 10 additions and 2 deletions
|
@ -2334,7 +2334,15 @@ void CKeybindManager::pinActive(std::string args) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PWINDOW->m_bPinned = !PWINDOW->m_bPinned;
|
PWINDOW->m_bPinned = !PWINDOW->m_bPinned;
|
||||||
PWINDOW->m_pWorkspace = g_pCompositor->getMonitorFromID(PWINDOW->m_iMonitorID)->activeWorkspace;
|
|
||||||
|
const auto PMONITOR = g_pCompositor->getMonitorFromID(PWINDOW->m_iMonitorID);
|
||||||
|
|
||||||
|
if (!PMONITOR) {
|
||||||
|
Debug::log(ERR, "pin: monitor not found");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
PWINDOW->m_pWorkspace = PMONITOR->activeWorkspace;
|
||||||
|
|
||||||
PWINDOW->updateDynamicRules();
|
PWINDOW->updateDynamicRules();
|
||||||
g_pCompositor->updateWindowAnimatedDecorationValues(PWINDOW);
|
g_pCompositor->updateWindowAnimatedDecorationValues(PWINDOW);
|
||||||
|
|
Loading…
Reference in a new issue