Use QPointer to monitor input method server connection.
Input method may crash and leave a dangling pointer. DBus interface may access the invalid pointer and crash kwin.
This commit is contained in:
parent
d66be7b99f
commit
7a270b5d78
2 changed files with 7 additions and 4 deletions
|
@ -206,6 +206,11 @@ KWaylandServer::ClientConnection *WaylandServer::xWaylandConnection() const
|
||||||
return m_xwaylandConnection;
|
return m_xwaylandConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KWaylandServer::ClientConnection *WaylandServer::inputMethodConnection() const
|
||||||
|
{
|
||||||
|
return m_inputMethodServerConnection;
|
||||||
|
}
|
||||||
|
|
||||||
void WaylandServer::registerShellClient(AbstractClient *client)
|
void WaylandServer::registerShellClient(AbstractClient *client)
|
||||||
{
|
{
|
||||||
if (client->isLockScreen()) {
|
if (client->isLockScreen()) {
|
||||||
|
|
|
@ -180,9 +180,7 @@ public:
|
||||||
void initWorkspace();
|
void initWorkspace();
|
||||||
|
|
||||||
KWaylandServer::ClientConnection *xWaylandConnection() const;
|
KWaylandServer::ClientConnection *xWaylandConnection() const;
|
||||||
KWaylandServer::ClientConnection *inputMethodConnection() const {
|
KWaylandServer::ClientConnection *inputMethodConnection() const;
|
||||||
return m_inputMethodServerConnection;
|
|
||||||
}
|
|
||||||
KWaylandServer::ClientConnection *screenLockerClientConnection() const {
|
KWaylandServer::ClientConnection *screenLockerClientConnection() const {
|
||||||
return m_screenLockerClientConnection;
|
return m_screenLockerClientConnection;
|
||||||
}
|
}
|
||||||
|
@ -266,7 +264,7 @@ private:
|
||||||
QSet<KWaylandServer::LinuxDmaBufV1ClientBuffer*> m_linuxDmabufBuffers;
|
QSet<KWaylandServer::LinuxDmaBufV1ClientBuffer*> m_linuxDmabufBuffers;
|
||||||
QPointer<KWaylandServer::ClientConnection> m_xwaylandConnection;
|
QPointer<KWaylandServer::ClientConnection> m_xwaylandConnection;
|
||||||
KWaylandServer::InputMethodV1Interface *m_inputMethod = nullptr;
|
KWaylandServer::InputMethodV1Interface *m_inputMethod = nullptr;
|
||||||
KWaylandServer::ClientConnection *m_inputMethodServerConnection = nullptr;
|
QPointer<KWaylandServer::ClientConnection> m_inputMethodServerConnection;
|
||||||
KWaylandServer::ClientConnection *m_screenLockerClientConnection = nullptr;
|
KWaylandServer::ClientConnection *m_screenLockerClientConnection = nullptr;
|
||||||
KWaylandServer::XdgForeignV2Interface *m_XdgForeign = nullptr;
|
KWaylandServer::XdgForeignV2Interface *m_XdgForeign = nullptr;
|
||||||
KWaylandServer::KeyStateInterface *m_keyState = nullptr;
|
KWaylandServer::KeyStateInterface *m_keyState = nullptr;
|
||||||
|
|
Loading…
Reference in a new issue