summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_mac.mm
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix the build with -qtnamespace configure optionssuzuki toshiya2011-09-061-1/+1
| | | | | Merge-Request: 1291 Reviewed-by: Liang Qi <liang.qi@nokia.com>
* Merge branch '4.8-upstream' into master-waterWater-Team2011-06-291-7/+5
|\
| * Merge remote branch 'origin/4.7' into qt-4.8-from-4.7Jani Hautakangas2011-06-221-7/+5
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/opengl/qgl.cpp src/opengl/qpixmapdata_symbiangl.cpp src/opengl/qwindowsurface_gl.cpp
| | * Fix infinite recursion when changing geometry on MacGabriel de Dietrich2011-05-261-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some complex widgets might get a negatively sized rectangle when calling QWidgetPrivate:setGeometry_sys_helper(), triggering a infinite recursion. Normalizing the rectangle size before checking for size change is enough to break this infinite recursion. Reviewed-by: Richard Task-number: QTBUG-17333
| | * Update licenseheader text in source filesJyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | | Mac: respect WA_ShowWithoutActivating flagRichard Moe Gustavsen2011-06-281-1/+4
|/ / | | | | | | | | | | | | Seems like we just made any window key when showing it, regardless if WA_ShowWithoutActivating was set. This patch will fix this. Rev-By: msorvig
* | Merge remote-tracking branch 'qt/4.8'Jyri Tahtela2011-05-181-6/+16
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/examples/wheel.qdoc src/gui/util/qflickgesture.cpp src/gui/util/qflickgesture_p.h src/gui/util/qscroller.cpp src/gui/util/qscroller.h src/gui/util/qscroller_p.h src/gui/util/qscrollerproperties.cpp src/gui/util/qscrollerproperties.h tests/auto/qscroller/tst_qscroller.cpp
| * | Move the painting redirection to the unified toolbar surface.Fabien Freling2011-05-111-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | If the new parent of a widget is inside the unified toolbar, we need to update the redirection. Task-number: QTBUG-18150 Reviewed-by: Samuel Rødal
| * | Change the repaint() call to an update().Fabien Freling2011-05-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | In show_sys(), if we directly call repaint() this will triggers too many UpdateRequest events. This fixes the qwidget autotest "compatibilityChildInsertedEvents". Reviewed-by: Richard Moe Gustavsen
| * | Change the repaint() to an update().Fabien Freling2011-04-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Forcing to repaint might cause a recursive repaint. Since there is no apparent reason to directly repaint, we just call update(). Reviewed-by: Richard Moe Gustavsen
* | | 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
* | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2011-04-121-1/+1
|\ \ | |/
| * Cocoa: Fixup wrong code in patch baaa5aeRichard Moe Gustavsen2011-04-111-1/+1
| | | | | | | | | | | | | | | | | | Sort of imbarassing, but baaa5ae went in before I checked that the old-behaviour-flag also worked. Which is didn't. This patch will make things good. Task-number: QTBUG-11481 Reviewed-by: jbache
* | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2011-04-081-15/+20
|\ \ | |/
| * Cocoa: p1 bug fix: fix auto test regressionsRichard Moe Gustavsen2011-04-071-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Ref: 32228c4f2b3419a35d1623377050ef72edf73c92 It seems that the change above broke some auto tests, which revealed a true problem. When it comes to modal dialog, children still needs to be stacked on top of modal parents, as they the user cannot use the mouse to raise it. So rather than removing subWindowStacking fully, we narrow it even further down to only be used for children of modal dialogs. All in all, this is close to removing it, but still us it for certain corner cases. Task-number: QTBUG-11481 Reviewed-by: msorvig
| * Cocoa: p1 bug fix: revert use of subWindowStackingRichard Moe Gustavsen2011-04-061-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3c2373d7ea9bc91bb537c0725984d19ad0fbab01. After finding yet another bug related to cocoa child windows (QTBUG-17738), we have no other option than to admit it was a wrong move to use the API in the first place. Had we only known how many side-effects and hidden bugs it would introduce. The original problem we tried to solve were the cases where a stays-on-top parent window executed a modal child dialog. This child should always stay on top of its parent, but Cocoa would insist on pushing the window down to the modal window level upon activating/deactivating the application. Some window systems will always stack a window child on top of the parent, while others (X11) seems to be more selective on this issue. On Mac, we already stack windows a bit differently, thinking first and foremost on tool windows. Since this change is going into a patch release (which is debatable, since this changes behaviour, but p1 is a p1), we choose to add in a backdoor for those users who by chance depend on this behaviour. Setting the env var QT_MAC_USE_CHILDWINDOWS=1 will give you the old code path, but we plan to remove this for Qt-4.8. Also, this patch does fix the original bug described above by overriding the setLevel method in NSWindow, and refuse Cocoa to level down stays-on-top modal windows.
* | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-04-071-8/+15
|\ \ | |/ | | | | | | | | Conflicts: src/gui/text/qfontengine_mac.mm tests/auto/qdiriterator/tst_qdiriterator.cpp
| * Cocoa: p1 bugfix, add widget flag MacNoCocoaChildWindowRichard Moe Gustavsen2011-04-041-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This problem has been known for a long time, but a good solution has never been found. The problem is that a child window should always stay on top of it's parent, if not for anything else than secure that a modal child does not block input while hiding behind the parent at the same time. The only sensible solution found to ensure this in the Cocoa port is to use Cocoa child windows. But this API has a sad side effect; it will move the child along with the parent when the parent is moved on screen. This is something it seems we have to live with. But for those users that wants to handle this issue otherwise, we now add a widget flag to switch this off. Task-number: QTBUG-11481 Reviewed-by: msorvig
* | Mac: add autorelease pools to create_sysMorten Sorvig2011-03-171-0/+4
| | | | | | | | Fixes a couple of on-startup leaks.
* | Mac: Center the Window title on Cocoa.Martin Petersson2011-03-101-0/+2
| | | | | | | | | | Task-number: QTBUG-13593 Reviewed-by: Richard Moe Gustavsen
* | Cocoa/Alien: bugfix corner cases with popups and enter/leaveRichard Moe Gustavsen2011-02-141-1/+6
| | | | | | | | | | | | | | | | 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/Alien: fix qgraphicseffectsource autotestRichard Moe Gustavsen2011-01-281-5/+8
| | | | | | | | | | | | | | | | | | The test discovered a serious bug where we for alien widgets on mac returned a zero sized paintdevice. The reason is that we used to ask the nsview backing the widget for its size, but with alien, there where no such view. Very strange that this was not seen visually for any of the many applications tested. This patch does the same implementation strategy as found in QWidget::metric in qwidget_x11.cpp
* | Cocoa: fix scroll optimization bugRichard Moe Gustavsen2011-01-241-2/+1
| | | | | | | | | | The optimization commited a few commits before this one faulty stopped normal dispatching of enter/leave. This patch fixes this.
* | Cocoa: add scroll optimization when scrolling both hor and verRichard Moe Gustavsen2011-01-241-0/+4
| |
* | Cocoa: remove compiler warningRichard Moe Gustavsen2011-01-241-2/+1
| |
* | Add support for disabling touch on to enhance scrolling in CocoaRichard Moe Gustavsen2011-01-241-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | 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: replace depricated APIRichard Moe Gustavsen2011-01-211-1/+1
| |
* | Cocoa/Alien: remove unneded code for scrolling with alienRichard Moe Gustavsen2011-01-211-6/+1
| |
* | Cocoa/Alien: keep the scrolling within correct boundsRichard Moe Gustavsen2011-01-211-26/+9
| |
* | Cocoa/Alien: bugfix scrolling, dirty region issueRichard Moe Gustavsen2011-01-211-45/+42
| | | | | | | | | | | | | | | | | | When scrolling a widget we also need to scroll the already marked dirty regions on the widget along with the scroll. Since we might end up scrolling several time before a drawRect is called (normal with inertia scrolling), we need to mark exposed areas during scrolling as dirty as well, so they get handled correctly on subsequent scrolls.
* | Cocoa/Alien: let QWidget::scroll_sys handle overlapping widgetsRichard Moe Gustavsen2011-01-201-3/+22
| |
* | Cocoa/Alien: fix qwidget autotest (setClearAndResizeMask)Richard Moe Gustavsen2011-01-191-1/+6
| | | | | | | | | | | | Now that we alien is in use, several of the auto tests are that needed special handling for mac before, are now expected to pass. Which they also do. This patch turns them on :)
* | Cocoa: fix qwidget autotest (optimizedResizeMove) for raster engineRichard Moe Gustavsen2011-01-191-10/+4
| | | | | | | | | | | | | | | | In setGeometry_sys we used to call invalidateBuffer. This function does not take into account widgets with static contents when resizing. invlidateBuffer_resizeHelper does. The new code with this patch will make setGeometry_sys work the same way as in qwidget_x11::setGeometry_sys.
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-water-staging into ↵Richard Moe Gustavsen2011-01-171-8/+20
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Allow QWidget with size larger than 16383 on Mac OS X (Cocoa)Prasanth Ullattil2011-01-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | The restriction in place seems to be from the carbon ages, this is not required for cocoa, so removing it. QWidget autotests runs as before. Task-number: QTBUG-11415 Reviewed-by: Joao
| * | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-12-201-4/+12
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/declarative/minehunt/minehunt.pro src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp src/plugins/phonon/mmf/mmf.pro src/s60installs/s60installs.pro tests/auto/qapplication/test/test.pro tests/auto/qgraphicsview/tst_qgraphicsview.cpp
| | * Cocoa: Fix addChildWindow bug where we connect a grandparent to a childRichard Moe Gustavsen2010-12-131-2/+2
| | | | | | | | | | | | | | | | | | | | | A plain bug where we ask for a list of widgets, but forget that qFindChildren is recursive, which is not what we want. Reviewed-by: jbache
| | * Cocoa: make sure stays on top child windows are not levelled downRichard Moe Gustavsen2010-12-131-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | [NSWindow addChild] levels the child to the level of the parent. In Qt we do not want this. So we do a check after setting up the parent-child relationship for this. Reviewed-by: cduclos
| * | Add WA_MacNoShadow widget attributeArvid Ephraim Picciani2010-11-241-1/+4
| | | | | | | | | | | | | | | Task-number: QTBUG-6831 Reviewed-by: Fabien Freling <fabien.freling@nokia.com>
| * | Fix a namespace error and some warnings found by clangJiang Jiang2010-11-231-1/+1
| | | | | | | | | | | | Reviewed-by: Fabien Freling
* | | Alien implementation for the Cocoa portRichard Moe Gustavsen2011-01-171-296/+473
|/ / | | | | | | Give Alien on Cocoa a warm welcome.
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-10-251-14/+36
|\ \ | |/ | | | | | | | | | | | | | | | | 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
| * Cocoa: small update to 534ba3c7314820604ba5aeeffa6051c91e7c1d09Richard Moe Gustavsen2010-10-151-5/+8
| | | | | | | | | | | | Rather than checking window level directly, we check the Qt window type. This has the advantage that we also include dialogs that are modal.
| * Cocoa: fix child window issues (QTBUG 13867, 14420, 13126)Richard Moe Gustavsen2010-10-151-14/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main problem behind these issues is the fact that when two windows exists in a parent-child relationship (using the [NSWindow addChild] API), Cocoa will automatically hide both windows even when just hiding one of them. This turns out really bad when the child is a tool window, because those will automatically be hidden when the application becomes deactivated. And as such, the parent will hide as well, tool or not. So after a LOT of investigation, involving manually trying to level windows rather than using the addChild API, the conclusing is that we cannot do it; Cocoa and Qt just tries to outsmart each other. So instead, we now say that only normal windows and dialogs can be part of a parent-child relationship (which seems to be how Apple intended it as well). The rest, and in particular tool windows, we just ignore. This will differ from some other platforms, but at the same time, since tool windows are on a level above other windows on mac from before, and the docs specifies that this can be different from platform to platform, we see it as acceptable. Rev-By: prasanth Rev-By: msorvig
* | Don't assing 'const Foo*' to a 'Foo*'Tor Arne Vestbø2010-10-151-1/+1
| | | | | | | | Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-09-211-4/+8
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.h src/declarative/graphicsitems/qdeclarativeflickable.cpp src/declarative/graphicsitems/qdeclarativeflickable_p_p.h src/declarative/util/qdeclarativelistmodel.cpp
| * Compile on MacEskil Abrahamsen Blomfeldt2010-09-161-0/+3
| | | | | | | | | | | | Extern missing symbol Reviewed-by: Fabien Freling