summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_mac.mm
Commit message (Collapse)AuthorAgeFilesLines
* Fix misspelling in function name.Fabien Freling2010-03-251-2/+2
|
* Wrong position for foucs ring when used in QMacNativeWidget.Prasanth Ullattil2010-03-241-2/+3
| | | | | | | | | This widget is treated as a window by Qt, but with the embedded flag ON. setGeometry should not clip this window, it will be cliped automatically by the parent view of QMacNativeWidget. Task-number: QTBUG-9199 Reviewed-by: Denis
* Update only appropriate rectangles during update_sys().Fabien Freling2010-03-161-9/+12
| | | | | Instead of updating the bounding box, we iterate over the rectangles of the region. We also keep early alien support.
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-03-151-8/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (72 commits) different approach to fixing "the other" aliasing issue fix aliasing issue in node_construct() detach in fewer cases, remove redundant calculation SSL: Fix memleak related to local certificate Improve keyboard layout detection on X11 Compile on ARM with -Werror -Wold-style-cast Use the vista-style native dialog for QFileDialog::getExistingDirectory Apply the stdset attribute for resource properties doc: Completed sentence about HideNameFilterDetails Doc fix in QLocale Doc for for QGestureRecognizer::create. Fix broken setCollectionFile (creating multiple models instead reusing) Enable the fast paths when converting to Rgb565 qdoc: ifdefed out all the debug code. Add missing QtScript API shims Further fix license whitespace. Remove NetworkManager test-bed application. Remove configure test for NetworkManager. Fix QDir::entryList regression Add DEFINES to mingw32/windres.exe command line. ...
| * Revert some unfinished changes.Fabien Freling2010-03-111-16/+22
| |
| * Update separate regions instead of their bounding box.Fabien Freling2010-03-111-24/+18
| |
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-03-151-2/+4
|\ \ | |/ |/| | | | | Conflicts: src/gui/styles/qs60style_s60.cpp
| * Minisplitter doesn't paint to the bottom/rightCarlos Manuel Duclos Vergara2010-03-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | The problem is not related to the Splitter handle but related to an optimization in the paintengine. We were comparing if the size of the widget had changed before setting the new mask, which might not be correct. We could have changed the mask without changing the widget size. Task-number: QTCREATORBUG-753 Reviewed-by: Morten Reviewed-by: Samuel
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-03-071-2/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (57 commits) fix corewlan detection error when building for 10.5 when 10.6 is also fixed treatment of zlib on Mac when crossbuilding Partial overloading support for qdbus cli tool. Allow empty authority in QUrl::setAuthority as per docs. Added test for QTBUG-6962: Empty authority ignored by QUrl::setAuthority. fixed case of GL include directory check in MAC_APPLICATION_MENU translations Re-generate the Unicode tables after updates to the program that generates them Fix the code after merge: DerivedNormalizationProps has two or more columns add some usefull definitions to qunicodetables_p.h qchar.cpp: fix identation finish last commit prefer DerivedNormalizationProps.txt over CompositionExclusions.txt improve error reporting a bit more improve error reporting fix incorect condition check if string to int conversions were done w/o errors improve error reporting for unassigned grapheme/word/sentence break classes avoid using of qunicodetables_p.h in generator use QHash for line break map ...
| * | Mac: non-modal native qfontdialog does not work at allRichard Moe Gustavsen2010-03-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was never implemented, and as it stands, just creating a QFontDialog and calling show on it will not show anything. This patch makes sure that show works, and that one can have more than one font dialog showing at the same time (but only the first one will be native) Reviewed-by: cduclos
* | | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Rohan McGovern2010-03-061-12/+6
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe examples/multimedia/audioinput/audioinput.cpp src/corelib/io/qfsfileengine.cpp src/gui/egl/qegl_wince.cpp src/gui/egl/qeglproperties.cpp src/gui/egl/qeglproperties_p.h src/gui/embedded/directfb.pri src/gui/kernel/qapplication_win.cpp src/gui/painting/qdrawutil.cpp src/opengl/qgl_p.h src/sql/drivers/odbc/qsql_odbc.cpp src/sql/drivers/odbc/qsql_odbc.h tests/auto/auto.pro tests/auto/qgl/tst_qgl.cpp translations/assistant_adp_ru.ts
| * Bug with toolbar focus on MacCarlos Manuel Duclos Vergara2010-03-031-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before doing anything we need to make sure that we don't leave anything in a non-consistent state. When hiding a widget we need to make sure that no mouse_down events are active, because the mouse_up event will never be received by a hidden widget or one of its descendants. The solution is simple, before going through with this we check if there are any mouse_down events in progress, if so we check if it is related to this widget or not. If so, we just reset the mouse_down and then we continue. In X11 and Windows we send a mouse_release event, however we don't do that here because we were already ignoring that from before. I.e. Carbon did not send the mouse release event, so we will not send the mouse release event. There are two ways to interpret this: 1. If we don't send the mouse release event, the widget might get into an inconsistent state, i.e. it might be waiting for a release event that will never arrive. 2. If we send the mouse release event, then the widget might decide to trigger an action that is not supposed to trigger because it is not visible. Task-number: QTBUG-8604 Reviewed-by: denis
| * Carbon : Setting palette brush to a pixmap does not work.Carlos Manuel Duclos Vergara2010-03-021-7/+5
| | | | | | | | | | | | | | | | | | The problem occurs because we were drawing the pixmap and then clearing the buffer. This patch basically moves the clearing of the buffer to the start of the process instead of having it in the middle. Task-number: QTBUG-7800 Reviewed-by: Morten Sorvig
* | Implement alien widgets on Mac/Cocoa.Morten Johan Sørvig2010-03-021-11/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes alien widgets opt in on a per-widget basis on Mac, set the Qt::WA_NativeWindow flag when creating the widget to enable. Setting this flag on widgets that have native child or sibling NSViews is not supported. The main use case for alien widgets on Mac is to improve performance for applications that have complex user interfaces. Qt can handle thousands of widgets per window, while Cocoa is designed to use a smaller number of NSViews in combination with NSCells and custom control implementations. This commit moves us in the direction of having a few main NSViews with "leaf" qwidgets implemented as a custom control.
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into master-s60axis2010-02-261-1/+13
|\ \ | |/ | | | | | | | | Conflicts: qmake/generators/symbian/initprojectdeploy_symbian.cpp qmake/generators/symbian/symmake_abld.h
| * Revert changes made in scroll_sys().Fabien Freling2010-02-251-1/+13
| | | | | | | | | | | | | | | | | | | | The optimization created some glitches. It now works properly but it could be improved performance-wise. Task-number: QTBUG-5926 Task-number: QTBUG-5994 Reviewed-by: Morten Sorvig
* | Cocoa: Sheets loose their opacity on 2nd showRichard Moe Gustavsen2010-02-231-2/+3
| | | | | | | | | | | | | | | | | | | | It turns out that setParent_sys is wiping out opacity for the window regardless of what the value is from before. This patch does the correct thing, namely look at the WA_WState_WindowOpacitySet flag. Task-number: QTBUG-5100 Reviewed-by: cduclos
* | Reusing sheets on Mac OS X 10.5 & above shows painting artifacts.Prasanth Ullattil2010-02-161-0/+2
| | | | | | | | | | | | | | | | | | | | Window modal dialogs are shown as sheets on Mac, reusing them is showing some painting artificats. So make sure we create a new window everytime a sheet is shown. This only applies to Carbon, the Cocoa versions dont have this problem. Task-number: QTBUG-8198 Reviewed-by: MortenS
* | Mac: submenu shows up at the wrong positionRichard Moe Gustavsen2010-02-151-23/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If one opens a menu with a submenu, the submenu will be shown at a wrong position on screen. The reason is that upon show, the top menu will be centered on screen. But the child menu will be shown first, and tries to center of the parent that has not yet been shown. So moving the top menu upon show will fool the subwindow. This patch will move the center code into the setGeometry_sys function so that any resize on the window before it has been shown will re-center the window correctly. Task-number: QTBUG-2196 Reviewed-by: prasanth
* | Merge remote branch 'qt/4.6' into qt-master-from-4.6Qt Continuous Integration System2010-02-091-0/+19
|\ \ | |/ | | | | | | | | Conflicts: src/gui/kernel/qcocoapanel_mac.mm src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
| * Compile.Morten Johan Sørvig2010-02-051-1/+1
| |
| * Improve raster graphics system performance on Mac (second try).Morten Johan Sørvig2010-02-041-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | 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)
| * 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 (cherry picked from commit f842ec12706b70f94ab5f634dc2aa025ba2cf3f2)
* | 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