summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qmultitouch_mac.mm
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Added application flags to translate between touch and mouse events.Samuel Rødal2012-01-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current way we do it of having the platform or touch plugin send both mouse and touch events is not ideal. There's no good way to write an application that works sanely both on a touch-only device and on a desktop except by restricting yourself to only handling mouse events. If you try to handle touch events you don't get any events at all on desktop, and if you try to handle both, you end up getting duplicate events on touch devices. Instead, we should get rid of the code in the plugins that automatically sends mouse events translated from touch events. This change enables that by making the behaviour fully configurable in QtGui. Two new application attributes are added to explicitly say whether unhandled touch events should be sent as synthesized mouse events and vice versa, and no duplicates are automatically sent as the current situation. Synthesized mouse events are enabled by default. We also get rid of the QTouchEvent::TouchPoint::Primary flag, which was only used to signal that the windowing system automatically generated mouse events for that touch point. Now we only generate mouse events from the first touch point in the list. Change-Id: I8e20f3480407ca8c31b42de0a4d2b319e1346b65 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@nokia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@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>
* Store the primary status in the touch point flags.Laszlo Agocs2011-12-121-1/+2
| | | | | | | | | | | | | | | | | For some reason the primary bit has previously been encoded in the touch point state, even though it has nothing to do with the regular states like Pressed, Released, etc. The value is now stored in the recently introduced flags member of the touch points. This also reduces the need for error-prone internal masking of the state value. The structure used by QWindowSystemInterface::handleTouchEvent also becomes cleaner because the primary status can now be set in the flags member and the isPrimary bool can be dropped. Change-Id: I1da2cb99154afd97e1e3a5943ab115cae3a8232f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Cocoa: Fix spelling errors in comments.Morten Sorvig2011-10-031-2/+2
| | | | | | | | | | This could be the basis for a "english spelling for norwegians" course. Change-Id: I1d6de11b6673ec0a8ba3c2ff12dd8472fb467703 Reviewed-on: http://codereview.qt-project.org/5691 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: Adjust touch point rectangle by -0.5.Bjørn Erik Nilsen2011-09-201-1/+8
| | | | | | | | | | | The actual touch point is supposed to be in the center of the rectangle, and since the rectangle is 1x1 it means we have to subtract 0.5 from x and y. Change-Id: Ica4aba26dbe61328c8e7cbdcf8b02c96e2f41a40 Reviewed-on: http://codereview.qt-project.org/5256 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
* Cocoa: Add helper functions for NSPoint <-> QPoint(F) conversion.Bjørn Erik Nilsen2011-09-201-2/+2
| | | | | | | | | | ... and use [NSEvent mouseLocation] as global mouse position rather than relying on QCursor::pos() (which is buggy at the moment). Change-Id: Ieb8000089d0d824bed89abd8b2add9e28273f227 Reviewed-on: http://codereview.qt-project.org/5254 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
* Cocoa platform plugin: Reduce multitouch area to be one pixel.Bjørn Erik Nilsen2011-09-191-1/+2
| | | | | | | | | | Mac only support multitouch points, hence width/height 1. Also add comment about performance related to multitouch events. Change-Id: I307261492366e361e17f9edf446f456c07c87a22 Reviewed-on: http://codereview.qt-project.org/5162 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
* Cocoa platform plugin: update headers for multitouch.Bjørn Erik Nilsen2011-09-191-1/+1
| | | | | | | | | | See commit: b888bf1b515b47bc12dfaeac06f33af762ce0372 (Moved multitouch code from gui/widgets/ to plugins/platforms/cocoa) Change-Id: I7c71f4d858cba4918392d477c6597b48e271ea99 Reviewed-on: http://codereview.qt-project.org/5154 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* Mac: Adapt multitouch code for cocoa to QWindowSystemInterface.Bjørn Erik Nilsen2011-09-191-23/+17
| | | | | | | Change-Id: I4a80ed8a497dfb1b8b477e4a40ec91a16f1bb541 Reviewed-on: http://codereview.qt-project.org/5152 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* Mac: Move multitouch support from widgets to cocoa platform plugin.Bjørn Erik Nilsen2011-09-191-0/+218
Change-Id: I91994801aefa1257e7bda51b409290f70ab9128e Reviewed-on: http://codereview.qt-project.org/5151 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>