summaryrefslogtreecommitdiff
path: root/src/controls/qquickpopupwindow.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-271-1/+2
|\ | | | | | | | | | | | | Conflicts: tests/auto/qquicktreemodeladaptor/tst_qquicktreemodeladaptor.cpp Change-Id: I0b6018fdac65a5385136e4c3561fba1c52ecd32e
| * Don't activate transient parent if it was closed meanwhileSergio Martins2016-08-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Closing a window while a popup is open should not trigger an activation event when the popup is closed. Prevents QGuiApplicationPrivate::focus_window from being changed to a stale window, which happens inside QGuiApplicationPrivate::processActivatedEvent(). Change-Id: I3145b3d191abb20d56fa9acbec8a0776a6bf8526 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Controls: append "1" to all C++ classesMitch Curtis2016-03-181-18/+18
| | | | | | | | | | | | | | | | | | | | This is consistent with the classes that have already had this done. It prevents clashes with Qt Quick Controls 2. These classes are not available to the user, so it doesn't affect compatibility. Change-Id: Iee73ee6bc530182732ae95993e1f4fc3766eb8e0 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-161-1/+0
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: .qmake.conf src/dialogs/qquickabstractfiledialog.cpp src/dialogs/qquickfiledialog.cpp Change-Id: I60aab7c7e819f82f82fc30f473b36a7a57d9a91a
| * Revert "Adjust popup position by offset of the view in the toplevel window"v5.6.0-rc1J-P Nurmi2016-02-101-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c717082c098bbfc96848457436ca83db7b83e4c8, which was applied to fix popup position mapping for window containers. However, that change lead to a release blocker by breaking the very same use case with QQuickWidget, which is used by Qt Creator and is considered the modern alternative to those problematic window containers. Change-Id: I72c6d4985668a8dc1d4e1cf6e98f7597bc7c1d8f Task-number: QTBUG-49097 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
* | Unify license header usageAntti Kokko2016-02-041-12/+15
|/ | | | | | | Update old header.LGPL3 to header.LGPL Change-Id: I3c851bc24da89f6300b94199387d1adf16ca4f48 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Menubar popups should handle only release events of a previous press eventFilippo Cucchetto2015-11-261-4/+11
| | | | | | | | | | | | | | When a popup is brought up by a press event for a menu inside the menubar it should not handle the relative next release event if it falls outside the popup. Before forwarding the release event we first check if a previous press event was seen, if not we simply discard the event. Task-number: QTBUG-47295 Task-number: QTBUG-45117 Change-Id: I632fab0a3abfdfc9872f85f99f9d7f50d41526cc Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Simon Hausmann2015-10-021-1/+1
|\ | | | | | | Change-Id: Ie26c941c33fdd8baab49dc13b84d02e2b83af5e1
| * Menus: Clean popup hide and destroy logicGabriel de Dietrich2015-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a menu popup gets closed it usually needs to be destroyed right away since we don't recycle its contents. There is an exception, however, and it's when he user triggers a menu item. In this case, we need to proceed in three steps. First, we hide the menu popup, then we emit the triggered signal, and when that one returns, the menu contents can be disposed. If we did all in a single step, we may end up with a crash since we don't support deleting a QtQuick item while it's running a signal handler. Delayed deletions don't work either in the case when the triggered handler ends up running the event loop. Task-number: QTBUG-45182 Task-number: QTBUG-47682 Task-number: QTBUG-48382 Change-Id: Ic39717e09f38df602f641250cd81cf4931863db6 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Adjust popup position by offset of the view in the toplevel windowMarco Martin2015-08-031-0/+1
|/ | | | | | | | | | | In the case a view is embedded in a QWidget, such widget may be embedded anywhere in parent widgets. if it's not at a 0,0 position compared to the toplevel widget, the position needs to be adjusted by the relative position of the QQuickWindow in regards to the toplevel one, in which in this case is given by transientParent() Change-Id: Iafb7a42bdb641850fe77932d14bac9a715059b37 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Dismiss a popup window when touch occurs outsideMichal Klocek2015-06-011-0/+23
| | | | | | | | | | | | | | | QQuickWindow synthesizes mouse events only for touch points which occur inside the window. This did not work correctly for popup windows, which expect a mouse press outside the window to dismiss the popup. The workaround is to specifically wait for a TouchBegin outside the popup to dismiss it. Task-number: QTBUG-45079 Change-Id: I232220a3fe48c3193299a6a8313a6b9010dd4a53 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* MenuBar top level menus are not closed on click after being openedFilippo Cucchetto2015-04-141-1/+10
| | | | | | | | | | | | | | | | | This fix revert partially what was done for resolving QTBUG-40391. Infact the change QTBUG-40391 caused the propagation of the events that caused the dismiss of a popupMenu. This in turn caused this bug where the click that should close menu is forwarded instead of being swallowed. However for supporting the behavior of context menu outside menubar we added some cases where the developer expect to receive the event that dismissed the popup. The use case is to reopen a dismissed popup on right click (see windows right click behavior on right clicks) Task-number: QTBUG-45315 Change-Id: If5a181b65ed9d879521ac20de577510908125169 Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Controls: update license headersJ-P Nurmi2015-02-111-15/+18
| | | | | | | Change-Id: I77e7a218a958d76ac7ef7780f4be52a81f76fa6b Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Fixed missing mouse event when the Menu control is dismissedFilippo Cucchetto2014-11-241-1/+2
| | | | | | | | | | The QQuickPopupWindow doesn't forward the mouse event to the transient window if the menu is dismissed Task-number: QTBUG-40391 Change-Id: I2e5fd8b64c63d005445f9fd5e8b36e47b04c1e8b Reviewed-by: Filippo Cucchetto <filippocucchetto@gmail.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Menu: fix key navigation on WindowsJ-P Nurmi2014-10-161-3/+3
| | | | | | | | | | | | Do not force Qt::PopupFocusReason but let QGuiApp processActivatedEvent() check the window flags and do the right thing. Task-number: QTBUG-41935 Change-Id: Ic97c1d3a7f42a67e43d34b0c035c10d1e26412d7 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Revert "QQuickPopupWindow: don't create 1x1 windows"J-P Nurmi2014-10-141-6/+6
| | | | | | | | | | | The change broke menu popups with QQuickWidget (eg. Qt Creator). We need to investigate other ways of fixing QTBUG-41617 and QTBUG-41181. This reverts commit b022bece5488c9c43906b1de6989b57f801b2114. Task-number: QTBUG-41900 Change-Id: Ife74019d08683ef74e6176db3f3de68ca84bfa5a Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* QQuickRenderControl is now in public headersv5.4.0-beta1Oleg Shparber2014-10-111-1/+1
| | | | | Change-Id: I57d8ecd771eac00cc68de0ec5afa07706fee3671 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* QQuickPopupWindow: don't create 1x1 windowsJ-P Nurmi2014-10-091-6/+6
| | | | | | | | | | | | Leave the popup window at its default size until the content size is known instead of squeezing the window down to 1x1. This avoids confusing the XCB platform plugin. It was receiving async native resize events in wrong order so the content height stayed at 1px. Task-number: QTBUG-41617 Task-number: QTBUG-41181 Change-Id: I2dd1312699554dcfe92fbcc6959fb38bbc6a3b46 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4J-P Nurmi2014-09-181-18/+10
|\ | | | | | | | | | | | | Conflicts: src/controls/qquickmenupopupwindow.cpp Change-Id: Ibc10e7da3b3a2983c022b8973cd80cb1a7e110af
| * Fix menu popups positioning with window containersv5.3.25.3.2Laszlo Agocs2014-09-101-13/+6
| | | | | | | | | | | | | | Task-number: QTBUG-40883 Change-Id: I5c46c049b5890259d65f325adb59e15ebf29f84a Reviewed-by: Robert Loehning <robert.loehning@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * Fix menu/combobox popup positioningJ-P Nurmi2014-09-051-5/+4
| | | | | | | | | | | | | | Task-number: QTBUG-41113 Change-Id: Ic55657d42b44950356b176334d826b0a8d16e3cd Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Update license headers and add new license filesAntti Kokko2014-08-251-19/+11
|/ | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I470909ba0980db33ab551790d619c59a35978590 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* QQuickPopupWindow: Use actual item size as content sizeGabriel de Dietrich2014-07-291-2/+1
| | | | | | | | | Using the children rect size was a mistake, particularly when using Instantator in a Menu. Task-number: QTBUG-40221 Change-Id: I6efe9aad617a7b0adbea0bb96bf843c5c1779131 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-011-3/+21
|\ | | | | | | Change-Id: I7d6be51a5601fb90ed5e102b63173ccc01b39f36
| * Correct positioning for popups in QQuickWidgetPaul Olav Tvete2014-04-251-3/+21
| | | | | | | | | | | | | | | | | | | | Handle the case where the QQuickWindow is hidden and the content is rendered somewhere else using QQuickRenderControl. Task-number: QTBUG-38116 Change-Id: I51fb9001c307f53bf7d724860b2a66287982724e Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | QtGui and XCB now actually supports modalityJorgen Lind2014-04-231-1/+0
|/ | | | | | | | | | | However, however, popup windows should still have priority, which is not yet implemented. It still doesn't explain why this fixes all the autotest failures. Task-number: QTBUG-38508 Change-Id: I3f93785b0b6c02b0fa42b1460526ea4b42b6f9a1 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
* Merge remote-tracking branch 'origin/release' into stableSergio Ahumada2014-03-151-0/+8
|\ | | | | | | Change-Id: Ib619455982ebb154ba5344765b11da5c04091409
| * Close popup windows when application state changesold/5.2Gabriel de Dietrich2014-02-261-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nobody is telling the popup to close. If it was, that was probably as a side effect of the Qt::Popup flag on some platforms. Certainly not on Windows. We check for the application state as the application may use a popup to signal the user about some event happening, and we don't want to close the popup as soon as the user makes the application active again. Task-number: QTBUG-36474 Change-Id: If41f7bec696105e3c7d8897e9af5fc075c7b8933 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Popup Window: Privately expose popup geometryGabriel de Dietrich2014-03-071-0/+2
|/ | | | | Change-Id: I28a8edd657f02cecbd0c31965bd4085429cf4537 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Menu: Extract QQuickMenuPopupWindow core popup behaviorGabriel de Dietrich2013-10-181-0/+203
... and put it in QQuickPopupWindow. Change-Id: I6920f5c13904483310faae990c7199db9f1c4708 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>