summaryrefslogtreecommitdiffstats
path: root/src/client
Commit message (Collapse)AuthorAgeFilesLines
...
* Client: Update size hints when updating the decorationDavid Edmundson2024-01-231-0/+3
| | | | | | | | | | | | | Size hints are in wayland's "window geometry". This includes the space for any client side decoration that QtWayland has to add. We need to update the size hints whenever decoration is created or destroyed and these margins change. Fixes: QTBUG-121399 Pick-to: 6.7 Change-Id: Ie8c1898859774e1c8dff93695af15327379ad3b6 Reviewed-by: Liang Qi <liang.qi@qt.io>
* client: Destroy window manager integration before displayDavid Redondo2024-01-231-0/+1
| | | | | | | | | Like the globals window manager integration needs the display to be alive. Fixes: QTBUG-121364 Change-Id: I3bf10737f9c1aa6d0b3c34d2268532ea6fc4e957 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Mark QWaylandWindow::wlSurface as constDavid Redondo2024-01-192-3/+3
| | | | | Change-Id: I416fee67bb35a88f55ac6d24d203e607f1ea1f32 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* TextInputV3: Remove unnecessary enableSurface/disableSurfaceInho Lee2024-01-192-18/+5
| | | | | | | | | | | | | zwp_text_input_v3's enter/leave events are doing enable/disable the surfaces. enableSurface/disableSurface are called by setFocusObject and it follows enter/leave. These redundant routines are removed in TextInputV3 Fixes: QTBUG-120533 Pick-to: 6.7 Change-Id: I080c67629d7cf9a9029414f5a0ea6735cfe4642a Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Make sure wayland object destructors are calledDavid Redondo2024-01-1721-34/+121
| | | | | | | | | | | Always at least call the generated "interface"_destroy method which does destroy the proxy. For not already wrapped classes a small template is introduced to pass a function that is called in the destructor. Fixes: QTBUG-111576 Change-Id: I373463710764958ddea42ef0f7dc010c427b2ce8 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Disable client side decorations on Vulkan windowJiDe Zhang2024-01-171-0/+3
| | | | | | Fixes: QTBUG-120950 Change-Id: I22a78691bd09093432e5d11a72e3abbeadf36cf2 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* client: Avoid creating decorations in the render threadDavid Edmundson2024-01-112-6/+3
| | | | | | | | | | | | | | | | | createDecoration is called when on the main thread from when window flags change, implicitly from initWindow, and also every handleWindowStatesChanged which will be called when we get the first configure event in an xdg shell. There is no need to create the decoration in QWaylandGLContext::makeCurrent. Any current call to makeCurrent before the platform window is shown will not create a decoration as there's a check for a shell surface. Any call afterwards will have already been handled by initWindow. Similarly the SHM backend store does not need to handle decorations itself. Fixes: QTBUG-105703 Pick-to: 6.7 Pick-to: 6.6 Change-Id: I644cece28277131cf7a65eaa234ff08c8431d544 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* client: Fix text-input set_cursor_rectangle coordinatesIlya Fedin2024-01-103-6/+12
| | | | | | | | | They should be converted to native ones and shouldn't contain server-side decorations Pick-to: 6.7 6.6 6.5 Change-Id: Ia701edc22b68bec2fa46e95d7a812621142dcde0 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* QWaylandWindow: Update decoration when application palette/font changesKai Uwe Broulik2024-01-102-0/+13
| | | | | | | | Ensures the decoration can redraw to adjust for the new colors/font. Pick-to: 6.7 6.6 6.5 Change-Id: Ib46acde1d14baafda49f379f8279c396bc976bdc Reviewed-by: David Edmundson <davidedmundson@kde.org>
* bradient: Use QWaylandWindow actual window titleKai Uwe Broulik2024-01-102-16/+25
| | | | | | | | | | | | | It may include a suffix containing the application name and is also what's set on the XDG Toplevel, i.e. what the rest of the environment (task switcher, etc) sees. This stores the title in QWaylandWindow and adds a getter to retrieve it. Pick-to: 6.7 Change-Id: I84f41c68b16b680cdbb5cf656c7078d1e41767d4 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* QWaylandScreen: Implement subpixelAntialiasingTypeHintKai Uwe Broulik2024-01-062-2/+30
| | | | | | | | | It isn't really used anywhere yet, since on Unix QFontconfigDatabase doesn't use the screen's information. Pick-to: 6.7 6.6 6.5 Change-Id: Icab81b2bf8df1a23223a74f2d4aee94601e0bea3 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* QWaylandShmBackingStore: Preserve buffer contents between framesKai Uwe Broulik2024-01-062-3/+49
| | | | | | | | | | | Doing a memcpy is quite expensive, particularly when only a small region of the buffer (such as a blinking cursor) actually changed. Instead, keep track of the damaged region and paint only what actually changed into the buffer to be used. Change-Id: Ibd81bbfe20d0750ddb751f41722a316387225ba6 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* QWaylandWindow: Reset input region on window resetKai Uwe Broulik2024-01-061-0/+3
| | | | | | | | | Amends 604db6b5 and fixes the input region (and thus Qt::WindowTransparentForInput) not working on subsequent shows. Pick-to: 6.7 6.6 Change-Id: Ie160aa0b2c13e6858b31ad98866a8689dfbad149 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* client: Fix window margin calculationRob Hall2024-01-061-2/+2
| | | | | | | | | | | | Don't subtract the size of the window frame margin from the content area. Fixes an issue where an area of the window is unclickable when client-side decorations are in use. Fixes: QTBUG-120392 Pick-to: 6.7 6.6 6.5 Change-Id: I6a89b2d463be084233ea3448cacfbbd09d66b96e Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
* client: Do not constrain clients to size hintsDavid Edmundson2023-12-281-11/+1
| | | | | | | | | | | | | | | | | The behavior of constraining requests from the system to the client requested size does not appear to be in other backends. It was added to QWayland before xdg-shell/qt-shell existed with hints that can be supplied to the window manager. This is important as the specification states that maximized windows must follow the geometry requested and there is some movement towards this applying for all tiled states. Task-number: QTBUG-120035 Pick-to: 6.7 Change-Id: I7c203db18e34a8f81a39c504591f6b54df076da8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* client: Clean up text input proxy object in textinputv3David Edmundson2023-12-211-0/+1
| | | | | | | | | | | This not only cleans up a tiny amount of memory, but also fixes a potential crash if a wayland event were to arrive on the object after the Qt level wrapper is destroyed. Pick-to: 6.7 Change-Id: Id1c768b1f846925579220784e4312cede4efd095 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: David Redondo <qt@david-redondo.de>
* client: Clean up text input proxy object in textinputv2David Edmundson2023-12-211-0/+1
| | | | | | | | | | This not only cleans up a tiny amount of memory, but also fixes a potential crash if a wayland event were to arrive on the object after the Qt level wrapper is destroyed. Pick-to: 6.5 6.6 6.7 Change-Id: I6fafdd848d61da893304c4467a57b52d3771c508 Reviewed-by: Liang Qi <liang.qi@qt.io>
* QWaylandMimeData: Skip "DELETE" formatKai Uwe Broulik2023-12-201-2/+5
| | | | | | | | | | | | | | | This is presumably a left-over from XDND: https://freedesktop.org/wiki/Specifications/XDND/ > In general, XdndActionMove is implemented by first requesting the data > and then the special target DELETE defined in the X Selection > protocol. [...] DELETE should be sent before XdndFinished. Firefox sends this during dragging of files but trying to fetch it will fail, leading to a timeout and potential freeze. Pick-to: 6.7 6.6 6.5 Change-Id: Ic30f5cb23587c63d54859c5eaebb3a054a25ac69 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Don't use Qt keywords in headersKai Uwe Broulik2023-12-185-10/+10
| | | | | | | | | | | | | Unfortunately for many Wayland features applications need to access Qt private headers which will fail if the project is built with QT_NO_KEYWORDS. Ideally, the examples and tests were ported, too, and QT_NO_KEYWORDS enabled in .cmakec.conf. Pick-to: 6.7 Change-Id: I9f988d304bcc8dba4dd84761c41ba3da2473515d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove inactionable warnings suggesting qt-text-input-method-unstable-v1Nicolas Fella2023-12-181-4/+0
| | | | | | | | | | | | | | These warnings can appear several times during the program execution, spamming the log. They are also inactionable for desktop use cases, since qt-text-input-method-unstable-v1 is not a protocol implemented by any desktop compositor. Fixes: QTBUG-120171 Pick-to: 6.7 Change-Id: Icd5316000b43e4b16e1eaff9efcc0c363458b9af Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QWaylandCursor: Set appropriate shape for drag cursorsKai Uwe Broulik2023-12-141-3/+3
| | | | | | | | | | | Even if the compositor is free to do whatever during a drag, the client can still set a proper cursor. The codepath without cursor-shape also doesn't special case them. Pick-to: 6.7 6.6 Change-Id: Ib6b9864d8024ff2919471d6f2d12f9ba8e2e512d Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
* Support TextInput V3 over v4-wipDavid Edmundson2023-12-138-109/+74
| | | | | | | | | | | | | | | | | Support for v4-wip was not added into any desktop linux compositors, nor was it ever enabled into the default Qt client builds for clients or compositor. TextInputV3 has become the most widely deployed. Whilst changes are needed, they do not need to be breaking changes. A second iteration of V3 can add the features we need. This is now in motion upstream. For cases where QtWaylandCompositor is used, the custom Qt text input method is preferred to work with the Qt virtual keyboard. Pick-to: 6.7 Change-Id: I01e2686c67846804c0069f1495952b530547f91c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Handle subsurfaces with async configureDavid Edmundson2023-12-111-1/+1
| | | | | | | | | | | | | | | With XDG Shell we cannot map a buffer until we get a configure event. To handle this the normal expose events is blocked then sent explicitly when we get this request. This works, but we also need to notify that subsurfaces are now exposed with the parent. Pick-to: 6.7 6.6 6.5 Fixes: QTBUG-119882 Fixes: QTBUG-119883 Change-Id: I0ae69c8da702037e7575cfc0939d3e783b50f323 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Adapt to QWaylandScreen being publicDavid Redondo2023-12-091-2/+2
| | | | | Change-Id: I8c260ab7177011fd22db856615c8f72d6a8fabeb Reviewed-by: David Edmundson <davidedmundson@kde.org>
* client: implement QWaylandCursor::size()Liang Qi2023-12-082-0/+12
| | | | | | | | | See also 78272c667f008f6afcf5f84e0add525b56c3a558 in qtbase. Fixes: QTBUG-118612 Pick-to: 6.6 6.5 Change-Id: I1cfd0c287b133c21a0ccdc5f283d9997f06fb2ed Reviewed-by: David Edmundson <davidedmundson@kde.org>
* QWaylandMimeData: Check text/x-moz-urls for UTF-16Kai Uwe Broulik2023-12-041-10/+23
| | | | | | | | | | | | And fall back to UTF-8 if it's not. When dragging a picture out of Chrome, it sends a simple URL as UTF-8 under text/x-moz-urls. QXcbMime has this fall-back, too but I originally didn't consider it necessary. Pick-to: 6.6 6.5 Change-Id: I52378cfc354de342623e5dd3f7e1d028951e8dab Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Remove redundant static uint32_t QWaylandDisplay::currentTimeMillisec()Edward Welbourne2023-11-272-12/+0
| | | | | | | | | | Fortunately it was unused. Its 32-bit unsigned return type, measuring time in milliseconds, wraps around every 50 days. If Qt Wayland ever does need to know the current time in milliseconds, I can recommend QDateTime::currentMSecsSinceEpoch(). Change-Id: I03e70e3c7060b1e8fb82fc2e151bb187b6598b96 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* client: Use correct offset handling features for wl_surface version 5David Edmundson2023-11-261-2/+6
| | | | | | | | | In version 5 wl_surface_offset was introduced and requires that is used instead of passing the additional arguments to wl_surface_attach Fixes: QTBUG-119177 Change-Id: I04d7a6f89d17991a8fc536f5cca9d5d8d5418940 Reviewed-by: Inho Lee <inho.lee@qt.io>
* Follow up handleWindowActivated -> handleFocusWindowChanged renameTor Arne Vestbø2023-11-242-2/+2
| | | | | | Change-Id: I75eeae6dfa4af8a17dffaef74f15fc87a58bcf61 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
* Client: Move topmost grabbing popup tracking to QWaylandWindowVlad Zahorodnii2023-11-172-3/+23
| | | | | | | | | | | | | | | | If the effective transient parent is different from QWaylandWindow::transientParent(), then the popups may be closed in wrong order and producing an xdg-shell protocol error. This change lifts topmost popup tracking from the xdg-shell plugin to QWaylandWindow so it can guess the correct transient parent and the xdg-shell plugin doesn't have to pick a different parent behind our back. Fixes: QTBUG-119110 Pick-to: 6.6 Change-Id: I7c5f780b7bd4c3362aa7b22762ff336ae908ff70 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* client: Always clear queued buffer busy flag when resetting the windowWeng Xuetian2023-11-131-0/+3
| | | | | | | | | | | | | | In 39a003942ebab39a1d3b8bc64f41d0c68e92f4bf, the queued buffer is always set busy, but it may not be reset correctly if the queued buffer is not ever attached due to hiding the surface when window visibility is being updated at a very fast speed. Fixes: QTBUG-118650 Task-number: QTBUG-118650 Pick-to: 6.6 Change-Id: Id0bdd3caa69c821bb84927f01b4839f46eee8a10 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: David Redondo <qt@david-redondo.de>
* Add list is empty judgment,optimize to use constantFeifei Zhan2023-11-031-1/+6
| | | | | | | | the last() method of the mPendingTouchPoints list is judged to be empty before it is called, and the last() is optimised to constLast() according to the logic below. Change-Id: I8ec082a22c223d06dbe848bc70622710b6acfa50 Reviewed-by: Feifei Zhan <noone@onqt.com> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* QWaylandSurface: client support wl_surface version 6JiDe Zhang2023-11-029-50/+131
| | | | | | | | | | | | | | Add QWaylandWindow::updateScale() function to update the window's scale from QWaylandFractionalScale or QWaylandSurface::preferredBufferScale or QWaylandScreen::scale or QWaylandSurface::preferredBufferScale. Add QWaylandWindow::updateBufferTransform() function to update the window's buffer transform from QScreen::primaryOrientation or QWaylandSurface::preferredBufferTransform. Change-Id: I2742701e92c7403a89df97b7fa06b5b0de6917a7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* QWaylandMimeData: adapt to qt_safe_poll changes from qtbaseAhmad Samir2023-10-281-5/+3
| | | | | | | It's private API in qtbase and has been changed recently. Change-Id: I763918a035bce67c06a6120e9d7dfb542ca023b8 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Client: Always populate mimedata in dragsDavid Edmundson2023-10-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | It's possible for clients to perform a drag and drop operation within their own client without any mimeData. A user can directly access the original drag. On wayland without any mimedata it's impossible for a client to accept a drag as the mechansim involved is to either select a given mimedata entry or an empty string. Within Qt we always accept the first format if we accept a drag. When dragging within our own window we also start a wayland drag so will receive a cancel event from the compositor if the compositor doesn't believe the client has accepted the drag. This patch provides a dummy mimedata entry so that something can be accepted. Fixes: QTBUG-112161 Pick-to: 6.6 6.5 6.2 5.15 Change-Id: I6309d82e20545e10ebdb9dafde7e13a5e3be5ff2 Reviewed-by: Liang Qi <liang.qi@qt.io>
* client: Provide seatname for multi-seatLu YaNing2023-10-182-0/+8
| | | | | | | | In a multi-seat configuration the seat name can be used by clients to help identify which physical devices the seat represents. Change-Id: Id704ad289fe861c2170380f1575d298e8db03964 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Include what you need: <QPointer>Marc Mutz2023-10-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | All these TUs relied on transitive includes of qpointer.h, maybe to a large extent via qevent.h, though, given that qevent.h is more or less the only public QtBase header that includes qpointer.h, something else seems to be at play here. Said qevent.h actually needs QPointer in-name-only, so a forward declaration would suffice. Prepare for qevent.h dropping the include. The algorithm I used was: If the TU mentions 'passiveGrabbers', the name of the QEvent function that returns QPointers, and the TU doesn't have qpointer.h included explicitly, include it. That may produce False Positives, but better safe than sorry. Otherwise, in src/, add an include to all source and header files which mention QPointer. Exception: if foo.h of a foo.cpp already includes it, don't include again. Task-number: QTBUG-117670 Change-Id: I8eb00fbd2df16300b0cbfc4157612a45c72ac12c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QWaylandWindow: add QWaylandWindow::setScaleJiDe Zhang2023-10-072-23/+24
| | | | | | | | The logic for update window's scale is scattered in multiple places, we should unify their behavior. Change-Id: Ic8ba20fdbc44942aed9b4bd0b0b12dad7bee1719 Reviewed-by: Liang Qi <liang.qi@qt.io>
* client: Implement QWheelEvent::invertedDavid Edmundson2023-09-293-10/+37
| | | | | | | | | | | | | | | "Natural scrolling" is a setting that makes trackpads act in the inverse; moving up moves content down to mimic behavior of touchscreens. However not all scroll events are used for scrolling, so it can be useful to know the real direction. This was exposed in QWheelEvent it just needs plumbing. Change-Id: I050b8b3e55796beff33badb7c073c0b93589294e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
* client: support Xdg Shell not_shown stateDavid Edmundson2023-09-251-6/+7
| | | | | | | | | | | | | This state is to indicate that a toplevel is not visible, either minimised on another desktop. This maps to QWindow::isExposed. In addition to XdgShell changes. QWaylandWindow is adjusted to check exposure state before sendingExposureEvents. Subsurfaces are un-exposed and re-exposed when the toplevel changes. Change-Id: I76932c2c58681f832c1c2efde3cfde1c32cd3e05 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix use-after-free with animated cursorsPaul Olav Tvete2023-09-191-8/+1
| | | | | | | | | | | | | In WlCallback::callback_done(), m_fn() can cause the callback object to be deleted, so it should not be referenced after that. Since m_autoDelete is never set to true, the rest of callback_done() is dead code and can be removed. Fixes: QTBUG-117067 Pick-to: 6.6 6.5 Change-Id: I0b1a1fcb8204cba789272f3861be4c2e2d0789b4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
* Client: Fix QT_WAYLAND_RESIZE_AFTER_SWAPVlad Zahorodnii2023-09-121-2/+1
| | | | | | | | | | | | | | | | | | | | mResizeLock can be locked several times by the same thread in the following scenario QWaylandWindow::setGeometry() at qwaylandwindow.cpp:429:43 QWaylandEglWindow::setGeometry() at qwaylandeglwindow.cpp:58:32 QWaylandWindow::resizeFromApplyConfigure() at qwaylandwindow.cpp:517:16 QWaylandXdgSurface::Toplevel::applyConfigure() at qwaylandxdgshell.cpp:91:57 QWaylandXdgSurface::applyConfigure() at qwaylandxdgshell.cpp:381:35 QWaylandWindow::doApplyConfigure() at qwaylandwindow.cpp:628:38 QWaylandWindow::applyConfigure() at qwaylandwindow.cpp:671:25 Since mResizeLock is not a recursive mutex, the main thread just blocks in QWaylandWindow::setGeometry(). To prevent that, this patch changes the type of mResizeLock from QMutex to QRecursiveMutex. Change-Id: I362f4909bfdfc2d91b7cf902f27d35c742ac5091 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Client: Avoid locking resizing in QWaylandShmBackingStoreVlad Zahorodnii2023-09-111-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWaylandWindow::setCanResize(false) will block applying configure events. QWaylandWindow::setCanResize(true) will unblock configure events and potentially apply a scheduled configure event if there's one. QWaylandWindow::setCanResize(true) has to be called **after** committing the surface to ensure that the xdg window geometry matches the buffer. We don't want the xdg window geometry change when painting. Unfortunately, setCanResize(true) can be called before the surface is committed when using a RasterSurface, for example - QWaylandShmBackingStore::beginPaint(): calls setCanResize(false) - QWaylandShmBackingStore::endPaint(): calls setCanResize(true) - QWaylandWindow::setCanResize(true): applies pending configure event - QWaylandShmBackingStore::flush(): commits the surface, but the xdg window geometry is wrong now As is, beginPaint() and endPaint() are not entirely correct functions where configure events can be blocked. We need functions that wrap both painting and flushing, which are not feasible with the current backing store design. On the other hand, it's worth noting that blocking configure events in the backing store is not necessary because painting happens on the main thread unlike OpenGL or Vulkan code paths. Given the lack of synchronization points and the fact that rendering happens on the main thread, this change removes blocking configure events in QWaylandShmBackingStore. It fixes dolphin and various other applications that use QtWidgets jumping while being interactively resized. Change-Id: I156e4fd5e04a6bba7e8d48171510d5ab0ec89713 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* client: Port QWaylandInputDevice to support QT_NO_CONTEXTLESS_CONNECTDavid Edmundson2023-09-091-2/+2
| | | | | | | | | There were two existing usages of the 3-arg connect, but the timer is always scoped to be shorter than the receiver so it was previously safe. Change-Id: I0bb5a38fed997cbb68e49defc51972894f5239ee Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* client: make drag and drop in same control works againLiang Qi2023-09-081-0/+1
| | | | | | | | | | | | This amends 40a27c26cee7ad4e5e32eb01568777cd4e9da25c. examples/widgets/draganddrop/draggabletext in qtbase now is fine. Pick-to: 6.6 Fixes: QTBUG-116344 Change-Id: Ie930586fa7c6468c0e859786d968ad2343057e4d Reviewed-by: David Redondo <qt@david-redondo.de> Reviewed-by: Liang Qi <liang.qi@qt.io>
* Revert "Client: Send release button event on pointer leave"Liang Qi2023-09-062-8/+2
| | | | | | | | | | | | | This reverts commit 8235fa65fe033a94e7a44322d3502f25940092ec. It makes tests/manual/examples/widgets/draganddrop/puzzle not work, which does drag and drop in same app. Pick-to: 6.6 6.5 6.2 5.15 Fixes: QTBUG-115757 Task-number: QTBUG-97037 Change-Id: I738769fde96f7da91f5bc4dc7a70ed49596dcd61 Reviewed-by: Liang Qi <liang.qi@qt.io>
* client: Drop unused member variablesDavid Edmundson2023-08-311-4/+0
| | | | | | Change-Id: Id7cca9d5cb620dadb356e9cfcc68ca1203a0db98 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: David Redondo <qt@david-redondo.de>
* Client: Remove some surface commitsVlad Zahorodnii2023-08-291-4/+0
| | | | | | | | | | | | | | | The buffer transform, input and opaque regions are double buffered state. They will be applied on the next surface commit. But the issue with them is that the relevant code makes surface commits too. It's undesired as it can lead to qtwayland committing partial state, for example it can break xdg surface window geometry. This change removes hidden surface commits. The relevant properties will be applied on the next frame. Change-Id: I1c40c9a5430fb6b91d7643b20d628f8a9a9d501a Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: Commit the initial surface state explicitlyVlad Zahorodnii2023-08-281-0/+2
| | | | | | | | | | | | | | QWaylandWindow lacks an explicit step to finish initializing the shell surface by committing the surface. So far it used to work because of hidden surface commits in QWaylandWindow::handleContentOrientationChange(), QWaylandWindow::setMask() and so on. This change adds an explicit step to commit the initial surface state to make the shell surface initialization robust. Change-Id: Ibc38a4e0dbea689a727451c25a61af0270c7e548 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Client: Fix coding style in QWaylandWindow::setMask()Vlad Zahorodnii2023-08-281-1/+1
| | | | | | | | | | | | | | | | | The relevant code can be reformatted as follows if (isOpaque()) { if (mMask.isEmpty()) setOpaqueArea(QRect(QPoint(0, 0), geometry().size())); } else { setOpaqueArea(mMask); } which doesn't fully make sense. Pick-to: 6.5 6.6 Change-Id: If78270273bff4eec9ad58666b6f31c5f10139caf Reviewed-by: David Edmundson <davidedmundson@kde.org>