summaryrefslogtreecommitdiffstats
path: root/src/client
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.13' into 5.14v5.14.0-beta1Qt Forward Merge Bot2019-10-011-2/+4
|\ | | | | | | Change-Id: Ie236fa47c23456b15414c3b3e89568b915979ebe
| * Client: Don't crash with long window titles using UTF-16 charactersJohan Klokkhammer Helsing2019-09-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Client: Create context menu event when pressing the menu keyDavid Edmundson2019-09-271-1/+12
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Johan Klokkhammer Helsing2019-09-169-87/+101
|\| | | | | | | | | | | | | | | | | | | | | | | 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
| * If egl_x11 is not available then don't turn on xcomposite-eglAndy Shaw2019-09-131-1/+1
| | | | | | | | | | | | | | | | 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>
| * Client: Fix touch rounding errorsJohan Klokkhammer Helsing2019-09-092-7/+13
| | | | | | | | | | | | | | | | | | 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>
| * Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"Qt Forward Merge Bot2019-09-087-73/+78
| |\
| | * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-087-73/+78
| | |\ | | | | | | | | | | | | Change-Id: I5d587b79b96d2b44f1975419a658c259c63fa30d
| | | * Merge remote-tracking branch 'origin/5.12.5' into 5.12Qt Forward Merge Bot2019-09-072-1/+12
| | | |\ | | | | | | | | | | | | | | | Change-Id: Ic73262146f51a9e7f4ffab46511654ad70c4f514
| | | | * Merge remote-tracking branch 'qt/5.12' into 5.12.5Paul Olav Tvete2019-08-236-30/+38
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylandwindow.cpp Change-Id: I89fefe5bfc247eeaad3981850efa0faaab3cb145
| | | | * | Client: Make handleUpdate aware of exposure changesDavid Edmundson2019-08-212-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | Fix deadlock in QWaylandWindow::waitForFrameSyncPavel Tumakaev2019-09-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | Client: Refactor touch handling and fix various bugsJohan Klokkhammer Helsing2019-08-292-60/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | Client: Don't freeze in QDrag::exec if there was no drag focusJohan Klokkhammer Helsing2019-08-293-10/+18
| | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | / | Client: Disable key repeating when rate is set to 0David Edmundson2019-09-081-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | Client: Adjust for window border when setting text-input cursor rectJohan Klokkhammer Helsing2019-09-031-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge remote-tracking branch 'origin/5.13' into 5.14Johan Klokkhammer Helsing2019-09-037-48/+59
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylandinputdevice.cpp src/client/qwaylandwindow.cpp Change-Id: Ifd64debc484197829d2fe412afa98c29b382efa5
| * | | Merge remote-tracking branch 'origin/5.12' into 5.13Johan Klokkhammer Helsing2019-08-2911-54/+86
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylandinputdevice.cpp src/client/qwaylandintegration.cpp src/client/qwaylandwindow_p.h src/shared/qwaylandxkb.cpp Change-Id: Ibac7998502351e93c71c9b786536298657afe3d0
| | * | Client: Crash instead of exit when there's a wayland errorJohan Klokkhammer Helsing2019-08-222-17/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt applications should not call exit. Task-number: QTBUG-75779 Change-Id: I91190b10f8c8e111996cd73283061e6ceaa6b1f6 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
| | * | Fix race condition for client buffer integration initializationJohan Klokkhammer Helsing2019-08-202-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | Client: Emit wl_surface lifetime signals on QWaylandWindowJohan Klokkhammer Helsing2019-08-192-1/+9
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Client: Fix large clipboard pastingDavid Edmundson2019-08-171-16/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Client: Add safer fromObject function to scannerJohan Klokkhammer Helsing2019-08-154-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Client: Fix crash on wl_pointer.up after destroying a windowJohan Klokkhammer Helsing2019-09-022-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Client: Don't try to disconnect destroy handler from destroyed objectsJohan Klokkhammer Helsing2019-08-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Gets rid of warning about disconnecting null objects on application exit. Change-Id: Ie96d4321dfab113622d7059f6849acf15715dfa2 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | | Client: Expose default input device through integrationPier Luigi Fiorini2019-08-233-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote-tracking branch 'qt/5.13' into devPaul Olav Tvete2019-08-162-1/+4
|\| | | | | | | | | | | Change-Id: Ief5f30fc1dbd0e6531b19e723057b06e9bd419b4
| * | Merge remote-tracking branch 'qt/5.12' into 5.13Paul Olav Tvete2019-08-144-2/+23
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compositor/configure.json sync.profile tests/auto/auto.pro Change-Id: Ia6d1512aa9ad49ac7f92ae88f23026dc0ee2ccc5
| | * Backport texture sharing for NVIDIAPaul Olav Tvete2019-08-132-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Fix expose event compressionPaul Olav Tvete2019-08-132-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-08-131-2/+2
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylandinputdevice.cpp Change-Id: I20fb102162351b714855258175ed00437e55f072
| * | Fix GCC 4.8 buildVille Voutilainen2019-08-091-2/+2
| | | | | | | | | | | | | | | Change-Id: I0a193ceaa1549c08acad02b59db62ae313d6b334 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix typoPier Luigi Fiorini2019-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Correct a typo introduced with 0761173a. Change-Id: I5c101e015c0fbd7de03d26ff3f8629418f070db2 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-271-1/+1
|\| | | | | | | | | | | Change-Id: I64c1a5cabcdad4177aeac35bcd45a4cde8f60165
| * | Fix use of private dependencyPier Luigi Fiorini2019-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | QWaylandCursor: replace a static QMap with a C arrayMarc Mutz2019-07-231-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-162-31/+41
|\| | | | | | | | | | | Change-Id: Id4304c7244dd1580d5bb18451e3dda5dabe6bcb3
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-112-31/+41
| |\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I436405677453e7df43258363c0d5c88d7b3790d0
| | * Fix compilation with C++20Marc Mutz2019-07-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Client: Reset frame callback timer when hiding a windowDavid Edmundson2019-07-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Client: Fix stuttering when the GUI thread is busyJohan Klokkhammer Helsing2019-06-202-29/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | QWaylandShmBackingStore: replace a QLinkedList with std::listMarc Mutz2019-07-122-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...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>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-022-1/+11
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/client/qwaylanddatadevice.cpp Change-Id: I1cc8640b68eba5dfb560749dfe679741ee62e6ad
| * | Merge remote-tracking branch 'origin/5.13.0' into 5.13Qt Forward Merge Bot2019-06-201-0/+7
| |\ \ | | | | | | | | | | | | Change-Id: I3b0e0899cfcd738ddf45b4211f86e1079d6e4988
| | * | Client: Don't add all windows to activePopupsv5.13.0-rc3v5.13.0-rc2v5.13.0Johan Klokkhammer Helsing2019-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| | * | Client: Don't crash when the cursor theme fails to loadv5.13.0-rc1Johan Klokkhammer Helsing2019-05-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-75920 Change-Id: I29d84b487afb2a90b8a633abce2fcc39ca75adae Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| * | | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-151-1/+4
| |\ \ \ | | | |/ | | |/| | | | | Change-Id: I3b4132c4824a5312e7af0ca5659bd34269cb02fe
| | * | Don't crash if we start a drag without dragFocusAleix Pol2019-06-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Remove usages of deprecated QLatin1LiteralSona Kurazyan2019-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-76491 Change-Id: I8f96c049e134843e4eb2bffef6274497eca8b5cf Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | | | Eradicate Q_FOREACH loops [2/2]: non-trivial casesMarc Mutz2019-06-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>