summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-12-30 11:46:46 +0100
committerLiang Qi <liang.qi@qt.io>2019-12-30 11:46:46 +0100
commit4b2376e850d5030f73fd9e8e03ebf07922e1361b (patch)
treea5fb941e9a3e7ade5b13cf1c8a949160151405dd
parent1190a44dda397d669ce2d489ef88ab76330eacb6 (diff)
parentce15889614f87b5986f997beffd2826471adfe51 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts: .qmake.conf src/client/configure.json Change-Id: I6afd4de5bcca36bebb7bfb479f8237a12e18dd5b
-rw-r--r--dist/changes-5.14.064
-rw-r--r--src/client/configure.json2
-rw-r--r--src/client/qwaylandinputdevice.cpp36
-rw-r--r--src/client/qwaylandinputdevice_p.h5
4 files changed, 102 insertions, 5 deletions
diff --git a/dist/changes-5.14.0 b/dist/changes-5.14.0
new file mode 100644
index 000000000..ed5de028a
--- /dev/null
+++ b/dist/changes-5.14.0
@@ -0,0 +1,64 @@
+Qt 5.14 introduces many new features and improvements as well as bugfixes
+over the 5.13.x series. For more details, refer to the online documentation
+included in this distribution. The documentation is also available online:
+
+https://doc.qt.io/qt-5/index.html
+
+The Qt version 5.14 series is binary compatible with the 5.13.x series.
+Applications compiled for 5.13 will continue to run with 5.14.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+ - Added Vulkan-based server buffer integration for
+ NVIDIA EGLStreams.
+ - [QTBUG-73822] Added protocol and Qt Quick image provider for sharing
+ textures in graphics memory between compositor and multiple clients.
+
+****************************************************************************
+* Compositor *
+****************************************************************************
+
+ - The compositor module is no longer available under the GPLv2 and LGPLv3
+ licenses, but is still available under GPLv3 and commercial licenses.
+ - Make QWaylandQuickShellIntegration public so that compositors can
+ provide their code to integrate shell surfaces with QtQuick.
+ - Added QWaylandXdgPopup::sendPopupDone, which will dismiss a popup.
+ - Added support for the idle-inhibit unstable v1 Wayland extension.
+ - The compositor module no longer depends on the client module.
+ - Added support for xdg-output unstable v1 Wayland extension.
+ - Fixed a bug where compositors would advertise support for numerous
+ wl_shm pixel formats and then blindly assume everything to be
+ ARGB32_Premultiplied.
+ - Fixed a crash when destroying WaylandSurfaces and WlShellSurfaces which
+ had not yet been initialized.
+ - The compositor API now works without OpenGL support.
+ - Added a floating point version of QWaylandSurface::inputRegionContains.
+
+****************************************************************************
+* QPA plugin *
+****************************************************************************
+
+ - Pixel delta is now set for mouse scrolling events if originating from an
+ appropriate device such as a touch pad (requires compositor support for
+ wl_seat version 5 or later).
+ - Added support for animated cursors.
+ - Added support for middle mouse pasting through the
+ primary-selection-unstable-v1 protocol.
+ - Expose default input device to clients through the QPA API.
+ - Fixed a 100 ms freeze that would occur if applications did not draw
+ after receiving a deliverUpdateRequest().
+ - Fixed a crash when showing a window with a hidden parent.
+ - Fixed several crashes when mixing Qt with other wayland code.
+ qtwaylandscanner generated types now have a fromObject function which
+ will return nullptr if the object isn't wrapped by the type.
+
diff --git a/src/client/configure.json b/src/client/configure.json
index 94a1531d7..7d4468240 100644
--- a/src/client/configure.json
+++ b/src/client/configure.json
@@ -149,7 +149,7 @@
"#endif"
]
},
- "use": "egl"
+ "use": "egl drm"
},
"vulkan-server-buffer": {
"label": "Vulkan Buffer Sharing",
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index d812918e7..3f0d61d6a 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -88,7 +88,7 @@ QWaylandInputDevice::Keyboard::Keyboard(QWaylandInputDevice *p)
// or the server didn't send an enter event first.
return;
}
- mRepeatTimer.setInterval(mRepeatRate);
+ mRepeatTimer.setInterval(1000 / mRepeatRate);
handleKey(mRepeatKey.time, QEvent::KeyRelease, mRepeatKey.key, mRepeatKey.modifiers,
mRepeatKey.code, mRepeatKey.nativeVirtualKey, mRepeatKey.nativeModifiers,
mRepeatKey.text, true);
@@ -143,6 +143,12 @@ QWaylandWindow *QWaylandInputDevice::Keyboard::focusWindow() const
QWaylandInputDevice::Pointer::Pointer(QWaylandInputDevice *seat)
: mParent(seat)
{
+#if QT_CONFIG(cursor)
+ mCursor.frameTimer.setSingleShot(true);
+ mCursor.frameTimer.callOnTimeout([&]() {
+ cursorTimerCallback();
+ });
+#endif
}
QWaylandInputDevice::Pointer::~Pointer()
@@ -224,7 +230,7 @@ public:
if (animated) {
m_frameCallback.reset(new WlCallback(frame(), [this](uint32_t time){
Q_UNUSED(time);
- m_pointer->updateCursor();
+ m_pointer->cursorFrameCallback();
}));
}
commit();
@@ -328,7 +334,8 @@ void QWaylandInputDevice::Pointer::updateCursor()
uint time = seat()->mCursor.animationTimer.elapsed();
if (struct ::wl_cursor *waylandCursor = mCursor.theme->cursor(shape)) {
- int frame = wl_cursor_frame(waylandCursor, time);
+ uint duration = 0;
+ int frame = wl_cursor_frame_and_duration(waylandCursor, time, &duration);
::wl_cursor_image *image = waylandCursor->images[frame];
struct wl_buffer *buffer = wl_cursor_image_get_buffer(image);
@@ -339,7 +346,12 @@ void QWaylandInputDevice::Pointer::updateCursor()
int bufferScale = mCursor.themeBufferScale;
QPoint hotspot = QPoint(image->hotspot_x, image->hotspot_y) / bufferScale;
QSize size = QSize(image->width, image->height) / bufferScale;
- bool animated = waylandCursor->image_count > 1 && image->delay > 0;
+ bool animated = duration > 0;
+ if (animated) {
+ mCursor.gotFrameCallback = false;
+ mCursor.gotTimerCallback = false;
+ mCursor.frameTimer.start(duration);
+ }
getOrCreateCursorSurface()->update(buffer, hotspot, size, bufferScale, animated);
return;
}
@@ -354,6 +366,22 @@ CursorSurface *QWaylandInputDevice::Pointer::getOrCreateCursorSurface()
return mCursor.surface.get();
}
+void QWaylandInputDevice::Pointer::cursorTimerCallback()
+{
+ mCursor.gotTimerCallback = true;
+ if (mCursor.gotFrameCallback) {
+ updateCursor();
+ }
+}
+
+void QWaylandInputDevice::Pointer::cursorFrameCallback()
+{
+ mCursor.gotFrameCallback = true;
+ if (mCursor.gotTimerCallback) {
+ updateCursor();
+ }
+}
+
#endif // QT_CONFIG(cursor)
QWaylandInputDevice::Touch::Touch(QWaylandInputDevice *p)
diff --git a/src/client/qwaylandinputdevice_p.h b/src/client/qwaylandinputdevice_p.h
index 60d6f2c17..a567c57b4 100644
--- a/src/client/qwaylandinputdevice_p.h
+++ b/src/client/qwaylandinputdevice_p.h
@@ -286,6 +286,8 @@ public:
int idealCursorScale() const;
void updateCursorTheme();
void updateCursor();
+ void cursorTimerCallback();
+ void cursorFrameCallback();
CursorSurface *getOrCreateCursorSurface();
#endif
QWaylandInputDevice *seat() const { return mParent; }
@@ -325,6 +327,9 @@ public:
QWaylandCursorTheme *theme = nullptr;
int themeBufferScale = 0;
QScopedPointer<CursorSurface> surface;
+ QTimer frameTimer;
+ bool gotFrameCallback = false;
+ bool gotTimerCallback = false;
} mCursor;
#endif
QPointF mSurfacePos;