wayland: Use correct signal to get notified when to destroy InputPanelV1Window

The window should be destroyed when the associated surface role is about
to be destroyed. QObject::destroyed is too late.
master
Vlad Zahorodnii 2 years ago
parent bffeae89c7
commit 82ef63a3d4

@ -39,7 +39,7 @@ InputPanelV1Window::InputPanelV1Window(InputPanelSurfaceV1Interface *panelSurfac
connect(panelSurface, &InputPanelSurfaceV1Interface::topLevel, this, &InputPanelV1Window::showTopLevel);
connect(panelSurface, &InputPanelSurfaceV1Interface::overlayPanel, this, &InputPanelV1Window::showOverlayPanel);
connect(panelSurface, &InputPanelSurfaceV1Interface::destroyed, this, &InputPanelV1Window::destroyWindow);
connect(panelSurface, &InputPanelSurfaceV1Interface::aboutToBeDestroyed, this, &InputPanelV1Window::destroyWindow);
connect(workspace(), &Workspace::outputsChanged, this, &InputPanelV1Window::reposition);

@ -347,6 +347,7 @@ InputPanelSurfaceV1Interface::InputPanelSurfaceV1Interface(SurfaceInterface *sur
InputPanelSurfaceV1Interface::~InputPanelSurfaceV1Interface()
{
Q_EMIT aboutToBeDestroyed();
}
class InputPanelV1InterfacePrivate : public QtWaylandServer::zwp_input_panel_v1

@ -139,6 +139,7 @@ public:
Q_SIGNALS:
void topLevel(OutputInterface *output, Position position);
void overlayPanel();
void aboutToBeDestroyed();
private:
InputPanelSurfaceV1Interface(SurfaceInterface *surface, quint32 id, QObject *parent);

Loading…
Cancel
Save