diff options
author | Vaxry <[email protected]> | 2024-10-09 00:26:40 +0100 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-10-09 00:26:40 +0100 |
commit | bc299928ad5571300180eb8edb6742ed3bbf0282 (patch) | |
tree | 4b98fc9ff65e95a126c116e3ecc00618a259e90b /src/protocols/XDGOutput.cpp | |
parent | ac658500fbebe607f2db83f11c37f0a3a05ef734 (diff) | |
download | Hyprland-bc299928ad5571300180eb8edb6742ed3bbf0282.tar.gz Hyprland-bc299928ad5571300180eb8edb6742ed3bbf0282.zip |
output/xdg-output: avoid sending events to released globals
ref #6835
Diffstat (limited to 'src/protocols/XDGOutput.cpp')
-rw-r--r-- | src/protocols/XDGOutput.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/protocols/XDGOutput.cpp b/src/protocols/XDGOutput.cpp index 0cdadd43..0598e713 100644 --- a/src/protocols/XDGOutput.cpp +++ b/src/protocols/XDGOutput.cpp @@ -51,6 +51,8 @@ void CXDGOutputProtocol::onManagerGetXDGOutput(CZxdgOutputManagerV1* mgr, uint32 #endif pXDGOutput->client = CLIENT; + pXDGOutput->outputProto = OUTPUT->owner; + if (!pXDGOutput->resource->resource()) { m_vXDGOutputs.pop_back(); mgr->noMemory(); @@ -104,7 +106,7 @@ CXDGOutput::CXDGOutput(SP<CZxdgOutputV1> resource_, SP<CMonitor> monitor_) : mon void CXDGOutput::sendDetails() { static auto PXWLFORCESCALEZERO = CConfigValue<Hyprlang::INT>("xwayland:force_zero_scaling"); - if (!monitor) + if (!monitor || !outputProto || outputProto->isDefunct()) return; const auto POS = isXWayland ? monitor->vecXWaylandPosition : monitor->vecPosition; |