summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylanddatadevice.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use default member initialization for raw pointersJohan Klokkhammer Helsing2018-02-281-1/+1
| | | | | | | | Initialize to nullptr to prevent undefined behavior. Change-Id: I7753c0be77a886d62ecb1cd7b86fc8c98340b0b8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Init variables where they are declared when possible (clang-tidy)Johan Klokkhammer Helsing2018-02-271-5/+0
| | | | | | | | | | | | | | | | | | | | 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-5/+5
| | | | | | | | 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>
* Replace Q_NULLPTR with nullptrKevin Funk2017-09-261-2/+2
| | | | | | | Change-Id: I9699a957430b8d3574ce29acb91b7ada9ea6209b Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up draganddrop and clipboard featuresPaul Olav Tvete2017-03-231-4/+6
| | | | | | | | | | | | 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>
* Fix build without feature.clipboardTasuku Suzuki2017-01-131-0/+6
| | | | | Change-Id: I195efecca9350cb519865f251cdee9c6e23d3592 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use new feature system, part 2Lars Knoll2016-11-231-2/+2
| | | | | | | | | Convert all uses of QT_NO_FOO to proper QT_CONFIG(foo) checks. Change-Id: Id0f0b3325c246567a43d6b2d71b0d69e5535e648 Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'qt/5.7' into 5.8Paul Olav Tvete2016-11-101-0/+4
|\ | | | | | | Change-Id: Ibfe6fe6ed983b537d55544883b7dc75e5cc3fc37
| * Merge remote-tracking branch 'qt/5.6' into 5.7Paul Olav Tvete2016-11-101-0/+4
| |\ | | | | | | | | | Change-Id: I1efd16d6c5f939d61001376c3b010eae1927595b
| | * Fix build when some features are disabledPaul Olav Tvete2016-11-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make QtWaylandClient compile when Qt is configured with: -no-opengl -no-accessibility -D QT_NO_CLIPBOARD -D QT_NO_DRAGANDDROP -D QT_NO_SESSIONMANAGER Task-number: QTBUG-56192 Change-Id: Idc6aae6b36a35515109a27bed31a22e3e909ef27 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | | Don't try to deliver event to destroyed windowPaul Olav Tvete2016-10-111-1/+2
|/ / | | | | | | | | Change-Id: If1c57250e2dc9e0d55767bbdfb15c3e3f5d9b333 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-111-4/+3
|\| | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylanddisplay.cpp src/client/qwaylanddisplay_p.h src/client/qwaylandxdgpopup_p.h Change-Id: If86ea09971773dc6c541f07819459a90e8ab73a0
| * Fix crash when dragging with touch without first having pointer focusJohan Klokkhammer Helsing2016-08-021-0/+3
| | | | | | | | | | | | | | | | Also add drag-and-drop tests for both touch and mouse. Task-number: QTBUG-54756 Change-Id: Ibfff48b1f2377022a8624e28e9f638076187ddca Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Remove logging of drag-and-drop dataJohan Klokkhammer Helsing2016-08-011-4/+0
| | | | | | | | | | Change-Id: Ic66faf02f7d4eb82aa898a2858a0271a007460a0 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-301-18/+16
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylandinputcontext_p.h src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h Change-Id: Iac517e1985e4e67d7ca00ca4c10dcda9dd9079f9
| * client: Always accept the DnD data offerGiulio Camuffo2016-06-031-18/+16
| | | | | | | | | | | | | | | | | | | | | | Weston stopped sending the wl_data_device.drop event if the data offer was not accepted, which was the case when it was coming from the same client that was receiving the offer. So now always accept the offer even if we will bypass the offer when retrieving the data. Change-Id: If825f4dbc962a7812e379f36a42ceabe3eb3096f Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | Compensate for window decoration size in data_device_enter/motion.Erik Larsson2016-04-181-3/+16
| | | | | | | | | | | | Change-Id: I71a549e597ec0821c778edca9f8cb20eefdcc75e Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Updated license headersAntti Kokko2016-01-201-14/+20
| | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I76ae5d3e64f096eb3163d6163a38d68c7c1ca756 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'qt/5.6' into wip-compositor-apiPaul Olav Tvete2015-12-021-1/+1
|\| | | | | | | Change-Id: Ie70fdd03e1259a8cb75bbdbf1324e3e4a2b51807
| * Fix compiler warnings.Friedemann Kleint2015-11-051-1/+1
| | | | | | | | | | | | | | | | qwaylandinputcontext.cpp:57:16: warning: unused parameter 'sym' [-Wunused-parameter] qwaylanddatadevice.cpp:173:135: warning: 'dragData' may be used uninitialized in this function [-Wmaybe-uninitialized] Change-Id: Id654360fd9b7fdb572565ad39b664af3355b5e79 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Fix some wrong licenses in QtWaylandClientJørgen Lind2015-07-241-27/+21
|/ | | | Change-Id: I8d5e88e9b296276c6d9d570b3e5e704f32298d83
* Don't generate spurious selection eventsGiulio Camuffo2015-06-091-1/+1
| | | | | | | | | | | By calling destroy() on the active wl_data_source before replacing it with a new one and calling set_selection() we trigger a spurious selection(null) event before the one with the offer for the source we are going to set. Change-Id: I6c2f2fd029fa523312b9892c6a5050805dfa83b0 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-171-3/+3
| | | | | | | | | 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>
* Namespace the platform pluginsGiulio Camuffo2015-01-291-0/+8
| | | | | | | | | | | | There currently is a QWaylandInputDevice class both in the wayland QPA plugin and in the QtCompositor API. This causes the qwindow-compositor example to crash when running nested in a wayland session due to a mismatch between the two classes. By namespacing all the plugin code we make sure that name clashes will not happen anymore. Change-Id: I17497cff697599200bea68bf01dfde474526390f Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Silence uninited variable compiler warningsLaszlo Agocs2014-12-031-1/+1
| | | | | | | | The code is correct but some compilers may still warn about dragData not getting initialized. Silence them. Change-Id: Ib52321667fc5094e22ebbef538b72b5477e6f10b Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Pass the relevant serial when setting the selectionGiulio Camuffo2014-10-091-1/+2
| | | | | | | This fixes copying in Weston. Change-Id: Icbdb81078e8df4575bbe440321773131ba27ebbf Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* DataOffer not invalidated when client loses keyboard focusLi Qiu2014-09-041-0/+5
| | | | | | | | | | | | | | | | The data_offer object should be invalidated when client loses keyboard focus. Otherwise in following scenario, it will become zombie object: start app1 -> copy text -> start app2 -> paste text -> close app1 -> paste again in app2 -> seg fault in qtwayland. The root cause is that when app2 takes focus the first time, data_device.data_offer event was sent to it from DataDevice::setFocus. When app1 is closed, the data source reference in data offer becomes invalid. so when trying to paste again in app2, segmentation faults Change-Id: I16a584e80fddaadd269b00cdf39eb405dd95b622 Task-number: QTBUG-41005 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Reduce headers inter-dependency in the QPA pluginGiulio Camuffo2014-06-161-0/+1
| | | | | Change-Id: I8b810e54531453b6a80250555c21bb0b1e6e76cc Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Discard the selection and drag source when not active anymoreGiulio Camuffo2014-04-241-1/+3
| | | | | | | | | | | | If another client sets a selection or starts a drag the active wl_data_source, if any, gets a 'cancelled' event. We must listen to this and discard the wl_data_source, else e.g. checking the clipboard content will still return the data of the source instead of the current wl_data_offer. Change-Id: I80b202baf95fbc8abe19496a991cb30bc0b78bb0 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Make classes in client privateJorgen Lind2013-12-271-6/+6
| | | | | Change-Id: Ibf400b32f78a6a0fcf0991914d2d9ad684483979 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Fix compiler warningsJorgen Lind2013-12-271-1/+1
| | | | | Change-Id: I499c50c901bff1c496b05b628f8155376b5af267 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Move wayland into a client directory not under the plugins src folderJorgen Lind2013-12-271-0/+242
And make wayland common files into a library, exporting all classes. Now there is no need to do bulild hacks to make your own version of the wayland plugin. Change-Id: Ib4872863dfb5ab3f2bc0f4a94ae16fc1e7b63b88 Reviewed-by: Andy Nichols <andy.nichols@digia.com>