Reset the wl_keyboard/wl_pointer resource pointers if destroyed
Change-Id: I8693f845817d2dd4b0e0b54352c374f6a0e643d3 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
This commit is contained in:
parent
208fec2757
commit
68e5d64a83
@ -164,6 +164,13 @@ void Keyboard::sendKey(uint32_t key, uint32_t state)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Keyboard::keyboard_destroy_resource(wl_keyboard::Resource *resource)
|
||||
{
|
||||
if (m_focusResource == resource)
|
||||
m_focusResource = 0;
|
||||
}
|
||||
|
||||
Pointer::Pointer(Compositor *compositor)
|
||||
: wl_pointer()
|
||||
, m_compositor(compositor)
|
||||
@ -210,4 +217,10 @@ void Pointer::sendButton(uint32_t button, uint32_t state)
|
||||
}
|
||||
}
|
||||
|
||||
void Pointer::pointer_destroy_resource(wl_pointer::Resource *resource)
|
||||
{
|
||||
if (m_focusResource == resource)
|
||||
m_focusResource = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -88,6 +88,9 @@ public:
|
||||
|
||||
void sendKey(uint32_t key, uint32_t state);
|
||||
|
||||
protected:
|
||||
void keyboard_destroy_resource(wl_keyboard::Resource *resource) Q_DECL_OVERRIDE;
|
||||
|
||||
private:
|
||||
Compositor *m_compositor;
|
||||
|
||||
@ -107,6 +110,9 @@ public:
|
||||
void sendMotion(const QPoint &pos);
|
||||
void sendButton(uint32_t button, uint32_t state);
|
||||
|
||||
protected:
|
||||
void pointer_destroy_resource(wl_pointer::Resource *resource) Q_DECL_OVERRIDE;
|
||||
|
||||
private:
|
||||
Compositor *m_compositor;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user