compositor: early return on no monitor (#12637)

getMonitorFromVector can return nullptr on empty m_monitors, as such is
the case when the compositor is going down and a surface exist. return
early in vectorToWindowUnified if that happends.
This commit is contained in:
Tom Englund 2025-12-12 13:47:56 +01:00 committed by GitHub
parent 8dfdcfb353
commit 69db0bcae6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -895,6 +895,9 @@ bool CCompositor::monitorExists(PHLMONITOR pMonitor) {
PHLWINDOW CCompositor::vectorToWindowUnified(const Vector2D& pos, uint8_t properties, PHLWINDOW pIgnoreWindow) { PHLWINDOW CCompositor::vectorToWindowUnified(const Vector2D& pos, uint8_t properties, PHLWINDOW pIgnoreWindow) {
const auto PMONITOR = getMonitorFromVector(pos); const auto PMONITOR = getMonitorFromVector(pos);
if (!PMONITOR)
return nullptr;
static auto PRESIZEONBORDER = CConfigValue<Hyprlang::INT>("general:resize_on_border"); static auto PRESIZEONBORDER = CConfigValue<Hyprlang::INT>("general:resize_on_border");
static auto PBORDERSIZE = CConfigValue<Hyprlang::INT>("general:border_size"); static auto PBORDERSIZE = CConfigValue<Hyprlang::INT>("general:border_size");
static auto PBORDERGRABEXTEND = CConfigValue<Hyprlang::INT>("general:extend_border_grab_area"); static auto PBORDERGRABEXTEND = CConfigValue<Hyprlang::INT>("general:extend_border_grab_area");