summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Extended the high_attributes array, since we have more than 127 widget ↵Robert Griebl2010-03-231-1/+1
| | | | | | attributes now. Reviewed-by: TrustMe
* Add a new WA_X11DoNotAcceptFocus attribute for top-level widgets.Robert Griebl2010-03-221-0/+1
| | | | | | | | This should prevent window managers from ever sending a WM_TAKE_FOCUS message to those windows (useful for IM windows like virtual keyboards, notification banners, etc.) Reviewed-by: bhughes
* Implement alien widgets on Mac/Cocoa.Morten Johan Sørvig2010-03-021-0/+1
| | | | | | | | | | | | | | | | | | 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-0/+2
|\ | | | | | | | | | | Conflicts: qmake/generators/symbian/initprojectdeploy_symbian.cpp qmake/generators/symbian/symmake_abld.h
| * Build break fix for commit d8465414e6fd543cfc20e732030dedd8d2bc685f.Janne Anttila2010-02-261-2/+2
| | | | | | | | | | | | | | | | RVCT does not like static inline, and variables should not be defined in case statement without braces. In this case the temp variable was actually unnecessary. Reviewed-By: TrustMe
| * Improvements to itemview keypad navigation in S60.Janne Anttila2010-02-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic used in this commit is partially taken from sliders. This commit makes it possible to interact (change row or column) in itemview even itemview does not have editFocus. Interacting without editFocus is enabled when it is not possible to keypad navigate to reuqested direction. In addition if keypad navigation to any direction is not possible (i.e there is only one listwidget on screen), there is no sense to add "done" softkey to get out of edit focus. Task-number: QTBUG-4802 Reviewed-by: Alessandro Portale
* | Merge remote branch 'origin/4.6' into qt-master-from-4.6Thiago Macieira2010-02-121-2/+3
|\ \ | |/
| * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-02-101-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (ODBC) Use wchar_t instead of assuming 2 bytes. Fixed some global QIcon/QPixmap instances that leaked handles on X11. Speed up QListView test QListView: fix crash when hiding many of the lasts item in a QListView Fixed warnings and crash when painting graphics effects outside scene. Stabilize QLineEdit test on X11 (sqlite) Allow shared cache mode Make generate uid3 (symbian) work on 64 bit host platform. Updated the docs for QPainter::begin/endNativePainting() Compile fix for network benchmarks. Add a pixmap modification hook to blur pixmap filter cache Delete benchmark examples (qtestlib-simple and qtwidgets). Restructure tests/benchmarks directory. Fixed QImagReader::setAutoDetectImageFormat() to work with plugins. QLineEdit: regression: read-only line edits would eat shortcuts. QGraphicsItem: Do not crash at exit if there is static QGraphicsItem. Make QTextCodec reentrant. Fixed bug where GL widget was not fully updated on Vista.
| | * Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.6Kim Motoyoshi Kalland2010-02-091-1/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qapplication_win.cpp src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget_p.h
| | | * Fixed bug where GL widget was not fully updated on Vista.Kim Motoyoshi Kalland2010-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were cases where the QGLWidget would not be fully updated on screen on Windows Vista and Windows 7 with Aero disabled. Task-number: QTBUG-7865 Reviewed-by: Prasanth
| | | * Update license headers again.Jason McDonald2009-09-081-4/+4
| | | | | | | | | | | | | | | | Reviewed-by: Trust Me
| * | | Fixed defect in handling of expose events for SymbianGareth Stockwell2010-02-091-1/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit bc82db did not correctly handle native child widgets. Consider the case when we have a top-level widget A with a native child widget B. When QSymbianControl::Draw() is called on the control corresponding to B, the following occurs: 1. The inExpose flag is set in B's QWExtra structure. 2. The call to syncBackingStore() results in a call to QWidgetBackingStore::flush(), passing default parameters. 3. Because no target widget was passed to flush(), this function selects the top-level widget (A) as the target for the flush operation, passing A as the first argument of QS60WindowSurface::flush(). 4. QS60WindowSurface::flush() checks the inExpose flag from A's QWExtra structure, finds it to be false, and proceeds to call DrawNow() on A's control. Because QSymbianControl::Draw() uses the default graphics context, this context is shared between controls. This means that the DrawNow() call in step 4 causes a WSERV-10 panic (Activate() called on an already-active) graphics context. This patch moves the inExpose flag from B's QWExtra into A's QTLWExtra, with the result that the call to DrawNow() in step 4 is suppressed. Task-number: QTBUG-7960 Reviewed-by: axis
* | | Qt applications not responding to WM_GETHOTKEY on windows.Prasanth Ullattil2010-02-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On windows when an application has been started through a shortcut link, (either by double-clicking or by pressing the shortcut key assigned in the link) the STARTUPINFO contains the hotkey associated to the application. This should be set on the toplevel using WM_SETHOTKEY, so that it behaves like native applications. Task-number: QUTBUG-3426 Reviewed-by: Jens Bache-Wiig Reviewed-by: bnilsen
* | | Merge branch '4.6'Thiago Macieira2010-01-181-0/+1
|\ \ \ | |/ /
| * | Improve the behavior of expose events on Symbian.Jason Barron2010-01-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously when an expose was received from WSERV, we simply called BitBlt (for raster) or called flush on the window surface (for anything else). This behavior differs from other platforms which call syncBackingStore(). This difference means that we flush the backing store without actually updating the content first. This works for most cases because if there actually was new content, it would be updated when the widget's UpdateRequest event was handled. The problem arises when the backing store does not have the correct content. This can happen if the backing store was deleted, but only partially restored (see Task below). Another problem is with the OpenVG graphics system which assumes that beginPaint() is called before endPaint() is order to initialize the context and the surface size. The fix is to call syncBackingStore() like the other platforms, but introduce a bit field to prevent infinite recursion in the painting pipeline. Task-number: QTBUG-4921 Reviewed-by: axis Reviewed-by: Gareth Stockwell
* | | Cocoa: sub-windows do not stack in front of parentsRichard Moe Gustavsen2010-01-151-0/+1
| | | | | | | | | | | | | | | | | | 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-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge commit 'origin/4.6'Olivier Goffart2009-12-151-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfsfileengine.cpp src/network/access/qnetworkrequest.cpp tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
| * | Fixed memory leaks when removing a QGraphicsEffect from a QGraphicsItem or ↵Yoann Lopes2009-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidget with setGraphicsEffect(0). The effect was not deleted in that case, problem solved for both QGraphicsItem and QWidget. Autotest included. Task-number: QTBUG-5917 Reviewed-by: bnilsen
* | | Merge branch '4.6'Thiago Macieira2009-12-021-6/+36
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/gui/dialogs/qfiledialog_win.cpp src/plugins/qpluginbase.pri src/qbase.pri tests/auto/selftests/expected_cmptest.txt tests/auto/selftests/expected_crashes_3.txt tests/auto/selftests/expected_longstring.txt tests/auto/selftests/expected_maxwarnings.txt tests/auto/selftests/expected_skip.txt tools/assistant/tools/assistant/doc/assistant.qdocconf 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
| * | Symbian control invokes slots before and after native draw opsGareth Stockwell2009-11-261-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Direct Screen Access (DSA) allows a client to request notification from the window server when drawing is performed by other threads, into a specified region of the screen. This allows DSA rendering - for example video - to be suspended when notifications are drawn, preventing the video content from overwriting the notification. If the drawing originates from the same thread as that which holds the DSA session, DSA must be suspended while drawing takes place. This change allows a widget to request notification when native drawing is about to be performed by QSymbianControl::Draw. Task-number: QTBUG-5467 Reviewed-by: Jason Barron
| * | Allow Symbian widget implementations to select native paint modeGareth Stockwell2009-11-261-6/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the Symbian platform, the Qt raster paint engine targets an off-screen buffer owned by the Font & Bitmap server (FBSERV). When an area of the screen needs to be refreshed, the window server (WSERV) asks the control environment (CONE) to redraw the control(s) intersecting that screen region. Each Qt native widget has an associated Symbian control, whose Draw function blits the required region of the backing store via WSERV. Use cases involving Direct Screen Access (DSA) may require this behaviour to be modified, to either of the following: - Disable: the Draw function does nothing. In this case, the output of paint events, rendered to the backing store, is not blitted to the screen. This mode was introduced by change 8f445e13. - Zero fill: the Draw function fills all pixels within the redraw region with zeroes. This change allows the widget implementation to select either of these alternative modes by setting a flag in its QWExtra structure. Note that these alternative modes are only suitable for native widgets, because they act on a per-control rather than per-widget basis. Task-number: QTBUG-5467 Reviewed-by: Jason Barron
* | | Merge branch '4.6'Thiago Macieira2009-11-251-0/+6
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/modules.qdoc examples/assistant/simpletextviewer/findfiledialog.cpp examples/webkit/fancybrowser/mainwindow.cpp src/gui/widgets/qtabbar.cpp src/gui/widgets/qtabbar_p.h tests/auto/qpixmap/tst_qpixmap.cpp tools/assistant/compat/helpdialog.cpp tools/assistant/compat/tabbedbrowser.cpp translations/translations.pri
| * | Fix input method support on widgets that have a focus proxy set.Simon Hausmann2009-11-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | When enabling/disabling a widget or changing its InputMethodEnabled attribute, use the focus proxy widget's input context for reset and for setting the focus widget on the input context. Task-number: QTBUG-5781 Reviewed-by: Denis
* | | Merge branch '4.6'Thiago Macieira2009-11-131-1/+1
|\ \ \ | |/ /
| * | fix crash in QWidgetPrivate::screenGeometryJoerg Bornemann2009-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missing null check added. Not really a Windows CE only crash. The following code crashed on all platforms, because the QGraphicsProxyWidget had no scene yet. QPushButton *button = new QPushButton; QGraphicsProxyWidget *buttonProxy = new QGraphicsProxyWidget; buttonProxy->setWidget(button); qApp->desktop()->screenGeometry(button); Task-number: QTBUG-5626 Reviewed-by: Alessandro Portale
* | | Fixed QPixmap::grabWidget() on widgets that have not yet been shown.Kim Motoyoshi Kalland2009-11-121-0/+2
|/ / | | | | | | | | | | | | | | | | Fixed bug where QPixmap::grabWidget() would return a pixmap of a different size that the widget if the widget had not yet been shown or resized. Updated the qpixmap autotest. Task-number: QTBUG-4149 Reviewed-by: Trond
* | Improvements to graphics effects API after review round.Samuel Rødal2009-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Get rid of QGraphicsEffectSource from the public API, instead add convenience functions in QGraphicsEffect. This way we commit to less API, and are free to introduce a customizable QGraphicsEffectSource in a future release. * Move PixmapPadMode into QGraphicsEffect and tweak the names of the enum values. * Make QGraphicsBlurEffect::BlurHint into a bit flag, for extensibility. Reviewed-by: Bjørn Erik Nilsen
* | Add QT_NO_GRAPHICSEFFECTJørgen Lind2009-11-041-0/+6
| | | | | | | | | | | | | | It depends on QT_NO_GRAPHICSVIEW for now, but it is possible to remove this dependency. Reviewed-by: paul
* | Merge commit '51c9b68' into 4.6Morten Johan Sørvig2009-11-041-1/+1
|\ \ | | | | | | | | | | | | | | | Conflicts: dist/changes-4.6.0 src/gui/kernel/qevent.h
| * | Gesture api review.Denis Dzyubenko2009-11-031-1/+1
| | | | | | | | | | | | | | | | | | Changes to the gesture api after the review. Reviewed-by: Jasmin Blanchette
* | | Merge commit 'widget/4.6' into origin/4.6Olivier Goffart2009-10-301-1/+0
|\ \ \ | |/ / |/| | | | | | | | Conflicts: src/gui/effects/qgraphicseffect.cpp
| * | Wrong caching of opaque children in QWidget.Bjørn Erik Nilsen2009-10-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The opaque children cache was clipped to all the ancestors up to the top-level, which means whenever a widget changes geometry all the children must be invalidated. However, the bug was that we didn't invalidate the children, and that is of course slow so we don't want to do it either. A better solution is to only clip the children cache to the widget itself (widget->rect() instead of widget->clipRect()), and we can perfectly do this because the region we subtract the opaque children from is already inside the clipRect(). Auto-test included. Task-number: QTBUG-4245 (related to)
* | | Options on how to get a pixmap from an effect sourceGunnar Sletta2009-10-271-1/+2
|/ / | | | | | | | | | | Usable for future optimizations. Reviewed-by: Samuel
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-231-2/+51
|\ \
| * \ Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Alexis Menard2009-10-201-1/+2
| |\ \
| * | | QToolButton popup menu is shown at wrong position when embedded in aAlexis Menard2009-10-201-2/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QGraphicsView. The main problem here is that QWidget assume that they are in the screen somewhere, which means inside the available geometry provided by QDesktopWidget. But in QGraphicsView the button can be in a position that is way bigger than the screen resolution. Lot of widgets make this assumption when positionning subpopups or submenus. Instead of applying the same code on tons of QWidgets, it's better to have an helper function in desktop widget which catch this case. It's not pretty (since it has nothing to do with QDesktopWidget) but we don't have better solution. Task-number:QTBUG-3822 Reviewed-by:brad
* | | | Added caching of graphics effect source pixmaps to speed up effects.Samuel Rødal2009-10-221-3/+10
| |/ / |/| | | | | | | | | | | | | | | | | If an effect is applied repeatedly on the same source, just with varying parameters, we can save a lot by caching the source pixmaps. Reviewed-by: Bjørn Erik Nilsen
* | | Merge commit 'origin/4.6' into mmfphononFrans Englich2009-10-151-0/+4
|\ \ \ | |/ / | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreevent.cpp src/corelib/kernel/qcoreevent.h
| * | A new implementation of the Gesture API.Denis Dzyubenko2009-10-091-0/+4
| | | | | | | | | | | | | | | | | | | | | Implemented gestures using gesture events and separate QGesture/QGestureRecognizer classes. Reviewed-by: trustme
* | | When reparenting native widget, delayed deletion of Symbian controlGareth Stockwell2009-10-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | until control returns to the event loop. This is necessary because reparenting can be triggered from the context of a control's event handler. If reparenting causes that control to be deleted, a crash can result. Task-number: QTBUG-4664 Reviewed-by: axis
* | | Modified reparenting to correctly deal with native child widgetsGareth Stockwell2009-10-091-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both reparenting and modification of window flags are done by calling QWidget::setParent. If either the parent changes, or a non-top-level widget becomes top-level (as a result of OR-ing Qt::Window into its window flags), a new native window ID is created for the widget. The Symbian implementation of setParent_sys had a flaw which manifested itself in the following situation: 1. We start with a native widget X, and its child Y, which is also native. There exist parent-child relationships between the associated CCoeControl instances, and the native windows (represented by RWindow handles). 2. X gets a new native window created as a result of a call to setParent. 3. QWidgetPrivate::reparentChildren calls SetParent on Y's control, to re-establish the parent-child relationship. The problem is that the window owned by Y's control now has no parent, so if we try to re-size the widget, the window server panics the client thread (WSERV-52). Because Symbian does not allow existing windows to be re-parented, and nor does it allow a window-owning control to re-create a new window, the only way to provide Y's window with a parent is to destroy the control and create a new one, passing in X's new window to the CCoeControl::CreateWindowL function. The changes made are as follows: a) QWidgetPrivate::reparentChildren is therefore modified to call create_sys, with destroyOldWindow set to true. b) QWidgetPrivate::create_sys is modified to take account of the value of this flag in all cases. (Previously it only did so if a new WId was passed in by the caller). c) The call to setWinId is delayed until the control and window are fully initialized. This is to allow us to emit a new event, WinIdChanged, from setWinId, in order to inform the widget that its winId has changed. d) QWidgetPrivate::activateSymbianWindow is modified in order to support this change of call ordering. Note that QWidgetPrivate::create_sys requires some re-factoring in order to remove the redundancy between the top-level and child widget cases. Task-number: QTBUG-4664 Reviewed-by: axis
* | Merge commit 'qt/4.6' into mmfphononFrans Englich2009-10-021-1/+0
|\ \ | | | | | | | | | | | | Conflicts: src/gui/kernel/qwidget_s60.cpp
| * \ Merge branch 'focusFixes' into 4.6axis2009-09-301-1/+0
| |\ \ | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qwidget_p.h src/gui/kernel/qwidget_s60.cpp
| | * | Revert "Switched to asynchronous focus handling on Symbian."axis2009-09-301-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b6377f43410b14125a66ffd02acde69cfb6e455e. The asynchronous handling caused too many headaches with input methods, which expect the focus status to be updated immediately. This may break the test case that was originally fixed by this patch (I cannot find out which one at the moment), but that will have to be solved in a different way. Conflicts: src/corelib/kernel/qcoreevent.cpp src/corelib/kernel/qcoreevent.h src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget_p.h src/gui/kernel/qwidget_s60.cpp
* | | | Immediately activate native windows created by calling winId() on an ↵Gareth Stockwell2009-10-011-0/+1
|/ / / | | | | | | | | | | | | | | | already-visible widget If a widget is visible when winId() is called on it, this change means that the newly-created native window will be activated immediately.
* | | Revert "Revert all GUI changes from the MMF work."Frans Englich2009-09-281-3/+10
|/ / | | | | | | This reverts commit 9345d47c3945b61a27724508e8b3d0aaf7b57bcf.
* | Implement Qt::WA_AcceptTouchEvents on S60Bradley T. Hughes2009-09-231-0/+1
| | | | | | | | | | | | | | | | Turning this attribute ends up calling RWindow::EnabledAdvancedPointers(), which tells Symbian to send us multiple pointer events with extended info. Reviewed-by: Jason Barron