aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow_p.h
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Move touch event compression into a functionFrederik Gladhorn2016-07-061-0/+1
| | | | | | | | | | | | | | | | | | | | | This makes it easier to understand what's going on. Change-Id: I7846178d791b12fc3b78a5790419fe7fb32601f2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge mouse handling functionsFrederik Gladhorn2016-07-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In order to clean up the pointer input handling in Qt Quick, handle all mouse events in one place. Keep the functions in QQuickWindow to allow overriding them. Change-Id: Id413d440a5ea1a77cc7b9b135790e776a7c554bf Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QQuickWindowPrivate::removeGrabber: take params for mouse and touchShawn Rutledge2016-07-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | QQuickItem::ungrabTouchPoints() wasn't intended to ungrab mouse and QQuickItem::ungrabMouse() wasn't intended to ungrab touch. This seems to make the tests more likely to pass. Change-Id: I2d39028dc8267b7c8b0e1bac721f1a12014f0b25 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | add QQuickWindowPrivate::removeGrabber()Shawn Rutledge2016-07-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal is to eventually avoid accessing QQuickWindowPrivate's own variables inside QQuickItemPrivate, and to use itemForTouchPointId instead of mouseGrabberItem. PinchArea relies on some strange behavior: when one touch point is released, it ungrabs the mouse, but keeps the touch point grab. This seems somewhat inconsistent, but for now we keep one place (QQuickItem::ungrabMouse) that does the mouse ungrab only. Change-Id: I46389475da2ecb157508e092f9f3f0cf923881e3 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Minor touch event function renamingFrederik Gladhorn2016-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename reallyDeliverTouchEvent back to deliverTouchEvent. To have one entry point for the whole touch handling, have a single function which already didn't call itself recursively: handleTouchEvent. That function optionally compresses and calls deliverTouchEvent. Change-Id: Id3624d3a2ee041cf07b47da36bb3fbb80886a676 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-301-2/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/context2d/qquickcanvasitem.cpp src/quickwidgets/qquickwidget.cpp tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp Change-Id: Idf279cb88e0df2a383489af5b6afdf04d04ae611
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-291-2/+0
| |\| | | | | | | | | | Change-Id: I70c0c672708522f7157849365cc53ee271d8e460
| | * Remove misleading out of date comments in QQuickWindowPrivateLaszlo Agocs2016-06-231-2/+0
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-54133 Change-Id: I68e41c3d6c066745058db0c15984d680d6c05ee9 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | QQuickWindow: Process a synthetic hover once per frameRobin Burchell2016-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the limitation that hover only changes when the mouse moves, and (in my opinion) is required to make hover functionality even remotely useful. QtQuick scenes are a dynamic medium, items can move (or change) frequently, so only changing this in response to a user action means it will frequently end up out of date. A very simple example of this is a ListView of delegates that each have a background set on hover: when flicking the list, it won't reset the hover to actually match the item under the mouse. This is now not a (very) expensive operation to do, as deliverHoverEvent does nothing if the item tree in question doesn't have hover enabled. [ChangeLog][QtQuick][MouseArea] Hover state is now updated once per frame. This means that MouseArea::containsMouse property will now be correct even if the mouse is not moving, but items move under the cursor. Likewise the mouse position properties and positionChanged signal will act as if the mouse had moved. Task-number: QTBUG-40475 Task-number: QTBUG-42194 Task-number: QTBUG-33982 Task-number: QTBUG-42578 Task-number: QTBUG-52537 Change-Id: Ic2dcbb45339e11c07f5c6a9c95eb7f64957968eb Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | QQuickWindow: prerequisites for handling multi-point touchShawn Rutledge2016-03-071-2/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In touchEventForItem, we want to include only touchpoints that occur inside the target item if the touchpoint is freshly pressed; but if the touchpoint is being updated or released, in most cases we want to keep sending it to the same item, because the item must be able to change state. But in sendFilteredTouchEvent, we need to check the bounds of all touchpoints. Making touchEventForItem and touchEventWithPoints static also avoids needing to get the QQuickWindowPrivate instance, since these functions do not use any private data. And we will need a version of dragOverThreshold which works with TouchPoints since it doesn't share a common ancestor class with QMouseEvent. Change-Id: I022c6bcf36382741b31baeb020d3104d502a11e8 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-191-0/+3
|\| | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickitem.cpp tests/auto/quick/qquickgridview/tst_qquickgridview.cpp tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I3cf47faa2fe567d62fffd985aeecbefe5811cc42
| * Rerender natively rendered text items when DPI scaling changes.Andreas Hartmetz2016-02-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The whole purpose of native rendering is to optimize precisely for a given pixel grid. DPI scaling can change when either settings of the current screen are changed, or when the window is moved to a different screen. Details: - add an ItemDevicePixelRatioHasChanged item change event - detect DPI scaling changes by watching screen (identity) and screen config changes - when DPI scaling changes, recursively send an ItemDevicePixelRatioHasChanged signal to all items with content - when a natively renderet TextItem catches such an event, call updateLayout() which automatically picks up the new logical DPI Task-number: QTBUG-49019 Change-Id: I9f4f8d1a7f2c172ed26c276294ab143161c4a48b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-291-0/+1
|\| | | | | | | Change-Id: Iec1b2de53c275996364c4bab0123ccb3e6e9895e
| * Preparations for re-rendering native text on DPI scaling changes.Andreas Hartmetz2016-01-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes only non-functional changes so the next patch can make mostly functional changes. QQuickText: rename q_imageLoaded() to q_updateLayout(). Says what it does, not when it is called. QQuickWindow: split QQuickWindow::forcePolish() into QQuickWindow::handleScreenChanged() and QQuickWindowPrivate::forcePolish(). Change-Id: Ief2ae30cd9f27ee8083b2c75765fb5278bde5ea8 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Updated license headersJani Heikkinen2016-01-191-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: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-0/+2
|\ | | | | | | | | | | | | Conflicts: src/quickwidgets/qquickwidget.cpp Change-Id: I3e2326bc86a9d3adaafbe3830b75ce9afa81c45b
| * Fix compilation of QtDeclarative with QT_NO_GESTURESTobias Koenig2015-09-221-0/+2
| | | | | | | | | | | | | | | | Allow to compile QtDeclarative module with QT_NO_GESTURES define enabled. Change-Id: I5335f97c675d75c71c81edcc8307338ed3571663 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | QQuickWindow: Move itemsToPolish from a QSet to QVector.Robin Burchell2015-06-061-1/+1
|/ | | | | | | | | | | | | | QQuickItem already keeps track of whether the polish flag has been set, so the set provided no functional advantage here, and would have served to pessimize processing of polish if anything - now adding items to polish and processing them becomes constant-time operations. The only operation that is pessimised is removing polish off an existing item: but this should not be too horrid, unless the number of items to polish stacks up tremendously. Change-Id: I5d26dc899570a1e0186018850c21659e1f60a6b3 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* qquickwindow: ensure we delete the correct delayed touch event after deliveryRichard Moe Gustavsen2015-05-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delivering a delayed touch event from QQuickWindow can cause the event loop to recurse (e.g if it starts a drag'n'drop). This again can cause new touch events to be delivered to QQuickWindow, and new delayed touch events to be stored. This results in the following: (1) Receive new touch press event in QQuickWindow, and set delayedTouch to be a copy of it (2) Deliver delayedTouch to items. This can cause an event loop recursion. (3) While inside the recursion, QQuickWindow receives another new touch press event. We then redeliver and delete the current delayedTouch event created in (1), and set delayedTouch to be a copy of the new event. (4) Later we return back from (2), and try to access delayedTouch (or actually a reference to the touchpoints inside it, qquickwindow.cpp:1958). Since the event was deleted in (3), we have a crash. This patch will ensure that we set delayedTouch to 0 before delivering it (so it cannot be redelivered), and that we safely delete it afterwards when it goes out of scope. By converting delayedTouch to a QScopedPointer we also ensure that the event is not leaked upon destruction. Task-number: QTBUG-45877 Change-Id: Ic372a39a0eb127abfd12cec2d51b3743ad83194d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Handle context loss in the threaded render loopLaszlo Agocs2015-03-121-0/+4
| | | | | Change-Id: I3f9219dd2fed15094c2f7d670a981406e601959b Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QQuickWindow: rename deliverGestureEvent to deliverNativeGestureEventShawn Rutledge2015-02-271-1/+1
| | | | | | | | | Native gestures are distinct from QGestureEvent, and we might need another deliver method for those eventually. Change-Id: I969c9b830d1dc7a91ffbc6cae2bdb68552a58344 Reviewed-by: Andrew Knight <qt@panimo.net> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-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. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* PinchArea: handle native gestures when availableShawn Rutledge2015-01-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | PinchArea is the first Item where we handle a QNativeGestureEvent, so QQuickWindowPrivate::deliverGestureEvent is added to deliver these events in the same way as the other deliverXEvent methods. For now there is not a separate virtual event handler in QQuickItem, because QNativeGestureEvent is not universally available, so it's necessary to handle this event type in QQuickPinchArea::event(). updatePinchTarget() contains code factored out from updatePinch() to do the necessary tranformations on the Item which was set as pinch.target in QML. So far the QNativeGestureEvents are generated only on OSX, so the behavior of the PinchArea on other platforms is unmodified. On OSX the intention is that we do not need to enable multiple-touch events in order to use any of the common 2-finger gestures, and the "feel" will be similar to that of gestures in native applications. [ChangeLog][QtQuick][PinchArea] Pinch gestures are recognized by the operating system on OSX Change-Id: I693526ea120a9144beb7666afeab6256caa73e51 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* No need to include qsgbatchrenderer_p.h from qquickwindow_p.hGunnar Sletta2015-01-141-1/+0
| | | | | Change-Id: Iba97717ae8d485c217613475524a762949ea1dae Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Introduced QQuickCustomRenderStage.Gunnar Sletta2014-10-161-0/+9
| | | | | | | | | The purpose of this concept is to make it possible to plug in an external rendering stage, like replacing the GL rendering with a composition step performed by a hardware compositor in QtCompositor. Change-Id: I994b93af443f68a77ca73cf310b5910c49e014c3 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Introduce QQuickWindowQObjectCleanupJob.Gunnar Sletta2014-08-241-0/+14
| | | | | | | | Convenience for cleaning up texture providers. Private class for now, we can maybe make it public in 5.5. Change-Id: I3489fde2a268bc988634a16f87ee558b9ac5dba2 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Remove setDefaultFormat() from QQuickWindowLaszlo Agocs2014-08-111-3/+0
| | | | | | | Replaced by QSurfaceFormat::setDefaultFormat(). Change-Id: If4e37b75ccb55d556d80b0079be89e5a521f6dbb Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix touch/mouse propagation bugsMartin Jones2014-08-011-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Filtered mouse release was not delivered if another touch started after a touchMouseId was activated. This meant that any filters expecting a release event would not receive it if another touch was made before release of the touchMouseId. We prevented a touch becoming the touchMouseId in the child mouse filters if there were any existing touches. The normal event delivery, however, does not require a single touch. Further to the previous, a touch could become the touchMouseId, even if the initial press happened when there was an existing touchMouseId. This meant that a touch could turn into a mouse when the existing mouse event was released, resulting in a new touchMouseId which hadn't been through child mouse filters. Flickable delayed press should be sent via normal event processing, as other touch/mouse events are now delivered in this way. We often called childMouseEventFilter() multiple times for each event. This is bad because the gesture handling relies on claiming a gesture in one event, then stealing it in the next. Instead of sending touch to mouse candidate points already determined to be within the item bounds and already transformed, we sent all of the points to the mouse recipient. PinchArea did not store the starting position at the original touch points, so other items could pass the dragThreshold before PinchArea and steal a gesture meant for PinchArea. Task-number: QTBUG-40330 Change-Id: Ic0009c176d3d1cb7cff0b5eda076a2c3ca864136 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* QQuickWindow: fix resetOpenGLState handling of vertex arraysGiuseppe D'Angelo2014-07-311-0/+4
| | | | | | | | | | | In the core profile it's forbidden to set vertex attributes (via glVertexAttribPointer and similar) when there's no VAO bound. Similarly, if there's a VAO bound when calling resetOpenGLState, then we need to unbind it or those operations will affect its status. Change-Id: Id7db028ddde9f9429f5a210b8b3d1468888dbce4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Introducing QQuickWindow::scheduleRenderJob()Gunnar Sletta2014-07-291-0/+9
| | | | | | | | | [ChangeLog][QtQuick][QQuickWindow] Added QQuickWindow::scheduleRenderJob(), a convenience alternative to the equivalent signals for one-shot tasks. Change-Id: I5e4f0d67d5223f7fd77bca394e2a85810fadd335 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Store information about focus reason in QQuickWindowPrivateBerthold Krevert2014-05-061-0/+2
| | | | | | | | | | | | | QtQuickControl's Desktop style needs to know whether the last focus change was requested by keyboard or not. With this information the Desktop style is able to set the QStyleOption accordingly. Without the flag, some of the QStyles (QFusionStyle, QGtkStyle) don't render a focus rectangle. This patch is needed by #change,84389 in QtQuickControls Change-Id: Ia06f56b018cd35eea933892a4c50e0aa7328042d Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
* Compress touch events in QQuickWindow.Gunnar Sletta2014-05-051-1/+5
| | | | | | | | | | | | | | Instead of sending multiple touch updates per frame, we store the last one and flush the pending events just before we enter into the scene graph sync phase. [ChangeLog][QtQuick] QQuickWindow will compresses touch events and delivers at most one touch event per frame. Done-with: Robin Burchell <robin.burchell@jollamobile.com> Change-Id: Ia0169bc4a3f0da67709b91ca65c326934b55d372 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Add defaultSurfaceFormat to QQuickWindowLaszlo Agocs2014-03-201-0/+3
| | | | | | | | | | | | | | | | | | | | This static function can be used to set a surface format that is then picked up by all QQuickWindows, including the ones instantiated from QML. This introduces the ability to request higher OpenGL versions, core profile and other options also for windows that are created from QML via the ApplicationWindow element in Quick Controls applications. [ChangeLog] Added QQuickWindow::setDefaultSurfaceFormat() to set a surface format that applies to all Quick windows, including the ones created from QML. The OpenGL shading language version is now exposed to QML too in order to allow components to provide the correct shader source so shader effect items. Task-number: QTBUG-36392 Change-Id: I75a4718243d835894461f7ee0b4a383988840f9b Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Consolidate context creation failure handling in Quick.Friedemann Kleint2014-03-131-0/+5
| | | | | | | | | Add QQuickWidget::sceneGraphError() equivalent to QQuickWindow::sceneGraphError(), move message formatting code to QQuickWindowPrivate. Change-Id: I18cd4d7e0f6ee1011c29375218dc6a044b0d2cf2 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* QQuickWindow cleanup: Remove forceRendering flagPaul Olav Tvete2014-03-121-1/+0
| | | | | | | | | | | forceRendering was introduced for QQuickWidget, but QQuickWidget now has full control of when the rendering functions are called. It makes more sense to not call the QQuickRenderControl functions, than to set a flag on QQuickWidget that decides whether those functions have any effect. Change-Id: I69819b13000120c04cecd1a467c08e8df9330df8 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* QQuickWindow: fix content item sizeJ-P Nurmi2014-02-281-1/+0
| | | | | | | | | | | | | | | | | | | | Resize content item in QQuickWindow::resizeEvent() instead of using signals and slots. The signal-slot connections were only established when child items were added in QML. It should work in C++ too, since QQuickWindow and QQuickItem are part of the public C++ API and using them in C++ is a perfectly valid use case. Resizing the content item in resizeEvent() is not only faster than using signals and slots, but also in theory a bit more flexible as one would be able to override the event handler and implement their own layouting. Task-number: QTBUG-36938 Change-Id: Id05d4cf6d547021803050633e6f0a3359129a9f3 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Introduced a few more signals to QQuickWindow.Gunnar Sletta2014-02-251-0/+2
| | | | | | | | | | | | Also marked the new afterAnimation() signal as \since 5.3 and introduced proper revisioning on the new signals. [Changelog][QtQuick] Added QQuickWindow::afterSynchronizing(), openglContextCreated(), sceneGraphAboutToStop(). Useful for deeper integration with the rendering. Change-Id: I5532b310506c2432325595e55ef9307b8934abee Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add an error signal to QQuickWindowLaszlo Agocs2014-02-211-0/+2
| | | | | | | | | | | | | | When nothing is connected to this signal, an error will be printed or, in case of Windows, a message box will be shown. If there is something connected, it is up to the application to handle the error. [ChangeLog] Added a new sceneGraphError() signal to QQuickWindow which applications can use to detect errors like OpenGL context creation failures and react in their own custom ways. Task-number: QTBUG-36138 Change-Id: I33b1e5e0e3f25872af67c5bb5ae937e3470b25f3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Introducing QQuickWidgetLars Knoll2014-02-171-1/+4
| | | | | | | | | | | Renders into an FBO, and provides a texture that is composed by the QPA/widget kernel compositor. Also introducing QQuickRenderControl, which is private API for now. Change-Id: I710c16e1506124a17f91e87344496471803a448b Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Visualization modes for rendering.Gunnar Sletta2014-01-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two ways of setting this right now. One is to set it on startup using an environment varible. QSG_VISUALIZE= "batches" - Visualize batchtes in the renderer. Merged batches are drawn with solid color and Unmerged batches are drawn with a diagonal line pattern. Few unique colors means good batching. Unmerged batches are bad if they contain many individual nodes. "clip" - Visualize clipping as red areas on top of the scene. "overdraw" - Visualize all items in 3D to highlight overdraws. This mode can also be used to detect geometry outside the viewport to some extent. Opaque items are rendered with a green tint while translucent items are rendered with a red tint. The bounding box for the viewport is rendered in blue. Opaque content is easier for the scenegraph to process and it can also be faster to render on some hardware. "changes" - Changes in the scenegraph are visualized with a flashing overlay with a random color. Changes on a primitive is visualized with a solid color while changes in an ancestor, such as a matrix or opacity changes is visualized with a pattern. The second way to set the visualization mode is to set it at runtime through QString QQuickWindowPrivate::customRenderMode. This "API" is string based so it is not tied to the batch renderer and in theory can support other custom renderers. The visualized elements do not respect clipping and rendering order is arbitrary. Change-Id: I31efbe53fc905145bf48080ede3e36945cb60dcf Reviewed-by: Michael Brasser <michael.brasser@live.com>
* QQuickWindow: Make sure popups receive key events on MacGabriel de Dietrich2014-01-151-0/+2
| | | | | | Change-Id: Ifaf96e567e735d9a837eaef798061bf08fc4a752 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix touch to mouse synthesis/propagation.Robin Burchell2013-12-131-0/+1
| | | | | | | | | | | | | Having mouse events synthesised from both QtGui and internally in QtQuick is not a great way togo about things, especially when QtGui doesn't have the same degree of knowledge as QtQuick about the items in the scene. Thus, we now accept all events inside QtQuick to block QtGui synthesis, which should fix a significant amount of edge-case touch breakage/bad behavior. Change-Id: I14e1c87761c8f43160049b5e6f9da15b4e5edbb7 Done-with: Martin Jones <martin.jones@jollamobile.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QQuickWindowPrivate: implement clearFocusObjectRichard Moe Gustavsen2013-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Ref change: cfa85c7 (qtbase) Implement QQuickWindowPrivate::clearFocus() to enable platform plugins to remove focus from the focus object when the virtual keyboard closes. On mobile platforms line edits etc are not supposed to be drawn with focus and blinking cursors unless the virtual keyboard (or another keyboard) is open. With the new virtual QWindowPrivate::clearFocus() the platforms can remove focus without deactivating the whole window. The old implementation on iOS deactivated the whole window when the keyboard was closed. But this was unfortunate, especially in QtQuick, since a qquicktextinput would not get active focus unless the window was active. But the platform would not activate the window unless the keybaord was open. So, a classic chicken - egg problem. Change-Id: I62e652a3cd85f1313713c5d086d9537cc2f9826f Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Use one render loop per QQuickWindowGunnar Sletta2013-10-301-1/+1
| | | | | | | | | | | | | | | | | | | See the task for the full reasoning behind this patch. The threaded renderloop has been refactored to have one window per thread. This is mostly a simplification of the current code path where for loops over multiple windows are turned into if (window). The QSGContext has been split into two classes, QSGRenderContext for which there is one per OpenGLContext. The rest of the patch is name changes and a couple of cleanups in the hopes of simplifying this change. Task-number: QTBUG-33993 Change-Id: I31c81f9694d7da7474a72333169be38de62613c4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Animators - Render thread animation systemGunnar Sletta2013-09-211-0/+2
| | | | | | | | | | | | This introduces 6 new QML types for animating state in the scene graph when the UI thread is blocked. The QObject property being animated is updated after the animation completes. It works also with the "windows" and "basic" render loops, but offer litte benefit then compared to in the "threaded" case. Change-Id: Ic19e47c898c0b8bd53e457db922b3c9c457c8147 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Expose drag threshold in MouseAreaJens Bache-Wiig2013-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | In several cases such as for creating a Slider, it is useful to have a 0 pixel threshold in order to initiate a drag operation. We have previously hardcoded this to a platform dependent (usually 10 pixel) value for MouseArea. Note that we have no way of indicating the version/revision number in a grouped property for documentation at the moment. In addition we deliberately had to remove the REVISION from the property because it is blocked by QTBUG-33179. However, since this is not a user-creatable type it should not cause any issues in practice. This patch adds MouseArea.drag.threshold in order to improve on this. Change-Id: Ia4871e64fab39e30c4494f00be99ad38cdd630df Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Allow QtQuick private headers to be used with QT_NO_KEYWORDS.Jocelyn Turcotte2013-09-121-1/+1
| | | | | | | | | | | This is necessary for the QtWebEngine module. This also adds an empty nokeywords test using the same mechanism as qtbase/tests/auto/tools/moc/no-keywords.h to find conflicts at compile time. Change-Id: I9df541720797dd61f078178c2af68ead18ff8bfe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add support for external drag and drop in Quick items.Chris Meyer2013-09-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add dragType enums with values of None, Automatic, Internal (default). Setting to Automatic allows startDrag to be called automatically. Setting to Internal (default) retains old behavior. Add mimeData to Drag item to enable external drags. Call startDrag to start drag manually or change from internal drag to external drag. Added events dragStarted and dragFinished that get invoked from startDrag. Mime data must be specified in the mimeData property as mime-type / data pairs. Moved QQuickDrag from qquickmousearea* files to qquickdrag* files to reduce header interdependencies that caused linking errors in other modules and also to improve code organization. Allow DropArea to receive and process external data. Introduced new variable containsDrag to QQuickDropAreaPrivate. This replaces mimeData which was previously being used to determine if a drop operation was currently occurring. The problem was that mimeData was being externally destructed. Also introduced accessor methods for getting color, html, image, text, and urls out of the drop. This facilitates dropping of external data of those types onto a DropArea. Added example quick/externaldraganddrop. Task-number: QTBUG-27498 Change-Id: I1420df7c161ea3399e49a23305273e106baa246f Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>