summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcocoaview_mac.mm
Commit message (Collapse)AuthorAgeFilesLines
* Fixed compilation with QT_NO_WHEELEVENTDenis Dzyubenko2010-02-101-0/+3
| | | | Reviewed-by: Prasanth
* Cannot drag actions in Designer on Mac OS X/Cocoa.Prasanth Ullattil2010-02-101-1/+1
| | | | | | | | | | QMimeData sub classes reimplementing the formats() might not expose the temporary "application/x-qt-mime-type-name" mimetype used by DnD. So make sure that the NSDragPboard PasteBoard will contain this dummy mime type. Task-number: QTBUG-7981 Reviewed-by: mortens
* Improve raster graphics system performance on Mac (second try).Morten Johan Sørvig2010-02-041-4/+5
| | | | | | | | | | | | | | | | | | | This fixes the qmlviewer "sluggish animations and lost mouse events" issue by making sure we don't block and wait for for the screen refresh when flushing the backing store to the screen. NB: This commit fixes build issues found in f5f62c0bed. Review: msorvig Details: - Don't force repaints, flush the backingstore in response to a Cocoa paint/display events only. - Flush once per window. - Get the CGContext from the window (don't create a new one) - Don't call CGContextiFlush on the context.
* Carbon: crash problem in QWidgetPrivate::hide_sys, v2Richard Moe Gustavsen2010-01-291-0/+2
| | | | | | | | | See change: f842ec12706. Needed some ekstra checks for the cocoa port as well. Task-number: QTBUG-4227 Reviewed-by: Prasanth (cherry picked from commit ebf9c943b789bb4ce1e1222ed17cc37bd0b1f1fe)
* Cocoa: Fix painting errors on QGLWidget resizing.Morten Johan Sørvig2010-01-201-1/+1
| | | | | Enable the patch in my previous commit. (remove "if 0")
* Cocoa: Fix painting errors on QGLWidget resizing.Morten Johan Sørvig2010-01-081-0/+7
| | | | | | | Revby: Trond We need to update the GL context syncronously during the resize to prevent flicker. Use the existing MacGLWindowChange machinery to do that.
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Drag and drop icon not updated correctly in Cocoa.Prasanth Ullattil2009-12-211-3/+6
| | | | | | | | | | QDragMoveEvent is compressed using the answer rect in QCocoaView. The result of the last sendEvent is saved, so that we dont have to generate a new event always. This saved result was not updated correctly when the event was ignored. Task-number: QTBUG-5186 Reviewed-by: Richard Moe Gustavsen
* Fixed wheel event delivery in graphicsview.Denis Dzyubenko2009-12-161-1/+1
| | | | | | | We don't need to flip the y-coordinate of window- and view-local coordinates because they are flipped already. Reviewed-by: Prasanth
* Ensure the button state is correct when creating a QWheelEvent on Mac.Andy Shaw2009-12-031-1/+1
| | | | | | | | | On Mac when we receive a scrollWheel event on Carbon or Cocoa then we need to use QApplication::mouseButtons() in order to ensure the QWheelEvent has the right button states set. This is because the buttons state information is not passed in the native event at all. Reviewed-by: MortenS
* Improved mouse wheel event delivery on Mac.Denis Dzyubenko2009-12-031-2/+9
| | | | | | | When a popup is open we should not deliver wheel events to widget outside of the popup - native Cocoa applications don't do that. Reviewed-by: Richard
* Improved implicit mouse grabbing on Cocoa.Denis Dzyubenko2009-12-021-6/+9
| | | | | | | | This improves 106121a74bca32a6411b9ca968ee415f8bdfbff1 which was incomplete and didn't work properly for comboboxes (or in general - when a popup window opens due to a mouse press). Reviewed-by: Prasanth
* Fixes implicit grabbing in Qt/CocoaDenis Dzyubenko2009-11-241-30/+21
| | | | | | | | When delivering mouse events in Qt/Cocoa set the implicit mouse grabber and deliver the event to it and do not try to propagate the event to the parent view. Reviewed-by: Prasanth
* Mac: Make gestures available when building Qt against SDK < 10.6Richard Moe Gustavsen2009-11-231-2/+6
| | | | | | | | | | | We build the release packages for Carbon against the 10.4 SDK. This means that the constants used for dealing with gestures are missing, and currently the implementation will be ifdeffed out. This patch defines these constants when building with an SDK < 10.6. Gestures will therefore work when running applications on 10.6. The same fix is also implemented for cocoa. Rev-By: MortenS
* Incorrect DropAction returned by QDrag::exec() on Cocoa.Prasanth Ullattil2009-11-201-1/+1
| | | | | | | | | | The action performed by the latest drag and drop operation is stored in the global DnDParams structure. The QDrag::exec() return value has to be fetcted from this global variable instead of the temporary copy on stack. Commit 0d231c32cc7670d356d486b13648cb5bd471ffef broke this. Task-number: QTBUG-6001 Reviewed-by: Denis
* Ensure that button returns 0 for mouse move eventsDean Dettman2009-10-291-4/+3
| | | | | | This was a platform regression for the cocoa platform Reviewed-by: Prasanth
* Implement support for wheel delta with finer resolution than 15 deg.Richard Moe Gustavsen2009-10-271-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | At the moment, Qt, in many places, does not really understand that a mouse wheel, or touch pad, might operate on a much higher granularity than 15 degrees (that is, a delta of 120). This is clear disadvantage on mac, since the mighty mouse, and track pad, got a resolution that is close to 1 degree. This is called pixel scrolling. This patch first and formost changes the implementation of QAbstractSlider::wheelEvent to _really_ understand what to do when delta is less than 120. Rather than accumulate delta until 120 is reached, then scroll with a value equal to: offset * step * QApplication::wheelScrollLines (default = 3), we multiply offset directly, before waiting for 120. This means that event tough offset is below 120, multiplying it with wheelScrollLines and step will very often give a value over 120, menaing we can scroll much earlier and _much more_ fined grained. This also fixes some auto tests that was ifdeffed out because of specialised mac code written inside this function from before. (NB: we still plan to introduce a new event for pixel scrolling, perhaps for Qt-4.7) Rev-By: Andreas Rev-By: denis
* Remove debug outputEskil Abrahamsen Blomfeldt2009-10-221-1/+0
| | | | | | Oops. Reviewed-by: Trust me
* Honor graphics system on Mac/Cocoa when exposing and resizing windowEskil Abrahamsen Blomfeldt2009-10-221-0/+8
| | | | | | | | | | | | | | When exposing or resizing a previously hidden window on Cocoa, we would go through the CoreGraphicsPaintEngine even when a different graphics system was set. This was because there were two different paths from the windowing system into our paint event. The one going through the virtual drawRect function in QCocoaView did not honor the graphics system. This patch makes sure the backing store is used for these types of events as well. Done with: Gunnar Reviewed-by: MortenS
* Merge commit 'origin/4.5' into origin/4.6Olivier Goffart2009-10-151-11/+11
|\ | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qcocoaview_mac.mm src/network/access/qhttpnetworkconnection.cpp src/opengl/qgl_qws.cpp src/opengl/qglpixelbuffer_egl.cpp
| * Fix a crash in cocoa when a QMessageBox is destroyed from dropEvent()Prasanth Ullattil2009-10-121-11/+11
| | | | | | | | | | | | | | | | | | The gobal variable which stores the current mouse event can be updated before dragImage() call(blocking) is finished. So make a local copy of the information required by the QDragManager::drag(). Task-number: QTBUG-4814 Reviewed-by: MortenS
| * Update license headers again.Jason McDonald2009-09-081-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Made Mac Cocoa use the input method hints when deciding on IM.axis2009-10-151-1/+4
| | | | | | | | | | | | | | | | | | New behavior is to turn them off when inputting numbers or hidden text, which is the way it was in Qt 4.5. Task: QT-1938 Task: QT-2257 RevBy: Prasanth Ullattil
* | Fix: Abstract slider does not understand wheel events properlyRichard Moe Gustavsen2009-10-011-8/+12
| | | | | | | | | | | | | | | | | | | | | | A wheel event contain delta values that describe the rotation angle the wheel was rotated (in 1/8 of a degree). For some mouse devices (thinking of mac mighty mouse/trackpad) the resolution is better than the standard 15 degrees. The Qt docs describe how to deal with this. But abstract scrollbar does did follow this recipe, but it does now with this patch. Reb-By: prasanth
* | QWheelEvent not working on Cocoa 64BitPrasanth Ullattil2009-09-281-3/+3
| | | | | | | | | | | | | | | | | | The patch which added support for smooth scrolling will work only on 32 bit builds. The new methods (e.g. deviceDeltaX) of the NSEvent were added with the float return type. This should be of CGFloat type instead, which is different from float on 64 bit builds. Reviewed-by: Trust Me
* | Mac, Cocoa: add support for device pixel scrolling (wheel event)Richard Moe Gustavsen2009-09-251-10/+25
| | | | | | | | | | | | | | | | | | This patch makes use of the rather hidden API on Mac for accessing the new mouse wheel event type. This will make scrolling with Mighty Mouse or TrackPad look much more slick. Rev-By: prasanth
* | Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Revert ed00fff3cb.Morten Sorvig2009-09-031-10/+1
| | | | | | | | | | | | | | This caused dublicate key events in come cases, for example in the Qt Creator quick serach line edit. RevBy: TrustMe
* | Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Gestures: Implement swipe gestureRichard Moe Gustavsen2009-08-271-1/+8
| | | | | | | | Note: if this fails building on any platform, talk to Denis!
* | Mac: Fix Imageviewer example, and bugfix gesturesRichard Moe Gustavsen2009-08-271-1/+1
| | | | | | | | Rev-By: denis
* | Cocoa: bugfix for autocads plugin projectRichard Moe Gustavsen2009-08-251-0/+9
| | | | | | | | | | | | | | Seems like the QMacNativeWidget was almost not testet at all. It all breaks down when embedding QLineEdits (with respect to focus). This is a first patch that fixes this issue.
* | Flickering "Whatsthis" pointer in CocoaPrasanth Ullattil2009-08-201-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Since mouse tracking is always enabled on all QCocoaView-s, we are getting mouseMoved events for both parent and child (if mouse is over the child). In such cases the mouseMoved events are ignored for the parent view. We are using the native NSCursor stack for setting the override cursor. The current implementation for changeOverrideCursor is modified to keep this stack in sync with Qt's internal list. Task-number: 258173 Reviewed-by: Morten Sorvig
* | Added support for gestures on Mac OS X CarbonRichard Moe Gustavsen2009-08-181-5/+5
| |
* | remove QT_RASTER_PAINTENGINE and QT_RASTER_IMAGEENGINE defines as they areGunnar Sletta2009-08-171-36/+31
| | | | | | | | | | | | legacy and completely pointless... Reviewed-By: Eskil
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Cocoa: Add support for native gesturesRichard Moe Gustavsen2009-08-061-10/+44
| | | | | | | | Cocoa: Add support for native gestures
* | Merge branch '4.5'Thiago Macieira2009-08-031-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qsharedpointer.cpp src/corelib/tools/qsharedpointer_impl.h src/gui/dialogs/qcolordialog.cpp src/gui/painting/qwindowsurface_raster.cpp src/network/access/qnetworkaccessmanager.cpp tests/auto/qsharedpointer/externaltests.cpp
| * Cocoa with namespace breaks the buildRichard Moe Gustavsen2009-07-311-2/+2
| | | | | | | | | | | | | | Added the needed macros around the classnames the way it should be done. Reviewed-by: Prasanth
* | Make the Character Palette work on Mac/Cocoa.Morten Sørvig2009-07-271-4/+16
| | | | | | | | | | | | | | | | | | Handle the case when insertText is called with no corresponding keyDown. This fix is for the Cocoa port. Task-number: 147379
* | "Emacs" style keyboard shortcuts don't work on Cocoa.Prasanth Ullattil2009-07-231-1/+8
| | | | | | | | | | | | | | | | | | Mac supports only single key shortcuts as key equivalent for menu items. So if a multiple key QKeySequence is set, use Qt's shortcut mechanism instead of the native menu shortcut mechanism. Task-number: 258438 Reviewed-by: Norwegian Rock Cat
* | Bad drawing of styled viewports within QAbstractScrollAreaOlivier Goffart2009-07-151-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch includes lots of refactoring, but the real problem was that in QWidgetPrivate::paintBackground we call drawPrimitive(PE_Widget) with a potentialy translated painter, but the opt.rect is not translated. When having a scroll area the calling function used to translated the painter and then pass the offset around to rectify. but drawPrimitive cannot rectify it. The solution is not to translate the painter but use other way to rectify the brush Task-number: 257517 Reviewed-by: bnilsen
* | Merge commit 'origin/4.5'Bill King2009-07-081-67/+49
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: src/sql/drivers/ibase/qsql_ibase.cpp tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp tests/auto/qsqldatabase/tst_databases.h tests/auto/qsqldatabase/tst_qsqldatabase.cpp translations/qt_ru.ts
| * Remove unused function viewUnderTransparentForMouseView in QCocoaView.Prasanth Ullattil2009-07-021-55/+0
| | | | | | | | | | | | | | After we implemented hitTest for QCocoaView, this function is no longer used. Reviewed-by: Norwegian Rock Cat
| * Drag and drop events are not delivered correctly in CocoaPrasanth Ullattil2009-07-021-8/+41
| | | | | | | | | | | | | | | | | | | | | | Drag and drop events should consider the WA_TransparentForMouseEvents attribute like the mouse events. If this attribute is set for a widget, the event has to be passed to right widget under mouse. The widget is identified by calling hitTest. In such cases the leave event has to be delivered to the widget which actually accepted the enter event. Task-number: 252088 Reviewed-by: Norwegian Rock Cat
| * Implement hitTestNorwegian Rock Cat2009-07-021-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cocoa calls hitTest on our view to determine if the view should get the mouse press. We always said, "yes" and did all the logic ourselves. Turns out that we can say "no" if I'm transparent to mouse events and remove all that code where we do all the work ourselves. Big maintenance win! For the time being I've kept the "transparentViewForEvent" method since it might be useful for others, but no one is using it at the moment and we may just kill it soon. HitTest should handle this situation correctly.
| * Fix a regression where dynamic tooltips wouldn't show up in Cocoa.Norwegian Rock Cat2009-07-021-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tracking of mouse events was only enabled when enableMouseTracking or Hover or a tooltip had been set explictly on the item, but this meant that the dynamic QEvent::Tooltips would never get dispatched. So, in order to help out people that might use this feature, all QCocoaViews must pay the mouse move event tax *sigh*. I added comments in the proper places so that we DO the right thing for a release where we can force the change in behavior. Task-number: 257320 Reviewed-by: Denis
* | Implement hitTestNorwegian Rock Cat2009-07-011-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cocoa calls hitTest on our view to determine if the view should get the mouse press. We always said, "yes" and did all the logic ourselves. Turns out that we can say "no" if I'm transparent to mouse events and remove all that code where we do all the work ourselves. Big maintenance win! For the time being I've kept the "transparentViewForEvent" method since it might be useful for others, but no one is using it at the moment and we may just kill it soon. HitTest should handle this situation correctly.