From 70daa07f2714cab45aa6e0e52f7676a594901dea Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 25 Mar 2021 17:19:11 +0200 Subject: [PATCH] Destroy output device globals with a delay When hot plugging outputs, we may hit the wl_global race condition. We need to delay the destruction of output device globals to prevent hitting that race condition. --- src/wayland/server/outputdevice_interface.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wayland/server/outputdevice_interface.cpp b/src/wayland/server/outputdevice_interface.cpp index 1b7f53836e..81829bb098 100644 --- a/src/wayland/server/outputdevice_interface.cpp +++ b/src/wayland/server/outputdevice_interface.cpp @@ -114,7 +114,10 @@ OutputDeviceInterface::OutputDeviceInterface(Display *display, QObject *parent) connect(this, &OutputDeviceInterface::colorCurvesChanged, this, [this] { d->updateColorCurves(); }); } -OutputDeviceInterface::~OutputDeviceInterface() = default; +OutputDeviceInterface::~OutputDeviceInterface() +{ + d->globalRemove(); +} QSize OutputDeviceInterface::pixelSize() const {