summaryrefslogtreecommitdiffstats
path: root/src/compositor/wayland_wrapper/qwldatadevice.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Check m_dragFocusResource for nullptr in DataDevice::dragMoveRoman Genkhel2022-06-301-2/+2
| | | | | | | | | | | | We encounter situation where 'dragMove' was called for DataDevice`s instance, but 'data_device_start_drag' did not called or 'drop' was called before, because even all m_drag* pointers including m_dragOrigin were nullptr Pick-to: 6.3 Change-Id: Ic435286a77e273167b1aa812cbf18a7fbf3489f2 Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-101-28/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I106d3a5d1a7b96250380b6f51a48f3b19d10e4d9 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Update QtWaylandCompositor license headers to GPL 3v5.14.0-beta2Paul Olav Tvete2019-10-161-15/+5
| | | | | | | | | | | | As announced on the mailing list, QtWaylandCompositor licensing is changing to GPLv3: https://lists.qt-project.org/pipermail/development/2019-October/037666.html Change-Id: I4bdc1aa5914e53ac760acc2b6453355af636baa9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Init variables where they are declared when possible (clang-tidy)Johan Klokkhammer Helsing2018-02-271-11/+1
| | | | | | | | | | | | | | | | | | | | clang-tidy -p compile_commands.json $file \ -checks='-*,modernize-use-default-member-init,readability-redundant-member-init' \ -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' \ -header-filter='qtwayland' \ -fix Afterwards I ran search and replace on the diff to clean up some whitespace errors: - Replaced '(\n\+[^:\n]*)(:\s+\+\s+)' with '$1: ' - Replaced '(\n\+[^,\n]*)(,\s+\+\s+)' with '$1, ' - Replaced '\n\+\s*\n' with '\n' I also had to do some manual edits, because for some reason, this particular clang-tidy check doesn't trigger for some files. Change-Id: I3b3909bac4bf20108bbe8ad1e01bcc54236dae1b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Use nullptr instead of 0 or NULLJohan Klokkhammer Helsing2018-02-201-13/+13
| | | | | | | | Applied automatic fixes using clang-tidy's modernize-use-nullptr, and some manual cleanup to prevent QFlag macros to be affected. Change-Id: I88f94390185bc6e6f23693b68723cd5710815ae6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix licensingv5.9.0-beta4Jani Heikkinen2017-05-041-12/+15
| | | | | | | | | | Currently tests are licensed under GPL-EXCEPT, examples under BSD and src under LGPL so replase old license headers with new & proper ones. Also remove old & unused license files Task-number: QTBUG-57147 Change-Id: Ia6a738798736c275dc309ccfa5b627dc2178d241 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up draganddrop and clipboard featuresPaul Olav Tvete2017-03-231-13/+20
| | | | | | | | | | | | Don't assume that no-draganddrop implies no-clipboard. Introduce a new private feature wayland-datadevice which contains the common functionality. This feature cannot be controlled independently, but is automatically disabled when both clipboard and draganddrop are disabled. Change-Id: I6aac09c7ee524e3b11f0a1caa4a6c62fc3f1d10f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Compositor API: rename QWaylandInputDevice to QWaylandSeatJohan Klokkhammer Helsing2016-08-111-7/+7
| | | | | | | | | | | | The name QWaylandInputDevice could be confusing and misleading: - A QWaylandInputDevice was not one input device, but a collection of many. - Classes that sounded like they should inherit from it did not, i.e: QWaylandKeyboard, QWaylandPointer and QWaylandTouch. - The Wayland protocol already has another term for this, which is seat. Change-Id: I9d9690d5b378075d9dddaeb8cf18395c7f47603e Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-111-2/+10
|\ | | | | | | | | | | | | Conflicts: src/compositor/wayland_wrapper/qwldatadevice.cpp Change-Id: I2f555f969ec36b3e9b4123d758ae4176c5c90164
| * Compositor API: Clear drag icon when droppingJohan Klokkhammer Helsing2016-06-091-2/+10
| | | | | | | | | | Change-Id: I81f9645d1bc959e31f7663ab89bda285951331e7 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Add dragStarted signal to QWaylandSurfaceJohan Klokkhammer Helsing2016-06-071-2/+4
| | | | | | | | | | | | | | This signal is emitted when starting to drag from the surface Change-Id: Ia949253833c7a0c6773810525ac1066e0db955fc Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | Store and expose origin surface in QWaylandDragJohan Klokkhammer Helsing2016-06-031-1/+8
|/ | | | | Change-Id: Ic2bcc88f4ff375019ff7c6fe80ae4ec72205ca2d Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Send data_source.cancelled event when dropping on nothingJohan Klokkhammer Helsing2016-05-301-0/+2
| | | | | | | | | | | I.e. on the wallpaper. This will fix a bug where dragging things onto the wallpaper in qwindow-compositor would make the drag icon stay there indefinitely. Change-Id: I19cb4e268346c3b4b624839939f295f64bf97aaf Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Erik Larsson <erik@ortogonal.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* Compositor, drag-and-drop: Clean up drag focus when droppingJohan Klokkhammer Helsing2016-03-231-1/+4
| | | | | | | | | | | | Problem: If you dragged in one client, then closed that client, opened another one and tried to drag again, the compositor would crash. Solution: Reset the drag focus when dropping or canceling the drag operation. Change-Id: I0ab78b0a3e9d2889db225b7ca45957b5148bb3a0 Reviewed-by: Erik Larsson <erik@ortogonal.com> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* Merge branch '5.6' into wip-compositor-apiLaszlo Agocs2015-10-271-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qwindow-compositor changes from 5.6 will be adapted separately. The traditional wayland-egl path is tested and is functional like before. The EGLStream support will be verified separately once the qwindow-compositor changes are ready. Conflicts: examples/wayland/qwindow-compositor/qwindowcompositor.cpp examples/wayland/qwindow-compositor/textureblitter.cpp examples/wayland/qwindow-compositor/textureblitter.h examples/wayland/server-buffer/client/client.pro examples/wayland/server-buffer/compositor/compositor.pro src/compositor/compositor_api/qwaylandbufferref.cpp src/compositor/compositor_api/qwaylandbufferref.h src/compositor/hardware_integration/qwlclientbufferintegration_p.h src/compositor/wayland_wrapper/qwlkeyboard.cpp src/compositor/wayland_wrapper/qwlkeyboard_p.h src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp src/compositor/wayland_wrapper/qwlsurfacebuffer_p.h src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h src/plugins/hardwareintegration/compositor/wayland-egl/wayland-egl.pro Change-Id: Ic2e3a6e8f74606c35b1e27cd4016fa133527d7ba
* | New API for drag and dropPaul Olav Tvete2015-09-171-71/+31
| | | | | | | | | | | | | | Let the compositor implementation keep all the GUI state. Change-Id: I73a865fa3407340276d6765e10378b8e23a76fe2 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Remove the mouse grabberPaul Olav Tvete2015-09-151-60/+63
| | | | | | | | | | | | | | | | | | | | This is no longer used for move/resize, and we are going to introduce a new concept for drag and drop (which stopped working several changes ago anyway). The old drag and drop code is left commented out to assist in the new implementation. Change-Id: I18cb41d04f09d6033d1c9e666a739793fcef494b Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Remove global coordinatesJørgen Lind2015-09-141-7/+10
| | | | | | | | | | | | | | | | | | This involves removing: - pickView and mapView from QWaylandOutput - requestedPos[X,Y] from QWaylandView Change-Id: Ie53eef434ac6ae7d0d5474f649f78a59ae857167 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | Rename QtCompositor to QtWaylandCompositorJørgen Lind2015-09-101-4/+4
| | | | | | | | | | | | | | enable building QtWaylandCompositor by default Change-Id: I7cf34052b304ca9fef55b7e30ef6a6367b5d75f1 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Remove automatic initialisation of extensionsJørgen Lind2015-08-281-1/+0
| | | | | | | | | | | | | | | | | | | | It is the specific compositor application responsibillity to create the specific extensions. Some of the extensions are picked up with the QWaylandExtension::findIn(QWaylandExtensionContainer *) function to work around missing events/apis. It should be a goal not to have these calles in the base implementation of QWayland[Compositor|Surface|Input..]. Change-Id: Iacd576f2e8a79ca0165b858b1e8f44cddad48d93
* | Move QWaylandKeyboardPrivate away from wayland_wrapperJørgen Lind2015-08-281-1/+0
| | | | | | | | Change-Id: I77dce1eecdda21f4a9907d1cd7fafe23de326136
* | Move QWaylandPointerPrivate into a _p file and remove the apiJørgen Lind2015-08-281-1/+1
| | | | | | | | | | | | and make sure all other classes uses the public QWaylandPointer type Change-Id: Ie7ff24160c253ff700eb27eb46788fe021386dd7
* | Remove QtWayland::InputDeviceJørgen Lind2015-08-281-9/+9
| | | | | | | | | | | | | | and add QWaylandInputDevicePrivate. Also make sure noone holds a reference to the private instance. Change-Id: Ic2327595d58d6308e1e2699370f53aef47061b04
* | Remove QtWayland::Compositor and add QWaylandCompositorPrivateJørgen Lind2015-08-281-3/+3
| | | | | | | | | | | | Embrace PIMPL Change-Id: I8c8b5971e15c208317ff33231bda1513e7b8d489
* | Remove QtWayland::SurfaceJørgen Lind2015-08-281-4/+4
| | | | | | | | | | | | | | | | Its enough to have QWaylandSurface and QWaylandSurfacePrivate. Also don't pass QWaylandSurfacePrivate around, but pass QWaylandSurface and then use the QWaylandSurfacePrivate::get function. Change-Id: I915cc9d7b4497ad1c6f1f2dee61d9d0db069ba6b
* | Remove the QWaylandCompositor::createView virtual functionJørgen Lind2015-08-281-5/+14
| | | | | | | | | | | | | | | | | | Views are just a representation of the QWaylandSurface, and many different types of view "sub-classes" will exist depending on its perticular use. Dont enforce just one view implementation for one compositor. Change-Id: Ie237a73e63638e70713f89b479fb1b248426c9ac
* | Rename QWaylandSurfaceView to QWaylandViewJørgen Lind2015-08-281-4/+4
| | | | | | | | | | | | and rename QWaylandSurfaceItem to QWaylandQuickView Change-Id: I989b482eb79df06e9f265bc2b0ef6b3dce7509d6
* | Rename QWaylandPointer::currentView to mouseFocusJørgen Lind2015-08-281-2/+2
| | | | | | | | Change-Id: Ia6c5d96186c8877a51df8541c95b5ccad04a3eb0
* | Public input apisJørgen Lind2015-08-281-27/+27
| | | | | | | | Change-Id: I60ec2fd9f4afe54198d9c476b28f9f15a661e9ca
* | Introducing QWaylandOutputSpaceJørgen Lind2015-08-281-4/+3
| | | | | | | | | | | | | | | | | | | | Its purpose is to make it possible to have multiscreen environments, and also multiple multioutput environments It is also an abstraction to make it clear that outputs are arranged in a 2d space Change-Id: I418509996a03b2ca1a12aec9c9e25e143a15a10f
* | Make it possible to set a QWaylandSurface on the QWaylandSurfaceViewJørgen Lind2015-08-281-1/+1
| | | | | | | | | | | | This will allow us to use QWaylandSurfaceItem from within QML Change-Id: I6ecfbf3a5de5f5a748a6a85295b9741316fef976
* | Make it possible for QWaylandSurfaceItem to children of arbitrary itemsJørgen Lind2015-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | The main problem is that the position of the QWaylandSurfaceItem is changed through the position of the views setPos function. However, it might be that we don't want the surface position to map it directly. Rename QWaylandSurfaceView::setPos to setRequestedPos Then let the compositors choose what to do with this position Change-Id: I43c74baad688d2f3e49ca091bbf436c718e81318
* | LGPL v3 license change for Qt Wayland CompositorJørgen Lind2015-07-241-27/+23
|/ | | | Change-Id: I84ed248b471464214d935352768f300d4b90dec3
* Update copyright headersJani Heikkinen2015-02-171-4/+4
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I5a74d32515c3f1fe7aa1916f4241c92832510f8c Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Split QWaylandSurface in a model and view fashionGiulio Camuffo2014-04-291-10/+11
| | | | | | | | | | QtQuick compositors already use a view class (QWaylandSurfaceItem), so add a new QWaylandSurfaceView, which is subclassed by QWaylandSurfaceItem, and move the view related methods of QWaylandSurface there. A QWaylandSurface can have many views. Change-Id: I7e92fe1f7e9d252f5f40a3097feabb5f3318b03a Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* QtCompositor: Fix retained selectionsAndrew Knight2013-12-181-0/+2
| | | | | | | | d06c0423 removed the retained selection mechanism when receiving an offer from a client, so add it back. Change-Id: I5fdf6dfe134e74265d24f8f5a92af7f0f3f387e7 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* QtCompositor: Handle destroyed DataSource objects in DataDeviceAndrew Knight2013-12-161-0/+8
| | | | | | | | Fast selections can create dangling pointers to DataSource objects, so make sure the DataDevice is aware of DataSource destruction. Change-Id: Ibcb7eec3b3403bd6ee53b6f09815d78148f65b4d Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add Drag&Drop support to compositorJan Arne Petersen2013-11-221-53/+135
| | | | | Change-Id: Ic606ac4dfbb1c55ddb81ac8a912132102753455c Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Qt-ify the QtCompositor moduleAndy Nichols2013-02-081-0/+131
Currently the QtCompositor library and API do not follow the Qt API naming conventions. This commit intends to fix these inconsistencies. filenames start with q headers containing private API's end in _p public API classes begin with Q use the qt namespace macros where necessary Wayland namespace is now QtWayland wayland_wrapper classes are now private API's It's important to make these changes not just for stylistic reasons, but also because when qmake builds the module in checks for these conventions to determine how to deploy the include files. Change-Id: I8bfadeceda92a0f52cb73c704551da75540e7587 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>