client: Correct argument name in input events
Input events sometimes carry serials or times, sometimes both, depending on the event. The code has drifted from the spec. In the worst case we are setting a serial as a timestamp which is very wrong. Change-Id: I82397e06a432de79ef71475882673da4568743ca Reviewed-by: David Redondo <qt@david-redondo.de>
This commit is contained in:
parent
7062695de7
commit
c82535143a
@ -735,12 +735,12 @@ public:
|
||||
{}
|
||||
};
|
||||
|
||||
void QWaylandInputDevice::Pointer::pointer_leave(uint32_t time, struct wl_surface *surface)
|
||||
void QWaylandInputDevice::Pointer::pointer_leave(uint32_t serial, struct wl_surface *surface)
|
||||
{
|
||||
invalidateFocus();
|
||||
mButtons = Qt::NoButton;
|
||||
|
||||
mParent->mTime = time;
|
||||
mParent->mSerial = serial;
|
||||
|
||||
// The event may arrive after destroying the window, indicated by
|
||||
// a null surface.
|
||||
@ -1266,9 +1266,9 @@ void QWaylandInputDevice::Keyboard::keyboard_keymap(uint32_t format, int32_t fd,
|
||||
#endif
|
||||
}
|
||||
|
||||
void QWaylandInputDevice::Keyboard::keyboard_enter(uint32_t time, struct wl_surface *surface, struct wl_array *keys)
|
||||
void QWaylandInputDevice::Keyboard::keyboard_enter(uint32_t serial, struct wl_surface *surface, struct wl_array *keys)
|
||||
{
|
||||
Q_UNUSED(time);
|
||||
Q_UNUSED(serial);
|
||||
Q_UNUSED(keys);
|
||||
|
||||
if (!surface) {
|
||||
@ -1292,9 +1292,9 @@ void QWaylandInputDevice::Keyboard::keyboard_enter(uint32_t time, struct wl_surf
|
||||
mParent->mQDisplay->handleKeyboardFocusChanged(mParent);
|
||||
}
|
||||
|
||||
void QWaylandInputDevice::Keyboard::keyboard_leave(uint32_t time, struct wl_surface *surface)
|
||||
void QWaylandInputDevice::Keyboard::keyboard_leave(uint32_t serial, struct wl_surface *surface)
|
||||
{
|
||||
Q_UNUSED(time);
|
||||
Q_UNUSED(serial);
|
||||
|
||||
if (!surface) {
|
||||
// Either a compositor bug, or a race condition with wl_surface.destroy, ignore the event.
|
||||
|
Loading…
x
Reference in New Issue
Block a user