summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* QNX: Fix touch positionFabian Bumberger2014-03-141-1/+1
| | | | | | Change-Id: I8e4f83f58fbb31f7cffdf74b0ce431a6fd46f13b Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* [QNX] Don't deactivate windows focusFabian Bumberger2014-02-161-6/+20
| | | | | | | | | | | When the focus changes, screen sends a focus deactivated change for the focus window. Depending on the order, this might deactivate the window focus completely. This for example leads to problems with QComboBox. Change-Id: Ia57f061a765c1f971d86d941b17f573ce9221ae1 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* [QNX] Introduce proper screen error handlingFabian Bumberger2014-01-281-69/+51
| | | | | | | | | | | | | | | | This patch adds a new function which does the error handling for libscreen calls. The patch introduces following changes: - Libscreen errors will not crash (qFatal)the application any more but rather post a warning message. -With the "flush-screen-context" option the screen_context is always flushed when a screen function is called. This enables better correlation between the time an error happens and the time it is logged. Change-Id: Ie2456e5b746dcf917d786f3b832847d2ebbe5f1e Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Roger Maclean <rmaclean@qnx.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* QNX: Add some more properties to a touch pointFabian Bumberger2014-01-071-2/+24
| | | | | | Change-Id: Ic1c889557148f112e357c3ee34199ff6d19b4a6e Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* QNX: Fix focus handling for secondary screenFabian Bumberger2013-12-121-7/+9
| | | | | | | | | | | | This patch removes the activaton aand deactivation of a window when we get the window group activated event from the navigator. This event is sent to both the primary and secondary screen and does not state if a window should be active from a Qt perspective. A window should only be active if it has screen keyboard focus. Change-Id: Ibbed0dd76a21d86f4b580265f996357a8eef5192 Reviewed-by: Roger Maclean <rmaclean@qnx.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-261-5/+103
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the conflicts in msvc_nmake.cpp the ifdefs are extended since we need to support windows phone in the target branch while it is not there in the current stable branch (as of Qt 5.2). Conflicts: configure qmake/generators/win32/msvc_nmake.cpp src/3rdparty/angle/src/libEGL/Surface.cpp src/angle/src/common/common.pri src/corelib/global/qglobal.h src/corelib/io/qstandardpaths.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxscreeneventhandler.h src/plugins/platforms/xcb/qglxintegration.h src/widgets/kernel/win.pri tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp tools/configure/configureapp.cpp Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
| * QNX: Fixed touch event positionsBernd Weimer2013-11-151-3/+10
| | | | | | | | | | | | | | | | | | Touch positions reported by libscreen have to be adjusted relative to the window position to be properly interpreted by Qt. Task-number: QTBUG-34812 Change-Id: I68744dc9da95fb1d0d1704d12154fb24c148fe03 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * QNX: Fixed "normalPosition" of touch eventsBernd Weimer2013-11-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | Pixel positions have to be set in relation to screen size in pixels, not the physical size to calculate the normal position in the range 0..1. Change-Id: I6880fb64b7c3049d657fd081b564b945399b5865 Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
| * Support native event filters for screen eventsJan Arne Petersen2013-11-051-1/+5
| | | | | | | | | | | | | | | | | | Change-Id: If0af4544191c513e64f582cece4a453c1ab5c8e7 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
| * Process screen events in the main threadJan Arne Petersen2013-11-051-0/+39
| | | | | | | | | | | | | | | | | | | | | | Screen events are still read in the screen event thread but are processed in the main thread to make it possible to support QAbstractNativeEventFilter for screen events later. Implementation is similar to the xcb platform plugin. Change-Id: I7bade3e13e51c6d70bb608727a93bbd3aabc5d47 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
| * Handle keyboard focus changeJan Arne Petersen2013-11-041-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | Call QWindowSystemInterface::handleWindowActivated when a SCREEN_EVENT_PROPERTY event for he SCREEN_PROPERTY_KEYBOARD_FOCUS property is received. Change-Id: Ic2b10c5b793dd4451adac68691296f8265a71160 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | Add support for BB10 input method frameworkRoger Maclean2013-10-251-2/+29
|/ | | | | | | | | | | | | | | | | | | | | | | | | Added input method support for the BB10 variant of Qt to the extent possible using standard Qt APIs. This adds support for text predictions and entry of languages such as Chinese. Change in interface to QQnxAbstractVirtualKeyboard was made because it is felt the new one is slightly nicer. It doesn't appear safe to assume the focus object has a particular property and in fact in my tests the code failed to work. In some cases the code uses variable and function naming at odds with normal Qt coding standards. This has been done for functions called and data provided by the BB10 input system as for those of us who need to maintain such things, it makes their meaning considerably clearer. While qqnxinputcontext_imf.cpp was used as an initial base for development one can consider the new version as largely new code. I don't believe the original version was ever complete and in any event would not compile. Change-Id: I09470801ffa237cee67da40c0b3d02ed5c77531e Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* QNX: Fix invalid screen size when attaching a second displayFabian Bumberger2013-07-021-0/+6
| | | | | | | | | | | | When attaching a display several SCREEN_EVENT_DISPLAY events might be received. SCREEN_PROPERTY_SIZE might not be populated in the first event we get, so we wait. Change-Id: I357108bb347eb92cd773d293bfe7cd462fb7e527 Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Petr NejedlĂ˝ <pnejedly@blackberry.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* QNX: normalize bracesRafael Roquetto2013-05-231-34/+19
| | | | | Change-Id: I05f140a0626e543535cc74c6f737be9be1e27a5d Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* QNX: Code cleanup: normalize 'if' macro usageRafael Roquetto2013-03-261-1/+1
| | | | | | | | | Always use "if defined" instead of "ifdef". The same is valid for "ifndef" macros Change-Id: I8e8f65e36dc636c10b3d656ce9a89ab3a664a80b Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* QNX: QQnxCursor implementation.Rafael Roquetto2013-02-281-0/+2
| | | | | | | | | | | | | | | | Implementation of QQnxCursor, a QPlatformCursor subclass. Due to the lack of a proper cursor API from the underlying OS, this class only caches the current cursor position to make sure that the QCursor class works properly. This is a backport of 290ed7f8fafd67197f773454223410bbe57fc4d3. At the time there weren't any known bugs regarding this, so it was committed to "dev" branch as a feature. Now we needed it in "stable", otherwise menus don't work correctly, due to QCursor::pos() being bogus. Change-Id: I5a4217c92a0aaed0b22b45ca3c4e0fad882e810f Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* QNX: Don't crash if we unplug the primary display.Sergio Martins2013-01-311-3/+13
| | | | | | | | | | | | | The QPA plugin assumes in several places that we have at least one QScreen. Even if patching the plugin to support 0 screens, Qt itself crashes when dereferencing a null paint device while synching the backing store. Change-Id: I2ac504a447aff811d6c07ab857340a3433557cdc Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QNX: Fix window focus problems when using QNX 6.5.0.Sergio Martins2012-11-281-0/+5
| | | | | | | | | In blackberry, activation events come through the navigator, but we might not have a navigator. Change-Id: I0d9e1a08336aa403035fdf00be46d839a83f4b58 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QNX: code cleanup, use '0' instead of 'NULL'Rafael Roquetto2012-10-131-1/+1
| | | | | | | Qt coding style uses always 0. NULL is wrong. Change-Id: I163677b512214f853677d21d75f13142fe2ca88d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QNX: Add and remove screens dynamically.James Turner2012-10-091-3/+36
| | | | | | | | Watch for display events from libscreen, and dynamically add and remove QPlatformScreens (and hence QScreens) in response. Change-Id: I56dc7019a4d4c77798a0a88451d2f3060066f5d2 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-23/+23
| | | | | | | | 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>
* QNX: Remove mouse events synthetized from touch eventsKevin Ottens2012-07-241-17/+0
| | | | | | | | | This behavior is now implemented in a finer way in QtQuick and QtWidgets, it's not needed anymore in the platform plugin. Change-Id: Iacdcd313253627fbba094abe4e9a9c1d23a431e1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
* Make sure the emulated mouse event comes lastKevin Ottens2012-07-131-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | With the recent refactoring in qtdeclarative for the handling of touch and mouse events, QQuickCanvas automatically transforms touch events in mouse events too. It means that since we do something similar in the platform plugin, in the case of QQuickCanvas the mouse event is duplicated. It it fine except that having mouse event, touch event, mouse event in that order is likely to mess the states of some elements. It happens to be the case for MouseArea which will discard the second mouse event in the case of a press, and because of that not receive the other events. By changing the order in the plugin, we ensure getting events in the following order: touch event, mouse event, mouse event. In the case of MouseArea, since the press event will be accepted with nothing in between, we'll keep receiving the other events. Note that we can't simply remove the mouse event simulation on our side, otherwise we'd break QWidget support. Change-Id: If08fe0d97c6d60d0f858b228a014d94bc86dcf6f Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QNX: Rationalise the usage of qDebug() to remove lots of #ifdef'sSean Harmer2012-05-251-30/+20
| | | | | | Change-Id: I097e4af86a6a0941f4fd7e122970f88ba536ab38 Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com> Reviewed-by: Andriy Golovnya <andriy.golovnya@googlemail.com>
* Add support for screen overlays / foreign windowsThomas McGuire2012-03-301-8/+21
| | | | | | | | | | | | | We're not the only one creating native windows. When using the multimedia API, the multimedia library creates a video window for video display. Here we need to deal with giving this video window overlay a proper z-order, otherwise it will never get visible. Change-Id: Ibff0382ebee5cda87408b91c8181a4104fc4a1a3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Forward native key codes to QWindowSystemInterfaceRafael Roquetto2012-03-301-1/+2
| | | | | | | | | | | | | Using QWindowSystemInterface::handleExtendedKeyEvent() instead of QWindowSystemInterface::handleKeyEvent(). While the former allows us to forward the native key codes to QWindowSystemInterface, the latter initializes them with 0, causing QKeyEvent::native*() to return 0, instead of the actual values. Change-Id: I596ad2e07645e091529ca514682c98d095244a73 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Move screen event processing into its own classKevin Krammer2012-03-281-0/+473
The event handler class can then be reused when we have proper BPS event support available from corelib Change-Id: Iafe645e69248597377045c711108ce0acbe3984b Reviewed-by: Sean Harmer <sh@theharmers.co.uk> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>