summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcocoaview_mac.mm
Commit message (Collapse)AuthorAgeFilesLines
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. 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: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Ensure the mouse buttons are preserved when entering a widgetAndy Shaw2012-07-031-1/+1
| | | | | | | | | | | | On Mac we have to fake the QEvent::Enter event when entering a widget so we need to ensure the buttons held down are set as part of that event otherwise it causes problems with graphicsview which will update the grabbed item based on this event. Task-number: QTBUG-19353 Change-Id: I89252a46b5edd0d82b6b1a0cf2592f72b472e5cc Reviewed-by: Nils Jeisecke <jeisecke@saltation.de> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Ensure that the IME composition is handled correctly on MacAndy Shaw2012-04-121-3/+8
| | | | | | | | | | When the language menu was shown while IME composition was underway, it would cause the composition text to be in an invalid state. Task-number: QTBUG-25107 Change-Id: Iaf06f330fb055e30c25ccc9874f15132ea000bc2 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix CJK punctuation input through input methods in OS XJiang Jiang2012-01-171-1/+7
| | | | | | | | | | In this case these string are not input through a composing process (no marked text is set) but they should not be handled by Qt key event handler. Change-Id: I9ea96c29db69d51abc6821e72a3228158012bebc Task-number: QTBUG-23216 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Cocoa: change usage of deprecated API (scrolling) in LionRichard Moe Gustavsen2011-08-101-12/+14
| | | | | | | | | | Apple changed the API for pixel based scrolling, which results in runtime warnings on the command line. This patch will make Qt use the new API. In addition, apple removed suppert for z-scrolling. Since that was never supported in Qt as well, we also remote code that handles that. RevBy: msorvig
* Merge remote branch 'qt/4.8' into fire-masterPaul Olav Tvete2011-06-061-17/+17
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/wayland/qwaylandclipboard.cpp src/plugins/platforms/wayland/qwaylandclipboard.h src/plugins/platforms/wayland/qwaylanddisplay.cpp src/s60installs/eabi/QtOpenGLu.def
| * Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | Change the flushing of the CGContext to a synchronization.Fabien Freling2011-05-181-1/+1
|/ | | | | | | | | | | | | | When many NSView are being drawn, calling CGContextFlush() is too expensive and some flickering becomes apparent. We now call CGContextSynchronize() instead. Since this solves the flickering problem, we can now call setNeedsDisplay: for items in the unified toolbar. This allows us to smootly trigger many flushings inside the unified toolbar. Task-number: QTBUG-19267 Reviewed-by: Jiang Jiang
* Fix the painting for widgets painting directly on screen.Fabien Freling2011-03-301-7/+4
| | | Reviewed-by: Jiang Jiang
* Remove the check on flushRequested.Fabien Freling2011-03-161-1/+1
| | | | | | | | | The check on flushRequested was needed since we were flushing the toolbar with the main window, but the flushing is now independent so we don't need it anymore. It is now making us skip some flushing. Reviewed-by: Samuel Rødal
* Merge remote branch 'mainline/master' into merge_rasterFabien Freling2011-03-151-2/+2
|\
| * Place cursor at the end of the selected rangeJiang Jiang2011-03-041-1/+1
| | | | | | | | | | | | | | | | | | Selected range is the range of the text that has been edited with input method, but not yet committed, normally the cursor should be placed that the end of it (or hidden). Task-number: QTBUG-17923 Reviewed-by: Morten Sørvig
| * Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-02-231-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qcocoaview_mac.mm src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def src/testlib/qtestcase.cpp
| | * Cocoa: fix crash when using a drawer with a focus widgetRichard Moe Gustavsen2011-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The crash happends when you close down an application that has a drawer that contains a widget with keyboard focus. The NSView backing this widget is then the first responder in Cocoa. This bug was a bit more hard-boiled than usual, and I can't say I truly understand whats going on. My findings are that both the drawer and the parent window both points to the same view inside the drawer as its first responder. And when deleting the drawer (togheter with the focus widget), the parent window is left pointing to a first responder that is actually deleted. Is seems that us refusing to release a view as first responder if we have no attached widget is wrong. So we choose to return YES instead, which after all makes much more sense. Task-number: QTBUG-15897 Reviewed-by: msorvig
* | | Merge remote branch 'mainline/master' into merge_rasterFabien Freling2011-02-231-588/+264
|\ \ \ | |/ /
| * | Cocoa/Alien: bugfix corner cases with popups and enter/leaveRichard Moe Gustavsen2011-02-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | It turns out that we sometimes hit a strange bug with enter/leave events when a popup is showing. If you righpress to show the popup, and then move the mouse outside the window, we get a continues series of leave events. This patch separates more the native vs alien logic for dispatching enter/leave to accommondate this problem
| * | Cocoa: disable scroll optimization for certain casesRichard Moe Gustavsen2011-01-251-4/+6
| | | | | | | | | | | | | | | | | | | | | No reason to use the optimization when only scrolling in one direction. In those cases we are better off scrolling immidiatly when requested to minimize the shuffling of scrolls and repaints done by the application
| * | Cocoa: add scroll optimization when scrolling both hor and verRichard Moe Gustavsen2011-01-241-0/+6
| | |
| * | Add support for disabling touch on to enhance scrolling in CocoaRichard Moe Gustavsen2011-01-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Mac/Cocoa, enabling touch on a widget slows down the scrolling performance of the whole application. It seems Cocoa spends some time in the background figuring out what to do with the touch events, and whether or not it should convert them to scroll/wheel events. Therefore, it makes sense to no subscribe for touch when the mouse is not over the widget, This patch implements that strategy, and the effect is huge when tested agains creator. Rev-By: brad
| * | Cocoa/Alien: let QWidget::scroll_sys handle overlapping widgetsRichard Moe Gustavsen2011-01-201-2/+3
| | |
| * | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-water-staging into ↵Richard Moe Gustavsen2011-01-171-8/+10
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | alien-squached Conflicts: src/gui/kernel/qcocoasharedwindowmethods_mac_p.h src/gui/kernel/qcocoaview_mac.mm src/gui/kernel/qwidget_mac.mm
| | * \ Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| | | * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | | | | | | | | | Reviewed-by: Trust Me
| * | | Alien implementation for the Cocoa portRichard Moe Gustavsen2011-01-171-590/+248
| | | | | | | | | | | | | | | | Give Alien on Cocoa a warm welcome.
* | | | Optimize the rendering path for the unified toolbar.Fabien Freling2011-02-151-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The over flushing of the toolbar had a huge performance impact so now we only flush the toolbar when necessary and moved the rendering out of the flushing process. Reviewed-by: Richard Moe Gustavsen
* | | | Move the flushing to [view drawRect:rect]Fabien Freling2011-01-261-23/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of flushing by grabbing the Core Graphics context, we do it directly in the drawRect: method. This approach allows us to call flush() many times and only proceed to flush when the system is ready. Reviewed-by: Richard Moe Gustavsen
* | | | Small typo fix.Fabien Freling2011-01-251-1/+1
| |/ / |/| | | | | | | | Reviewed-by: Eskil Abrahamsen Blomfeldt
* | | Fix some memory leaks.Fabien Freling2010-11-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Update the retain/release mechanism for CGContexts. Some leaks were due to unnecessary retain calls. Task-number: QTBUG-15373 Reviewed-by: Samuel Rødal
* | | Fix a namespace error and some warnings found by clangJiang Jiang2010-11-231-17/+13
|/ / | | | | | | Reviewed-by: Fabien Freling
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-10-251-4/+0
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: demos/declarative/snake/snake.qml qmake/generators/symbian/symbiancommon.cpp src/network/access/qnetworkaccessmanager.cpp src/s60installs/s60installs.pro tests/auto/qitemselectionmodel/tst_qitemselectionmodel.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp
| * [QCocoaView scrollWheel:] can end up recursing infinitely when a scrollWheel ↵Carlos Manuel Duclos Vergara2010-10-111-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | event is sent to two stacked MDI windows The problem is the fact that we were propagating the event through the class hierarchy. This means calling the super class implementation, which does nothing but pass the event to the next guy, which is the other window, which in turn does the same thing... The point is, there is no need to propagate this event on the class hierarchy. If anything, this should be propagated on the widgets hierarchy, which is already handled by Qt. Removing the code so this problem does not happen again. Task-number: QTBUG-12952 Reviewed-by: Richard Moe Gustavsen
* | Don't assing 'const Foo*' to a 'Foo*'Tor Arne Vestbø2010-10-151-1/+1
| | | | | | | | Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* | Experimental support of the unified toolbar withFabien Freling2010-10-081-1/+10
| | | | | | | | | | | | | | the raster engine on Mac OS X. Task-number: QTBUG-12615 Reviewed-by: Samuel Rødal
* | Allow QGLWidgets to draw them selves under -graphicssystem raster again...Gunnar Sletta2010-09-061-2/+5
| | | | | | | | Reviewed-by: Fabien Freling
* | Cannot enter text through character viewer on Mac (Cocoa)Prasanth Ullattil2010-08-131-1/+7
| | | | | | | | | | | | | | This text is delivered through the NSTextInput protocol. Since it was not initiated from a keyDown message, we were ignoring the insertText: message. Reviewed-by: Denis
* | Fix the issue of resizing a window with theFabien Freling2010-08-031-2/+16
| | | | | | | | | | | | raster engine on Mac OS X. Reviewed-by: Richard Moe Gustavsen
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-07-281-4/+39
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qapplication.cpp tests/auto/qfileinfo/tst_qfileinfo.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt.qdocconf
| * Drag & Drop failing in itemviews on Cocoa.Prasanth Ullattil2010-07-221-1/+4
| | | | | | | | | | | | | | | | | | While generating the QDragMoveEvent, we were always reusing the last drop action set by the user. This is not correct, we should copy the action only if a valid action set before. This is the behavior on Windows. Task-number: QTBUG-9486 Reviewed-by: Denis
| * Drag and drop cursor doesnot change on invalid drop areas (Cocoa)Prasanth Ullattil2010-07-141-3/+35
| | | | | | | | | | | | | | | | | | Previos versions of Mac OS X (< 10.6) didn't have support for such 'Not Allowed' cursors. 10.6 introduced a new method for NSCursor called operationNotAllowedCursor. This fix uses the new cusor on available platforms. Task-number: QTBUG-5186 Reviewed-by: Denis
* | Fix the CGContext on Mac OS X. Sometimes we gotFabien Freling2010-07-221-2/+2
| | | | | | | | | | | | | | | | a bad context, resulting in wrong paintings. It also unify the raster engine behavior among platforms. Reviewed-by: Jason Barron
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-07-011-0/+2
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: bin/syncqt src/gui/text/qtextlayout.cpp tools/assistant/tools/assistant/helpviewer_qwv.cpp tools/assistant/tools/assistant/helpviewer_qwv.h tools/configure/configureapp.cpp
| * When a drag is finished with on Mac, then it should delete itselfAndy Shaw2010-06-231-0/+2
| | | | | | | | | | | | | | | | | | | | On other platforms then when a drag is finished then it cleans up by calling setMimeData(0) and deleteLater() on the drag object, this didn't happen before on the Mac which meant it did not delete the QDrag objects until the parent of them was deleted thus taking up memory. Task-number: QTBUG-11613 Reviewed-by: Prasanth
* | Fix the blank areas during resize with theFabien Freling2010-06-301-6/+4
| | | | | | | | | | | | | | | | | | | | raster engine on Mac OS X. This is mainly done by reverting the commit 04e34fe3aecca482abeeabe2e31778e9102eeb08 Task-number: QTBUG-11518 Reviewed-by: Samuel
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-06-081-0/+10
|\ \ | |/ | | | | | | Conflicts: tools/qdoc3/test/qt-html-templates.qdocconf
| * Add a new qconfig feature GESTURESTasuku Suzuki2010-06-021-0/+10
| | | | | | | | | | Merge-request: 535 Reviewed-by: Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>
* | Cocoa: remove 'double' content view from window, second tryRichard Moe Gustavsen2010-06-011-1/+1
|/ | | | | | | | | | | | Up til now, we always used to create a new NSView for a top level widget, and make it a child of the windows content view. This is/should be unnecessary, as NSWindow has a method for setting the content view directly, thereby allowing for reducing the stacking level with one view. Not the biggest gain if the year, but it seems effortless to implement. And I do it as a part of Alien preparation. Rev-By: msorvig
* Crash while dragging on Mac OS X (Cocoa)Prasanth Ullattil2010-04-271-1/+2
| | | | | | | This happens only if a new drag is started while a drag operation is going on. It seems to be an unsupported operation on Mac. Reviewed-by: Fabien Freling
* Cocoa: qwidget autotest fails on setToolTipRichard Moe Gustavsen2010-04-141-7/+8
| | | | | | | | | | | | | | The reason turns out to be that we: 1. Half-way fake mouse events from QCursor::setPos 2. Don't fake mouse move upon mouse enter unless traking is on The test failed when mouse trackin was on, so that we ended up faking the same mouse move event twize (in QCursor::setPos and mouseEnter). We now do a different implementation for setPos on cocoa (so that native events will be generated), and always fake a mouse move event from mouse enter to make tooltips (and other event filters) work Reviewed-by: MortenS
* Cocoa: send mouse move event upon a mouse enterRichard Moe Gustavsen2010-04-071-10/+20
| | | | | | | | | | On all platforms, we always send a mouse move event when the mouse enters a widget (if mouse tracking is on, that is). Then macnativeevents auto test revealed that we did not do this for the cocoa port. This patch will fix this. Reviewed-by: cduclos Reviewed-by: prasanth