mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-14 07:45:57 +01:00
stuff
This commit is contained in:
parent
13af7fb2fb
commit
8ae38c1e1e
4 changed files with 6 additions and 9 deletions
|
@ -89,7 +89,6 @@ class CCompositor {
|
||||||
bool m_bUnsafeState = false; // unsafe state is when there is no monitors.
|
bool m_bUnsafeState = false; // unsafe state is when there is no monitors.
|
||||||
bool m_bNextIsUnsafe = false;
|
bool m_bNextIsUnsafe = false;
|
||||||
CMonitor* m_pUnsafeOutput = nullptr; // fallback output for the unsafe state
|
CMonitor* m_pUnsafeOutput = nullptr; // fallback output for the unsafe state
|
||||||
bool m_bExitTriggered = false; // For exit dispatcher
|
|
||||||
bool m_bIsShuttingDown = false;
|
bool m_bIsShuttingDown = false;
|
||||||
|
|
||||||
// ------------------------------------------------- //
|
// ------------------------------------------------- //
|
||||||
|
|
|
@ -17,13 +17,6 @@
|
||||||
// --------------------------------------------------------- //
|
// --------------------------------------------------------- //
|
||||||
|
|
||||||
void Events::listener_monitorFrame(void* owner, void* data) {
|
void Events::listener_monitorFrame(void* owner, void* data) {
|
||||||
if (g_pCompositor->m_bExitTriggered) {
|
|
||||||
// Only signal cleanup once
|
|
||||||
g_pCompositor->m_bExitTriggered = false;
|
|
||||||
g_pCompositor->cleanup();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
CMonitor* const PMONITOR = (CMonitor*)owner;
|
CMonitor* const PMONITOR = (CMonitor*)owner;
|
||||||
|
|
||||||
if ((g_pCompositor->m_pAqBackend->hasSession() && !g_pCompositor->m_pAqBackend->session->active) || !g_pCompositor->m_bSessionActive || g_pCompositor->m_bUnsafeState) {
|
if ((g_pCompositor->m_pAqBackend->hasSession() && !g_pCompositor->m_pAqBackend->session->active) || !g_pCompositor->m_bSessionActive || g_pCompositor->m_bUnsafeState) {
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "PointerManager.hpp"
|
#include "PointerManager.hpp"
|
||||||
#include "Compositor.hpp"
|
#include "Compositor.hpp"
|
||||||
#include "TokenManager.hpp"
|
#include "TokenManager.hpp"
|
||||||
|
#include "eventLoop/EventLoopManager.hpp"
|
||||||
#include "debug/Log.hpp"
|
#include "debug/Log.hpp"
|
||||||
#include "helpers/varlist/VarList.hpp"
|
#include "helpers/varlist/VarList.hpp"
|
||||||
|
|
||||||
|
@ -1661,7 +1662,7 @@ void CKeybindManager::renameWorkspace(std::string args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CKeybindManager::exitHyprland(std::string argz) {
|
void CKeybindManager::exitHyprland(std::string argz) {
|
||||||
g_pCompositor->m_bExitTriggered = true;
|
g_pEventLoopManager->doLater([]() { g_pCompositor->cleanup(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void CKeybindManager::moveCurrentWorkspaceToMonitor(std::string args) {
|
void CKeybindManager::moveCurrentWorkspaceToMonitor(std::string args) {
|
||||||
|
|
|
@ -1191,6 +1191,8 @@ static void removeFromHIDs(WP<IHID> hid) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInputManager::destroyKeyboard(SP<IKeyboard> pKeyboard) {
|
void CInputManager::destroyKeyboard(SP<IKeyboard> pKeyboard) {
|
||||||
|
Debug::log(LOG, "Keyboard at {:x} removed", (uintptr_t)pKeyboard.get());
|
||||||
|
|
||||||
std::erase_if(m_vKeyboards, [pKeyboard](const auto& other) { return other == pKeyboard; });
|
std::erase_if(m_vKeyboards, [pKeyboard](const auto& other) { return other == pKeyboard; });
|
||||||
|
|
||||||
if (m_vKeyboards.size() > 0) {
|
if (m_vKeyboards.size() > 0) {
|
||||||
|
@ -1213,6 +1215,8 @@ void CInputManager::destroyKeyboard(SP<IKeyboard> pKeyboard) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInputManager::destroyPointer(SP<IPointer> mouse) {
|
void CInputManager::destroyPointer(SP<IPointer> mouse) {
|
||||||
|
Debug::log(LOG, "Pointer at {:x} removed", (uintptr_t)mouse.get());
|
||||||
|
|
||||||
std::erase_if(m_vPointers, [mouse](const auto& other) { return other == mouse; });
|
std::erase_if(m_vPointers, [mouse](const auto& other) { return other == mouse; });
|
||||||
|
|
||||||
g_pSeatManager->setMouse(m_vPointers.size() > 0 ? m_vPointers.front() : nullptr);
|
g_pSeatManager->setMouse(m_vPointers.size() > 0 ? m_vPointers.front() : nullptr);
|
||||||
|
|
Loading…
Reference in a new issue