summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbdrag.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp src/network/access/qnetworkaccessmanager.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h src/widgets/widgets/qlineedit_p.cpp src/widgets/widgets/qlineedit_p.h src/winmain/winmain.pro tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp tools/configure/configureapp.cpp Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
| * QXcbDrag: forward mouse release event to initiator windowAlberto Mardegan2016-05-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The mouse release event which ends the drag and drop operation must be forwarded to the window where the drag started, and not to the QShapedPixmapWindow, which is not supposed to handle input events. Task-number: QTBUG-52541 Change-Id: I24a7c7b331a06342ac28b420ff9467aa05fe00dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-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: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* xcb: Fix DnD for separate X screensAlexander Volkov2015-10-091-1/+1
| | | | | | | | Recreate QShapedPixmapWindow when the cursor goes to another X screen. Change-Id: Ifd4c4281971b23abc45a9f6c0509832a45c31521 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* xcb: Always send dnd events to the proxy window if it existsAlexander Volkov2015-09-221-1/+1
| | | | | | | | | The standard http://www.newplanetsoftware.com/xdnd/ says: "The only place where the proxy window should be used is when checking XdndAware and in the calls to XSendEvent()". Change-Id: I62e504ba52ec7ec2a941c53a84889bb3eb4b4cc1 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fix highdpi drag-n-drop for X11Paul Olav Tvete2015-07-301-9/+8
| | | | | | Task-number: QTBUG-46615 Change-Id: Iad548e62a580d6fbd15b7a826116a53ce23b4b8b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Remove QT_DEVICE_PIXEL_RATIO support from xcbPaul Olav Tvete2015-07-291-0/+1
| | | | | | | | It will be reintroduced as a cross-platform feature. Task-number: QTBUG-46615 Change-Id: Ia6d03275018b2a25ebed438fe51f15e491f1c3ff Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | 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. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-101-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro src/gui/image/qimage_conversions.cpp src/gui/opengl/qopenglextensions_p.h src/gui/text/qtextengine.cpp src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/eglfs/qeglfshooks_stub.cpp src/plugins/platforms/eglfs/qeglfsscreen.cpp src/plugins/platforms/eglfs/qeglfswindow.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp src/plugins/platforms/windows/qwindowsnativeinterface.cpp src/plugins/platforms/windows/qwindowsscreen.cpp src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/windows/qwindowswindow.h src/plugins/platforms/xcb/qxcbdrag.h src/widgets/itemviews/qabstractitemview.cpp src/widgets/kernel/qwidget.cpp src/widgets/util/qsystemtrayicon_p.h tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp Thanks to Friedemann Kleint for resolving the qwindowsfontdatabase.cpp conflicts. Change-Id: I937232c30523d5121c195d947d92aec6f129b03e
| * Fix drag and drop regressionGatis Paeglis2015-01-191-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix regression introduced by e4becdc3d310a0dd1a6d34d0796a52b21dedeb2d Add QPlatformDrag::ownsDragObject() function, QDragManager can use the return value of this function to decide if it should take care of deleting QDrag object or platform plugin will take care of deleting QDrag. XCB platform plugins uses async dnd data delivery mechanism. It allows user to drop something and then continue working with the assurance that the target will get the data regardless of how slow the network connections are, which means that a source window should preserve QDrag data until dnd has finished. Change-Id: I1fbad7380cddec98b756698993dd397409833150 Task-number: QTBUG-43436 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-031-7/+7
|/ | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-03-241-1/+1
|\ | | | | | | | | | | | | Conflicts: src/gui/image/qjpeghandler.cpp Change-Id: I9db3acea7d5c82f5da679c8eaeb29431136665f0
| * [XCB] Fix crash in QML drag-and-dropGatis Paeglis2014-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | Use QPointer to make sure that we are not trying to destroy already deleted object. Task-number: QTBUG-35702 Change-Id: Ib746996787488e636f25e6ea5be0571607ee2ded Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | xcb: replace inefficient uses of QList with QVectorMarc Mutz2014-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | xcb atoms are uint32s, so a QList of them wastes 50% memory on 64-bit platforms. Other parts of the code already store xcb_atom_t's in QVector, so use QVector everywhere (also leads to less code expansion). Change-Id: Ib4afb35e499577a7509d04a18b830d9b31f6abd0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | xcb: replace a use of an inefficient QList with QVectorMarc Mutz2014-02-261-2/+1
|/ | | | | | | | | | The Transaction type is larger than a void*, so better use a vector to hold them. Change-Id: Ie2c00d053f67addbce6fd8107f659c56ccdd37aa Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move QBasicDrag and QSimpleDrag to QtGui.Samuel Rødal2013-05-301-1/+1
| | | | | | | | | | | | These are useful as default implementations of QPlatformIntegration::drag(), instead of having it return 0 which will lead to crashes in Qt Quick 2 and widgets applications that use drag and drop. Task-number: QTBUG-31288 Change-Id: I70efa139306ced5d879def0f74e3a72d3bcd64f7 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Don't send QMouseEvent events from the QXcbDrag::timerEvent()Gatis Paeglis2013-05-131-2/+0
| | | | | | | | | | | | | | | | | | This is not needed. The DnD initiated scrolling is done by installing an eventFilter which forwards all MouseMove events to the QGuiApplicationPrivate::processDrag which creates and forwards all the necessary QDrag* events. QAbstractScrollArea has its own logic in the timerEvent() to make the view scroll when the pointer is standing still on the edge and the drag process is still ongoing. With the current implementation, widgets (during the DnD) were receiving DragMove events even when the pointer was standing still outside auto scroll areas. Task-number: QTBUG-28171 Change-Id: I355d88f3eab0ad39f916f84d66f5d0af7c0ff93e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Simplify transaction expiry mechanismGatis Paeglis2012-10-131-1/+6
| | | | | | | | | | | | | | | | | | | | | This patch makes transaction mechanism less scattered around and conforms to the xdnd specification: Don't block and keep a history of previous data. This can be very difficult to implement, but it is clearly the ideal behavior from the user's perspective because it allows him to drop something and then continue working with the assurance that the target will get the data regardless of how slow the network connections are. When the source receives XdndFinished, it can remove the item from its history, thereby keeping it from getting too large. The source must also be prepared to throw out extremely old data in case a target malfunctions. I assume that 10min for drag-and-drop operation can be considered 'extremely' old data. Change-Id: I73dcd21aee3ad188d2260e49d80824da6ba040ab Task-numer: QTBUG-14493 Reviewed-by: David Faure (fixes for KDE) <faure@kde.org> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Stop delivering messages when drop has occurred.Gatis Paeglis2012-10-021-1/+1
| | | | | | | Task-number: QTBUG-27406 Change-Id: If14c108060ad6de70991658f0e0249eb544b87a0 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Retrieve drop data with a proper timestampGatis Paeglis2012-10-021-0/+2
| | | | | | | | | | | Occasionally drag-and-drop was returning empty mimedata due to using wrong value for timestamp. Accoring to the xdnd specification we must use timestamp from XdndPosition or XdndDroptime for retrieving the data. Task-number: QTBUG-27367 Change-Id: Iadb6b6989cfc4e8ab241e2fd0ded59355108f22f Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Use QPointer instead of QWeakPointer.Stephen Kelly2012-06-051-1/+2
| | | | | | | | The use of QWeakPointer for tracking QObject pointers is to be deprecated. Change-Id: If460ca7f515db77af24030152f4bd56e1a5fae7c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix xcb plugin compilation for -qconfig largeTasuku Suzuki2012-05-261-0/+4
| | | | | | Change-Id: I1ee1fb9c140396e83272d607ee4dd63ce2c50b8d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* XShaping drag and drop fixesAlbert Astals Cid2012-05-101-1/+1
| | | | | | | | No shaping rectangles means no interaction with the window The shaping rectangles are based on the window coords, so need to substract the window coords when checking for the point Change-Id: Ic9004a8ec0f447cddcd1b4324d9fd60a94787cb9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Expose QPA API under qpa/*Girish Ramakrishnan2012-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reasons for doing this are: 1. _qpa.h end up in the master QtGui include file. QtGui is meant for userland applications. qpa code is neither binary nor source compatible. Inadvertant use of QPA api makes the user code binary-incompatible. 2. syncqt creates forwarding headers for non-private header files. This gives people the impression that this is public API. As discussed on the mailing list, even though QPA api is internal and subject to change, it needs to treated differently from private headers since they will be used by in-qtbase and out-of-qtbase plugins. This commit does the following: 1. The _qpa in QPA header files is dropped. 2. syncqt now treats any file with qplatform prefix as a special file and moves it to qpa/ directory. The recommended way of using QPA API in plugins is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API from multiple modules (for example, qplatformfoo might be in QtPrintSupport) 3. The user needs to explicitly add QT += <module>-private to get access to the qpa api. 4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo includes. This commit does not change the cpp filenames. This requires a more careful merging of existing non qpa cpp files and existing cpp files on a case by case basis. This can be done at anytime. The following files are not renamed as part of this changed but will be fixed as part of a future change: src/gui/kernel/qgenericpluginfactory_qpa.h src/gui/kernel/qgenericplugin_qpa.h src/gui/kernel/qwindowsysteminterface_qpa.h files were renamed using for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done includes were renamed using script for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \ -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \ -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \ -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \ $file done Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Refactor the QPA dnd interface.Friedemann Kleint2012-02-291-19/+26
| | | | | | | | | | | | | | | - Give QPlatformDrag a synchronous drag() function returning the Qt::DropAction - Move the base functionality for asynchronous event handling to the platformsupport library as QBasicDrag (extendable base class handling drag icon and providing new virtuals) and QSimpleDrag (sample implementation for drag within the Qt application). - Change the Windows implementation accordingly. - Change XCB to be based on QBasicDrag. - Clean up QDragManager. Change-Id: I654f76f0e55a385ba189bd74f3ceaded6a8fe318 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fixes to the Xdnd code in xcbLars Knoll2011-09-211-0/+1
| | | | | | | | | | Make sure we move the drag pixmap when required, and readd some commented out code from Qt 4.x. Change-Id: Ib4302b394f4ac7b966d0146267651b9c3860c62b Reviewed-on: http://codereview.qt-project.org/5262 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* cleanups codeLars Knoll2011-06-071-6/+3
| | | | | | | Make QXcbClipboard and QXcbDrag a QXcbObject to simplify the code. Use the predefined atoms in xproto.h instead of our own defines.
* Implement XDnD in the xcb pluginLars Knoll2011-06-071-3/+42
| | | | | | | | | Ported most of the code to support dragging from qdnd_x11.cpp to xcb. Some features are still not working 100% correct, but it's becoming usable. Reviewed-by: Samuel
* X11 DnD implementationLars Knoll2011-06-071-0/+122
Initial code for DnD on X11. Only Xdnd based, Motif DnD is being ignored. The code is currently limited to dropping stuff onto the application. Starting drags is not yet implemented. Reviewed-by: Samuel