| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Change-Id: Ie236fa47c23456b15414c3b3e89568b915979ebe
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, we set the max length in QString character length, which means
UTF-16 characters (of potentially three bytes) counts as one character. The max
limit of libwayland, however, is in bytes (and the string itself is converted
to UTF-8).
Fix it by dividing the character limit by three because in the worst case each
UTF-16 character will use three bytes when UTF-8 encoded.
Fixes: QTBUG-78478
Change-Id: Idf4721894e0fe6f3cd92bdc6ada7b0ea4199ea63
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Effectively is a copy of the code in XCB. When the menu key is pressed,
a context menu event should be generated at the current cursor position.
The global position in the event isn't truly global as that doesn't
exist in wayland but should match client expectations.
Change-Id: Ib814883aba632ca5eec58730846e1762b680467f
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/client/qwaylanddatadevice.cpp
src/client/qwaylandinputcontext.cpp
src/client/qwaylandinputdevice.cpp
src/client/qwaylandwindow.cpp
src/compositor/compositor_api/compositor_api.pri
src/compositor/compositor_api/qwaylandquickitem.cpp
Change-Id: Ice0d8c7d869c9c46113d6ee6ba3adf895a71d58f
|
| |
| |
| |
| |
| |
| |
| |
| | |
Since xcomposite-egl depends on the egl_x11 feature in qtbase, then this
should be explicit.
Change-Id: Ic1dce9526fb50f6f56e18abd58b69bcaed6d204e
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Touch now accounts for fractional input in the same way as for pointer
input.
Task-number: QTBUG-77457
Change-Id: I18e633bf7c7033187a641f757b8b24f52479971a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |\ |
|
| | |\
| | | |
| | | |
| | | | |
Change-Id: I5d587b79b96d2b44f1975419a658c259c63fa30d
|
| | | |\
| | | | |
| | | | |
| | | | | |
Change-Id: Ic73262146f51a9e7f4ffab46511654ad70c4f514
|
| | | | |\
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Conflicts:
src/client/qwaylandwindow.cpp
Change-Id: I89fefe5bfc247eeaad3981850efa0faaab3cb145
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The wl_surface can be destroyed whilst a render is happening. Calling
wl_surface::frame after the window is reset can crash as wl_surface is
null.
Fixes: QTBUG-77747
Change-Id: I139a9b234cb6acba81d6c1d5fa58629904a25053
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Calling the QOpenGLContext::swapBuffers from
QGuiApplicationPrivate::processExposeEvent in some cases leads to
recursive calls of QWaylandWindow::waitForFrameSync. Since the
mWaitingForFrameCallback check in WaylandWindow::waitForFrameSync
is performed after the mutex is locked, the QMutexLocker tries to lock the
mFrameSyncMutex mutex in every recursive call, that leads to a deadlock.
This patch moves the performing of the mWaitingForFrameCallback check
before locking the mutex.
Change-Id: Ia2d834b7dd03fcd91bbe29a3a897b4db2d155527
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Rename mTouchPoints to mPendingTouchPoints, to clarify that they're the
accumulated state so far, which will be applied with the wl_touch.frame
event. QWaylandInputDevice::Touch::mPrevTouchPoints is no longer needed
and has been removed.
Fixes the following issues with the old approach:
- touchPointsReleased() only checked mTouchPoints, which was cleared on
touch_frame and populated again on touch_motion and touch_down, which
meant that it could return true even though there were still touch
points left. Leading to the workaround for missing wl_touch.frame events
on Weston being triggered to often.
- Touch focus was cleared on any wl_touch.up event, not just the last
one.
- The order of the touch events was not stable and relied on the order
of the events (QTBUG-77014).
Fixes: QTBUG-77014
Change-Id: Ic3ecdc87e77b0e0276afefd127ad2b965142cbd4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| | | | |/
| | | |/|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
af00b801 fixed a crash when starting a drag without a valid focus, but
there is still a problem, because QDrag::exec will never return because
it's waiting indefinitely in an event loop.
- QWaylandDataDevice::startDrag can now fail by returning false.
- When starting a drag fails, we cancel the drag through
QWaylandDrag::cancelDrag wrapped in invokeMethod.
- Also, don't unnecessarily create a data_source if we cannot start a
drag.
[ChangeLog][QPA plugin] Fixed a freeze that happened when starting a
drag-and-drop operation without a valid source surface.
Change-Id: Iea19b0c92c196a44d1274a966bee4ff519632d34
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
From the docs of repeat_info:
"A rate of zero will disable any repeating (regardless of the value of
delay)."
Avoiding starting the initial timer effectively disables everything
Change-Id: I7489f61b2bc0e000efddb4255f1968072eeff2b8
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
set_cursor_rectangle takes wl_surface coordinates, but we sent window
coordinates.
Fixes: QTBUG-77987
Change-Id: Ia0bf98f9749723128bec27c3c607d1ccde2d5fd3
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
src/client/qwaylandinputdevice.cpp
src/client/qwaylandwindow.cpp
Change-Id: Ifd64debc484197829d2fe412afa98c29b382efa5
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
src/client/qwaylandinputdevice.cpp
src/client/qwaylandintegration.cpp
src/client/qwaylandwindow_p.h
src/shared/qwaylandxkb.cpp
Change-Id: Ibac7998502351e93c71c9b786536298657afe3d0
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Qt applications should not call exit.
Task-number: QTBUG-75779
Change-Id: I91190b10f8c8e111996cd73283061e6ceaa6b1f6
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This race happened because QWaylandIntegration::clientBufferIntegration (which
lazily initializes the integration) was called from numerous places including
code that may run on different threads without any kind of syncrhonization.
An example of this is Qt3D, which indirectly and simultaneously calls
createPlatformWindow (from the GUI thread) and createPlatformOpenGLContext
(from its render thread), both of which needs to use the client buffer
integration.
In this patch, we fix it by first checking if the integration is initialized.
In that case, it's safe to use it. Otherwise we lock a mutex, re-check if
initialization has happened on another thread in the meantime, and then finally
we initialize it.
This way we should avoid the expense of mutex locking after initialization is
complete, while still staying race free during initialization.
Fixes: QTBUG-76504
Change-Id: I327840ebf41e014882cb659bc3e4fafb7bdb7a98
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Recent changes in QtBase means QtWayland will have to follow the convention of
the rest of the QPA plugins and have QPlatformSurfaceEvent::SurfaceCreated and
SurfaceAboutToBeDestroyed follow the QPlatformWindow (QWaylandWindow) lifetime
and not the lifetime of wl_surface.
Some users were depending on those events to get notified about wl_surface
changes and used QPlatformNativeInterface in order to get the window's
underlying wl_surfaces in responses to the events.
The good news is that QPlatformNativeInterface is private (QPA) API, so we can
provide an alternative by exposing new private API, which is what this patch
does.
The QWaylandWindow::wlSurfaceDestroyed signal already exists in the dev branch
(introduced in eb66211ea9), so this is a backport of that signal as well as an
addition of a new QWaylandWindow::wlSurfaceCreated signal.
Task-number: QTBUG-76324
Change-Id: Ibc5748474cd52f5b9461fd1ad6cef973491174b1
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With the non-blocking file opening, when no data was available in the
pipe, read could return 0 even though we were not at the end of the
file. This resulted in truncated data when pasting the clipboard.
This patch uses select to block until a file is available, removing the
polling sleep. This means the file can be safely opened in blocking mode
whilst keeping the timeout feature allowing read to work as intended.
Change-Id: I936aa85e9f25197e7abe6fb3fa729b618c00924d
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Makes the scanner produce generated static functions such as
QtWaylandClient::wl_surface *wl_surface::fromObject(struct ::wl_surface *object);
Which casts from the wayland-scanner generated types, such as struct ::wl_surface *,
to types types generated by qtwaylandscanner, but performs a check to see if
the listener is set to the wrapper class first (at least for interfaces with events).
This lets us easily fix crashes in a couple of places where we receive events
with wayland objects that we didn't create.
Also adds nullptr checks whenever we use the fromWlSurface() and fromWlOutput()
functions to handle failed conversions.
Task-number: QTBUG-73801
Fixes: QTBUG-74085
Change-Id: I9f33c31c7d1a939ccb3ebbbcb0eb67af10037237
Reviewed-by: Jaroslaw Kubik <jarek@froglogic.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
(cherry picked from commit 3eea45e31ef796ab6f1363f8fd2882c151becc20)
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When wl_pointer version 5 was implemented, we added a raw QWaylandWindow
pointer in QWaylandPointerEvent. This is a problem, because the events
are stored, and the window may be deleted in the meantime.
This manifested itself as flakiness in tst_xdgshell::popup() which is
now fixed.
Fixes: QTBUG-77976
Change-Id: If34eee0286d5a63734535d67503378516d5768c3
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Gets rid of warning about disconnecting null objects on application
exit.
Change-Id: Ie96d4321dfab113622d7059f6849acf15715dfa2
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Expose the whole default input device to clients.
[ChangeLog][QPA plugin] Expose default input device to clients
through the QPA API.
Change-Id: I2608178f8b0ac09f766434588a280bcc2b30627d
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|\| |
| | |
| | |
| | | |
Change-Id: Ief5f30fc1dbd0e6531b19e723057b06e9bd419b4
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/compositor/configure.json
sync.profile
tests/auto/auto.pro
Change-Id: Ia6d1512aa9ad49ac7f92ae88f23026dc0ee2ccc5
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit backports the Vulkan server buffer and texture sharing code
from Qt 5.14 to Qt 5.12 as an opt-in feature. To enable, configure with
"-feature-wayland-client-texture-sharing-experimental
-feature-wayland-compositor-texture-sharing-experimental"
Contains code from the following commits:
Add server buffer integration based on Vulkan
(commit df3a1761af2f20d59ae09a7adaa2f5b959047687)
Compressed texture support for vulkan server buffers
(commit f710489a341713c675cfd91d22ccd7bf8f29f4dd)
Implement server-side toOpenGlTexture for Vulkan
(commit 19361e7259f04b08925b1e8e99faf9460770ee7b)
New texture sharing protocol and infrastructure
(commit 80001cbf0451f4ba2a971fb20b80dc8e25ac604d)
Change-Id: I6c36ef7fddcd4db39e80d03a822d89f15eae3434
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For shells that do not send configure events when exposed:
If setGeometry() was called before the window was initialized, Qt would
not mark the window as mapped, and the window would never become
visible.
Change-Id: Ic933cbbff20702424129c11264215181330cc7d1
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/client/qwaylandinputdevice.cpp
Change-Id: I20fb102162351b714855258175ed00437e55f072
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I0a193ceaa1549c08acad02b59db62ae313d6b334
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Correct a typo introduced with 0761173a.
Change-Id: I5c101e015c0fbd7de03d26ff3f8629418f070db2
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|\| |
| | |
| | |
| | | |
Change-Id: I64c1a5cabcdad4177aeac35bcd45a4cde8f60165
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With 0761173a, Linux SPI Accessibility bridge was added to
the Wayland QPA plugin, but this had a bad side-effect to
QtWaylandClient.
Linux Accessibility support is a private module, this means we have
to link to it with QT_PRIVATE not QT, otherwise CMake and pkg-config
files for Qt5WaylandClient will depend on it.
Change-Id: I6182267f97adc2cd5bd66895df148a6a45614f45
Fixes: QTBUG-76042
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The content of the QMultiMap cursorNameMaps is static, so using a
dynamic container is overkill.
Replace the map by a (sorted) C array of struct {Key, Value}, and use
std::equal_range to find matching cursors. This also avoids the
creation of a QList on each call (due to the use of QMap:values()
instead of QMap::equal_range), as well as the creation of QByteArrays,
which the underlying wayland C API doesn't know about, anyway.
The entries were already sorted, so the initializer_list stays the
same. Add an assert that the list is ordered.
Since this is library code, don't use the attractive struct {
WaylandCursor, const char *name }, as that causes relocations that
delay the loading of the shared object, and make sharing of the data
between processes impossible. This wastes some memory, due to all the
NUL padding up to the common maximum, and the next alignment step, but
can be optimized later when someone writes a C++-only version of
Q_STRINGTABLE.
Even so, this saves 10.5KiB in text size on optimized AMD64 Linux GCC
9.1 builds.
Change-Id: I19fa1742e2fcaf9de74af1e5908e796b0588d507
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|\| |
| | |
| | |
| | | |
Change-Id: Id4304c7244dd1580d5bb18451e3dda5dabe6bcb3
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
.qmake.conf
Change-Id: I436405677453e7df43258363c0d5c88d7b3790d0
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Implicit capture of 'this' in [=] is deprecated in C++20.
Fix by using explicit captures.
Change-Id: Ie3a94ec60d7c56b2856d201fa3d68d0670bdd7b9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If we hide a window whilst a compositor has a pending frame to show,
it's possible the compositor will not render the frame and not return
the callback.
If this happens on the next window expose we can be left with
mFrameCallbackTimedOut still true causing isExposed() to remain false
and us to not send the next buffer when we later show the window again.
Change-Id: I507410415d1a930fd5fa736412055e68fdf6c1d3
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When we did invokeMethod for handling the frame callbacks, we had to wait for
the GUI thread to finish whatever it's doing before we would stop blocking.
Fix it by clearing the frame callback timer and stop blocking immediately,
while delaying the rest of the work until it can be run on the other thread.
Fixes: QTBUG-76397
Change-Id: I343e4feac4838926b4fa2ccac2948988bc6c3bb7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
...and mark the module QLinkedList-free.
QLinkedList is going to be deprecated.
Change-Id: Ieb9efef24cd8677edc1262f22b7c6d41b6376347
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
.qmake.conf
src/client/qwaylanddatadevice.cpp
Change-Id: I1cc8640b68eba5dfb560749dfe679741ee62e6ad
|
| |\ \
| | | |
| | | |
| | | | |
Change-Id: I3b0e0899cfcd738ddf45b4211f86e1079d6e4988
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Neither Qt::ToolTip nor Qt::Popup are single bits in Qt::WindowFlags, and do in
fact include Qt::Window. This meant that when we or'ed them and did a bitwise
and with QWindow::type(), we would match more types than just Qt::Popup and
Qt::ToolTip. We would for instance get any Qt::Window as well, which meant the
main window would be added to activePopups, leading to strange things
happening, such as crashes and the main window closing unexpectedly.
[ChangeLog][QPA plugin] Fixed a crash when closing multiple popups at once.
Fixes: QTBUG-76124
Change-Id: I1a6a59e161a436604a7ac8ab824396481dc99a20
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
(cherry picked from commit af9ec8a76d7e62444fadb518256fc58723fe5186)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes: QTBUG-75920
Change-Id: I29d84b487afb2a90b8a633abce2fcc39ca75adae
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
| |\ \ \
| | | |/
| | |/|
| | | | |
Change-Id: I3b4132c4824a5312e7af0ca5659bd34269cb02fe
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Sometimes origin will be nullptr, triggering a crash.
[ChangeLog][QPA plugin] Fixed a crash that sometimes happened when
starting a drag-and-drop operation.
Fixes: QTBUG-76368
Change-Id: I8f4e6b05f073644834c3c72a8307dac5b897f626
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Task-number: QTBUG-76491
Change-Id: I8f96c049e134843e4eb2bffef6274497eca8b5cf
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This patch contains two changes where there is a non-neglible chance
that through some indirect call the container we iterate over could be
modified.
In the listener case, it's not impossible that a listener de-registers
when it's notified. So take a copy.
In the polish_objects case, the 'initialized' flag is set before the
loop starts, and the only other reference to polish_objects, in
addPolishObject(), does not append to polish_objects in that case, but
sends the polish event directly. So use a consume loop, to release the
memory and the QPointers once they're dealt with.
Change-Id: I63d32e8a298ed5e1a7d5446434c421df80c0c795
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|