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.
This commit is contained in:
parent
bffeae89c7
commit
82ef63a3d4
3 changed files with 3 additions and 1 deletions
|
@ -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…
Reference in a new issue