mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 15:45:58 +01:00
send a 1 on unknown minimize event
This commit is contained in:
parent
5d35c0432b
commit
32381fe6c4
2 changed files with 7 additions and 5 deletions
|
@ -1035,7 +1035,10 @@ void Events::listener_requestMinimize(void* owner, void* data) {
|
||||||
} else {
|
} else {
|
||||||
const auto E = (wlr_foreign_toplevel_handle_v1_minimized_event*)data;
|
const auto E = (wlr_foreign_toplevel_handle_v1_minimized_event*)data;
|
||||||
|
|
||||||
|
if (E)
|
||||||
g_pEventManager->postEvent({"minimize", getFormat("%x,%i", PWINDOW, (int)E->minimized)});
|
g_pEventManager->postEvent({"minimize", getFormat("%x,%i", PWINDOW, (int)E->minimized)});
|
||||||
|
else
|
||||||
|
g_pEventManager->postEvent({"minimize", getFormat("%x,1", PWINDOW)});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1114,9 +1114,8 @@ void CKeybindManager::moveFocusTo(std::string args) {
|
||||||
|
|
||||||
void CKeybindManager::focusUrgentOrLast(std::string args) {
|
void CKeybindManager::focusUrgentOrLast(std::string args) {
|
||||||
const auto PWINDOWURGENT = g_pCompositor->getUrgentWindow();
|
const auto PWINDOWURGENT = g_pCompositor->getUrgentWindow();
|
||||||
const auto PWINDOWPREV = g_pCompositor->m_pLastWindow
|
const auto PWINDOWPREV = g_pCompositor->m_pLastWindow ? (g_pCompositor->m_vWindowFocusHistory.size() < 2 ? nullptr : g_pCompositor->m_vWindowFocusHistory[1]) :
|
||||||
? (g_pCompositor->m_vWindowFocusHistory.size() < 2 ? nullptr : g_pCompositor->m_vWindowFocusHistory[1])
|
(g_pCompositor->m_vWindowFocusHistory.empty() ? nullptr : g_pCompositor->m_vWindowFocusHistory[0]);
|
||||||
: (g_pCompositor->m_vWindowFocusHistory.empty() ? nullptr : g_pCompositor->m_vWindowFocusHistory[0]);
|
|
||||||
|
|
||||||
if (!PWINDOWURGENT && !PWINDOWPREV)
|
if (!PWINDOWURGENT && !PWINDOWPREV)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue