summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_mac.mm
Commit message (Collapse)AuthorAgeFilesLines
* Cocoa: Tool Windows steal focus from the main windowRichard Moe Gustavsen2010-02-041-1/+1
| | | | | | | | | | | | | The example that shows this off is tools/inputpanel. This example is strangely written, and calls activateWindow on the main window in an activate callback to another window. So a bit recursion will happend, and this caused troubble for the cocoa port. In addition, in Qt several windows can be active at the same time, expecially tool windows. This means that we need to be careful when returning early from the becomeKeyWindow methods for NSWindow. This patch fixes up on this stuff. Task-number: QTBUG-6002 Reviewed-by: msorvig
* Merge remote branch 'qt/4.6' into qt-master-from-4.6Qt Continuous Integration System2010-02-011-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qeventdispatcher_mac.mm src/gui/kernel/qt_cocoa_helpers_mac.mm src/gui/widgets/qmenu_mac.mm tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp tools/assistant/tools/assistant/centralwidget.cpp tools/linguist/lupdate/main.cpp
| * Mac: Calling showFullScreen() then showNormal() on a widget results in top ↵Carlos Manuel Duclos Vergara2010-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | menu hiding. The problem here was the way we entered Full Screen Mode. We were using "kUIModeAllSuppressed" which does the following according to the manual: kUIModeAllSuppressed All system UI elements (including the menu bar) are hidden. However, these elements may automatically show themselves in response to mouse movements or other user activity. I changed it to "kUIModeAllHidden", which does the following: All system UI elements (including the menu bar) are hidden. To prevent a change of behavior I added the following option to the SetSystemUIMode: kUIOptionAutoShowMenuBar This flag specifies that the menu bar automatically shows itself when the user moves the mouse into the screen area that would ordinarily be occupied by the menu bar. Only valid for the presentation mode kUIModeAllHidden. Task-number: QTBUG-7625 Reviewed-by: Richard Moe Gustavsen
* | Carbon: crash problem in QWidgetPrivate::hide_sys, v2Richard Moe Gustavsen2010-01-291-1/+1
| | | | | | | | | | | | | | | | See change: f842ec12706. Needed some ekstra checks for the cocoa port as well. Task-number: QTBUG-4227 Reviewed-by: Prasanth
* | Carbon: crash problem in QWidgetPrivate::hide_sysRichard Moe Gustavsen2010-01-291-0/+2
| | | | | | | | | | | | | | | | | | | | The crash occurs because we at one point try to assign a widget that is marked as 'about to be deleted' to a QPointer, after clearguards has been called. The correct fix is to avoid such an assignment in the first place. Task-number: QTBUG-4227 Reviewed-by: Prasanth
* | Cocoa: implement usage of override cursorsRichard Moe Gustavsen2010-01-281-0/+3
| | | | | | | | | | | | | | This have never worked in the Cocoa port, it seems. This patch gives it a try. Reviewed-by: msorvig
* | Carbon: fix build breakage on carbonRichard Moe Gustavsen2010-01-261-0/+2
| | | | | | | | Just forgot an ifdef...
* | Merge branch '4.6'Thiago Macieira2010-01-211-0/+45
|\ \ | |/ | | | | | | Conflicts: tools/assistant/lib/qhelpsearchquerywidget.cpp
| * Menubar and dock disappear after hiding a fullscreen widget on Cocoa.Carlos Manuel Duclos Vergara2010-01-211-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | The problem here was exiting the full screen mode. In Cocoa we don't activate windows as we do in Carbon, therefore we were not exiting from the full screen mode. This patch adds a check when hiding a window, if the window is in full screen mode then we go through the list of top level windows checking if there are any other visible and not-minimized windows that are also in full screen mode. If none if found, the we exit the full screen mode. Task-number: QTBUG-7312 Reviewed-by: Prasanth
| * Designer crashes when previewing QMainWindow with native Toolbar on MacPrasanth Ullattil2010-01-191-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The crash happens when a QMainWindow with a native toolbar is reparented. While re-parenting, the QToolBar triggers a new setParent() with the MacWindowToolBarButtonHint. This messes up the internal state, hence the crash. To avoid re-entering setParent() for the QMainWindow, this hint is set depending on the unifiedTitleAndToolBarOnMac property. This patch also fixes a related issue in Cocoa, we need to remove the reused NSToolbar from the old window while recreating the QMainWindow. Task-number: QTBUG-7162 Reviewed-by: Richard Moe Gustavsen
* | Cocoa: sub-windows do not stack in front of parentsRichard Moe Gustavsen2010-01-151-7/+35
| | | | | | | | | | | | Seems like this were never implemented. This patch does. Task-number: QTBUG-7375
* | Cococa: QDialogs stays on top when application is not activeRichard Moe Gustavsen2010-01-151-32/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | At one point in history, we decided that QDialogs should stack just above normal windows. This patch reverts this behaviour, as cocoa gets confused if we stack a dialog at this level without telling it to be modal. So instead, we let cocoa set the modal window level when we create a modal session, and also let cocoa restore the level to what it were when the sessions ends. That way, we avoid doing the work that cocoa is allready designed to do. Task-number: QTBUG-5057 Reviewed-by: msorvig
* | Merge branch '4.6'Thiago Macieira2010-01-131-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt doc/src/deployment/deployment.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/xml/qxmlstream.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h tools/assistant/tools/assistant/centralwidget.cpp tools/linguist/lupdate/main.cpp
| * Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | Reviewed-by: Trust Me
| * Cocoa: added release poolRichard Moe Gustavsen2010-01-041-0/+1
| | | | | | | | | | Fix warning given by cocoa (cherry picked from commit 875afab977005b03d307040fb3be15c7524a37ff)
* | Cocoa: exec() on a dialog with Qt::Tool windowflag is just a dialog.Richard Moe Gustavsen2010-01-041-3/+3
| | | | | | | | | | | | | | | | | | This is because a modal flag on the window wins over the type when determining window class. This fix will respect the type first, before looking at the window flag. Task-number: QTBUG-1455 Reviewed-by: Prasanth
* | Merge branch '4.6'Thiago Macieira2009-12-261-1/+5
|\ \ | |/ | | | | | | | | | | Conflicts: examples/webkit/fancybrowser/main.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp tools/assistant/tools/assistant/bookmarkmanager.cpp
| * Memory leak when using QWidget::setWindowIcon() in Carbon.Prasanth Ullattil2009-12-221-1/+5
| | | | | | | | | | | | | | The icon was not released when destroying the window. Task-number: QTBUG-6973 Reviewed-by: Richard Moe Gustavsen
* | Cocoa: event dispatcher drops events on the floorRichard Moe Gustavsen2009-12-221-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under some circumstances, the event dispatcher needs to stop NSApplication, let the control return back to the QEventLoop that called processEvents, which very often will just call processEvents again, which in turn will restart NSApplication. After stopping NSApplication, Cocoa seems to throw away at least some of the posted cocoa events that are still pending. This will offcourse have inpact on things like window updates etc. that never happends. This patch will be more careful about when to stop NSApplication, and delay this until the run loop has finished one more spin after interrupt has been called. The same goes for modal sessions. Introducing this delay also made it neccessary to sometimes block cocoa from updating the stacking order of the windows. Autotest: qcoreapplication, qapplication, qtimer
* | Cocoa: added release poolRichard Moe Gustavsen2009-12-221-0/+1
| | | | | | | | Fix warning given by cocoa
* | Merge commit 'origin/4.6'Olivier Goffart2009-12-151-66/+46
|\ \ | |/ | | | | | | | | | | Conflicts: src/corelib/io/qfsfileengine.cpp src/network/access/qnetworkrequest.cpp tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
| * Cannot drag scrollbars in a QPlainTextEdit on Cocoa.Prasanth Ullattil2009-12-071-66/+46
| | | | | | | | | | | | | | | | | | | | | | The QPlainTextEdit can change the scroll ranges while dragging the scrollbar. This will eventualy call QWidget::raise(), on Cocoa it was done by removing the NSView and adding it back. This causes problems like resetting internal state while a mouseDragged was active on the view. The fix we will now sort the views based on their Qt-z-order. lower() & stackUnder() also fixed like this. Reviewed-by: Denis
* | Cocoa: impl. performance boost for dndRichard Moe Gustavsen2009-12-041-3/+6
|/ | | | | | | | | | | | | | It turns out that registering drag types for each NSView that can receive drop events is _really_ slow. And many widget in Qt subscribe for DnD (QTextEdit, QScrollArea, etc), so the result is an application that will spend startup time preparing for DnD. For some edge cases, we're talking several seconds! This patch removes this overhead by moving drag type registering out of NSView, and into NSWindow (that is, QCocoaWindow and QCocoaPanel). Task-number: QT-1586 Reviewed-by: Prasanth
* Creator crashes when reloading externally modified .ui files on MacPrasanth Ullattil2009-12-011-2/+0
| | | | | | | | | | | | On Mac QWidget::destroy() sends an AcceptDropsChange event after clearing the guards for QPointer. This was used to store a QPointer to the widget being deleted & that will never be cleared. The fix removed the setAcceptDrops() from destroy. And as an extra protection make sure designer will not treat that event as interesting. Task-number: QTCREATORBUG-307 Reviewed-by: Denis Dzyubenko Reviewed-by: Friedemann Kleint
* Mac: Make gestures available when building Qt against SDK < 10.6Richard Moe Gustavsen2009-11-231-6/+19
| | | | | | | | | | | 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
* Designer crashes in Mac Cocoa port.Prasanth Ullattil2009-11-161-0/+3
| | | | | | | | | When we reparent a widget, it has to be removed from the old view before it is added to the new one. Otherwise this can cause the old view to have an invalid first responder, causing crash. Task-number: QTBUG-5327 Reviewed-by: Denis
* Merge remote branch 'qt-official/4.6' into 4.6Morten Johan Sørvig2009-11-061-3/+3
|\
| * Merge branch '4.5' into 4.6Morten Johan Sørvig2009-11-051-3/+3
| |\ | | | | | | | | | | | | | | | Conflicts: tests/auto/qsqlquery/tst_qsqlquery.cpp tests/auto/qtextlayout/tst_qtextlayout.cpp
| | * Disable the move-by-scrolling optimization.Morten Johan Sørvig2009-11-021-3/+3
| | | | | | | | | | | | | | | | | | The current implementation fails when moving the widget onto an area that has just been exposed as a part of a window resize operation.
* | | Save the normal geometry on mac before the window is maximizedDenis Dzyubenko2009-11-041-3/+7
|/ / | | | | | | | | | | | | | | Do the same as on Windows - before the window is maximized save its normal geometry so that when the window is restored we set the geometry back. Task-number: QTBUG-4418 Reviewed-by: Prasanth
* | Toolbar Icons are clipped on Leopard in Cocoa port.Prasanth Ullattil2009-11-031-1/+2
| | | | | | | | | | | | | | Scale the pixmap to correct size (16,16) before setting as the image for the Document Icon button. Reviewed-by: Denis
* | Titlebar icon (for e.g. Assistant) not visible in Cocoa.Prasanth Ullattil2009-11-021-0/+6
| | | | | | | | | | | | | | | | | | standardWindowButton:NSWindowDocumentIconButton will not return a valid NSButton unless you call setRepresentedURL or setRepresentedFilename for the NSWindow. This patch makes sure that setWindowIcon_sys() sets the icon using a valid NSButton. Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* | Merge branch '4.5' into 4.6Thiago Macieira2009-10-291-0/+2
|\ \ | |/
| * Plug some autorelease pool leaks.Norwegian Rock Cat2009-10-291-0/+2
| | | | | | | | | | | | | | | | Calling QWidget::setCursor() outside of the event loop causes a memory leak in Cocoa. Adding an autorelease pool plugs it. Merge-request: 1791 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* | Carbon: active window not restoredRichard Moe Gustavsen2009-10-271-2/+9
| | | | | | | | | | | | | | | | | | | | After closing a window we used to go through the list of kDocumentWindowClass windows to pick the next one to pop to front. This patch will search the kMoveableWindowClass list of windows first, and as such, pop to front any modal window first Rev-By: MortenS
* | QT_NO_CURSOR build fix on windows. Random corrections for it on mac.Jocelyn Turcotte2009-10-231-0/+2
| | | | | | | | Reviewed-by: Denis Dzyubenko
* | Cocoa: modal window reappears on screen after reactivating appRichard Moe Gustavsen2009-10-201-2/+13
| | | | | | | | | | | | | | | | | | If you close a modal window, then activate different app, then activate app again, the window will pop non-modal in front. This patch makes sure that when we hide a window, we point to the next window to receive keyboard focus. Rev-By: MortenS
* | Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2009-09-241-1/+1
|\ \ | |/ | | | | | | | | | | Conflicts: examples/webkit/formextractor/formextractor.pro mkspecs/features/qt.prf src/gui/painting/qpaintengineex.cpp
| * Calling raise() on a hidden windows makes it visible on Cocoa.Prasanth Ullattil2009-09-231-1/+1
| | | | | | | | | | | | | | | | | | [NSWindow orderFront:] on a hidden window will make it visible. So raise_sys() will now check if window is visible before this method is called. Task-number: 255428 Reviewed-by: Richard Moe Gustavsen
* | Merge branch '4.5' into 4.6Thiago Macieira2009-09-121-2/+5
|\ \ | |/ | | | | | | | | Conflicts: tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro
| * Run on 10.3.Morten Sorvig2009-09-111-1/+1
| | | | | | | | | | _HIViewScrollRectWithOptions needs to be declared as a weak-linked symbol in order to make static linking work.
| * Run on 10.3 Panther.Morten Sorvig2009-09-111-1/+4
| | | | | | | | HIViewSetNeedsDisplayInRect was added in 10.4.
| * Update license headers again.Jason McDonald2009-09-081-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | 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/+8
| | | | | | | | | | | | | | 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.