summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-021-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/network/bearer/qnetworkconfiguration.cpp src/plugins/bearer/blackberry/qbbengine.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformtheme.cpp src/plugins/platforms/qnx/qqnxbpseventfilter.cpp src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxnavigatorbps.cpp src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp src/plugins/platforms/qnx/qqnxwindow.cpp src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qwindowsvistastyle.cpp src/widgets/styles/qwindowsxpstyle.cpp src/widgets/widgets/qtoolbararealayout.cpp tests/auto/corelib/global/qflags/qflags.pro tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp Change-Id: I37be88c6c185bb85404823353e027a0a6acdbce4
| * QtBase: remove explicit function info from qWarning() etcMarc Mutz2015-11-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | This information is already registered by the QMessageLogger ctor. Where, by dropping the << Q_FUNC_INFO in ostream-style qDebug(), only a string literal remained, converted to printf-style qDebug() on the go. Change-Id: I3f261c98fd7bcfa1fead381a75a82713bb75e6f3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Use Q_UNLIKELY for every qFatal()/qCritical()Marc Mutz2015-11-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If, after checking a condition, we issue a qFatal() or a qCritical(), by definition that check is unlikely to be true. Tell the compiler so it can move the error handling code out of the normal code path to increase the effective icache size. Moved conditional code around where possible so that we could always use Q_UNLIKELY, instead of having to revert to Q_LIKELY here and there. In some cases, simplified the expressions newly wrapped in Q_UNLIKELY as a drive-by. Change-Id: I67537d62b04bc6977d69254690c5ebbdf98bfd6d Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Accept concurrent input from multiple tablet devices in QGuiApplicationRomain Pokrzywka2015-11-261-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a follow-up to 352c357e6f0785c0775a85151d6716b47aea1006 enabling support for multiple evdevtablet plugins at runtime (one per device), we also need to adjust the way QGuiApplication handles the events received from those plugins, in particular when multiple devices are sending tablet events concurrently. Replace the static members in QGuiApplication by a vector storing the same data per-device, so tablet press/release events can be recognized independently. Change-Id: Ie0975cdb03a8f6d05903e2e2e57ceb9de73a74a4 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* | Defer QPlatformWindow creation on setVisible(true) if parent hasn't been createdTor Arne Vestbø2015-10-261-13/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a child QWindow is shown by calling setVisible(true), we don't need to create the platform window immediately if the parent window hasn't been created yet. We defer creation until the parent is created, or we're re-parented into a created parent or made top level. This optimization is more important now that we create the full parent hierarchy once we decide that we need to create a child QWindow. Change-Id: Ia4f0430f0d3709a12f41f6473c1cea6b0ef3c9cd Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Ensure QWindow::setParent() creates parent hierarchy if neededTor Arne Vestbø2015-10-261-7/+6
| | | | | | | | | | | | | | | | | | | | If the QWindow has been created and has a platform window, we need to ensure that the windows in the parent hierarchy also are created before we set a new parent on the platform window, otherwise the platform window will think that it's a top level window. Change-Id: Icb2c3cd5411cd1eb595e8673e144095feda31df9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Ensure QWindow::create() creates parent hierarchy before creating selfTor Arne Vestbø2015-10-261-0/+3
|/ | | | | | | | | | | | | To be able to create a platform window for a given QWindow we need to sync up the parent hierarchy first, so that the newly created window can be placed into that hierarchy. Without creating the parent hierarchy first, the QPlatformWindow will end up thinking it's a top level window, when in reality is represents the platform backing of a child QWindow. Change-Id: I2cad7759fbc118b04718e7a27ec7570ce1238757 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Check that QPlatformIntegration::createPlatformWindow() doesn't failTor Arne Vestbø2015-10-161-15/+21
| | | | | | | | | | We expect createPlatformWindow() to return a valid platform window. If it fails we now assert in debug, and emit a warning in release. The only platform where this is currently possible is on Windows, where the platform plugin will return 0 if CreateWindowEx for some reason fails. Change-Id: Ia2461efcfc48d180e073fa372d9c385650129e1c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Document that QWindow::fromWinId() should be used with cautionTor Arne Vestbø2015-10-161-0/+5
| | | | | | Change-Id: I28c58fb720c323048615efe677a920f179ef9d20 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Clarify foreign window documentation a bitTor Arne Vestbø2015-10-161-5/+6
| | | | | | | Change-Id: I50193cb0c106bc17a008e6778d2d722545c7cb1c Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Add default argument to QPlatformWindow::isEmbedded()Tor Arne Vestbø2015-10-141-2/+2
| | | | | | | Removes magic 0-pointers at the call sites. Change-Id: I6740f6b8cc75004ab5f2ebcb3b3c95cbbdc43153 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Don't use d_func in QWindow::mapToGlobalTor Arne Vestbø2015-10-141-2/+2
| | | | | | | We initialize the variable d at the top using Q_D(const QWindow); Change-Id: I2de3b33c043024c5599b7cd1ebecae2db0b39d87 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-0/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/tools/qstring.h src/gui/image/qimagereader.cpp src/network/access/qnetworkaccessmanager.cpp src/tools/qdoc/doc/examples/examples.qdoc src/widgets/accessible/qaccessiblewidgetfactory_p.h src/widgets/doc/qtwidgets.qdocconf Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
| * Set positionAutomatic when using setX setYDavid Edmundson2015-09-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindow keeps track of whether a position has been explicitly set by use of a flag positionAutomatic which gets set in setGeometry. This is used to determine if position is passed to the window manager. However calls to setX, setY via properties did not update this flag if the caller is setting it to the default position 0,0. This patch fixes that by making sure the flag is always updated. Change-Id: I2c0c002fe57efa101b3ca79e6e8b3f36cc465761 Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Fix -Wcast-qual warningsThiago Macieira2015-08-131-1/+1
| | | | | | | | | | | | | | qwidget.cpp:12864:70: error: cast from type ‘const QWidget*’ to type ‘void*’ casts away qualifiers [-Werror=cast-qual] Change-Id: I7de033f80b0e4431b7f1ffff13f956cb26108af7 Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Introduce cross platform high-dpi scalingMorten Johan Sørvig2015-07-301-12/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a coordinate scaling layer to QtGui, which supports 'devicePixelRatio' type high-dpi on all platforms, in production and also for development and testing purposes. High-DPI scaling is opt-in, by setting environment variables: QT_SCALE_FACTOR - sets a global scale factor QT_AUTO_SCREEN_SCALE_FACTOR - sets per-screen scale factors, where the scale factors are provided by the platform plugin. This QtGui scaling can be used instead of or in addition to scaling done by the window system. This distinction is not visible to applications [when they use Qt API], which will see a change in the value returned by the devicePixelRatio() accessors as usual. Introduce a new (private to Qt) coordinate system: native pixels. The coordinate system stack now looks like: device-independent pixels (app, upper parts of Qt) native pixels (lower parts of Qt Gui, platform plugins) device pixels (backing stores and OpenGL) Add private QHighDpi namespace with scaling functions that convert between device-independent pixels and native pixels: T toNativePixels(T, QWindow *); T fromNativePixels(T, QWindow *); Add scaling calls the QWindow (and friends) cross-platform implementation, around the calls to QPlatformWindow functions. QPlatformWindow now uses native coordinates - platform code remains largely unchanged since native coordinates are window system coordinates. QWindow now uses (possibly) scaled coordinates. This means that platform plugins no longer can rely on QWindow::geometry() and related functions. QPlatformWindow::windowGeometry() and other convenience functions have been added for use when the platform plugin needs to convert scaled geometry to native geometry. Add Qt::AA_NoHighDpiScaling, which can be use to disable any scaling in QtGui, effectively ignoring the environment variables. (Note that this does not disable any scaling done by the window system.) Contributions from Friedemann and Paul. Task-number: QTBUG-46615 Change-Id: I673bbd69c130e73b13cce83be11bfb28f580bf60 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-07-011-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qglobal.h src/corelib/global/qsysinfo.h src/corelib/global/qsystemdetection.h src/corelib/kernel/qobjectdefs.h src/plugins/plugins.pro tests/auto/widgets/itemviews/qlistview/qlistview.pro Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
| * doc: mark QWindow::requestUpdate() as \since 5.5Gunnar Sletta2015-06-181-0/+2
| | | | | | | | | | Change-Id: I322e2e93edc4bdb6582c7614b9a8552221317553 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-221-0/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/gui/painting/qdrawhelper.cpp src/plugins/platforms/xcb/qxcbnativeinterface.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/plugins/platforms/xcb/qxcbwindow.h src/testlib/qtestblacklist.cpp src/tools/qdoc/node.cpp src/tools/qdoc/node.h tests/auto/gui/painting/qcolor/tst_qcolor.cpp Change-Id: I6c78b7b162001712d5774293f501b06b4ff32684
| * Enhance QWindow::devicePixelRatio() docsLaszlo Agocs2015-04-211-0/+4
| | | | | | | | | | | | | | | | | | | | Document that fact that for non-create()'ed windows this is the same as QGuiApplication::devicePixelRatio() which is the highest dpr in the system. This has consequences when running with multiple displays so application developer's have to be aware of this. Change-Id: Ic05a18732ff021659da04428cb49421ac3453870 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-061-1/+8
|\| | | | | | | Change-Id: If9fd98525b6b4ca07e5e006fc98bf372a73b8a21
| * Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-311-1/+8
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/android-g++/qmake.conf qmake/generators/unix/unixmake2.cpp src/gui/image/qimage_conversions.cpp Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
| | * Fix use of the window geometry specificationAlexander Volkov2015-03-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now we applied the geometry in QWidget::setVisible() by calling QWidget::move() and QWidget::resize(). But these methods are unreliable when the window is created but not visible yet. For example, specifying the window position by "-geometry +0+0" will take no effect. Apply the geometry directly to QWindow in QWindow::setVisible(). QWidget will update its geometry after the response of the window system. Besides it allows to specify the geometry for QML applications. Task-number: QTBUG-44713 Change-Id: I9a0e110e81e569c81da802729707fec104fef887 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * Always clear QWindowPrivate::positionAutomatic in setFramePosition()Alexander Volkov2015-03-061-1/+1
| | | | | | | | | | | | | | | Change-Id: I3dd494eee6a133c05256cc1518853e6c5511f8b7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/devSimon Hausmann2015-03-181-0/+2
|\| |
| * | eglfs: Generate enter and leave eventsLaszlo Agocs2015-03-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition the logic in QGuiApplication that picks the target window for input events with a null window has to be enhanced to be compatible with how real windowing systems work: mouse events following a press are delivered to the same window until the release, even if the cursor has left the original target window. Task-number: QTBUG-44814 Change-Id: I3fea84ac77a5ccebeae5def64f92d8d2e03d13ff Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | | Implement QDebug streaming operators for QWindow, QScreen and QWidget.Friedemann Kleint2015-03-161-0/+39
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | The operators can be switched to verbose using QDebug::setVerbosity() and then provide more useful information than the standard operator for QObject. [ChangeLog][QtCore][QDebug] When streaming QWindow, QScreen, QWidget instances to a debug stream that has increased verbosity set, detailed information about geometries, states etc. will be printed. Change-Id: Ice26e00f6c713cd6244e1c1df54195e0b0de3c20 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | docs: QPlatformWindow::screen() and QWindow::screen() can return nullShawn Rutledge2015-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | After change f4b8697c40bd476ef6bf83418e144adce7c7d4a3, it is normal on X11 to have a null screen when all outputs have been disconnected or turned off. Change-Id: I97eeefd86d97701be50f0757fe5c53ca36d79aaa Reviewed-by: Harri Porten <porten@froglogic.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Use QPlatformWindow::mapToGlobal()/mapFromGlobal() for Qt::ForeignWindow.Friedemann Kleint2015-02-181-6/+10
| | | | | | | | | | | | | | Task-number: QTBUG-43252 Task-number: QTBUG-41186 Change-Id: I91654b6591585dec9748982a0686becf3f5e2718 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Add widget support for requestUpdate() and improve its docs and testsLaszlo Agocs2015-02-161-4/+9
| | | | | | | | | | | | | | | | | | | | | | We must do something when requestUpdate() is called on a QWidgetWindow. The semantics of UpdateRequest for QWindow and QWidget are unfortunately different: for widgets an UpdateRequest means "sync the backing store". For QWindow it also involves marking as dirty. Change-Id: Idf40b3fc0873652dc081edeb12c96b3007a126ef Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* | Handle gracefully the removal and re-attachment of all QScreensShawn Rutledge2015-02-071-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't crash; restore windows when all screens are removed and re-added. xcb: on configure notify, check for screen change: it may be that a window belonging to a screen which was removed has now gotten mapped to the new screen. On screen change, send a synthetic expose event, because the real expose events already happened. Task-number: QTBUG-38326 Task-number: QTBUG-32973 Task-number: QTBUG-42985 Change-Id: If334f55c248468ad3c95e7066bb14eca377d2050 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Only show QWindows after QScreen destruction if coming from virtual siblingTor Arne Vestbø2015-01-221-24/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For windows that were shown on an external screen (not a virtual sibling of the primary screen), eg. on iOS, it doesn't make sense to re-show the window when moved back to the primary screen. By moving the logic into the QScreen destructor, we ensure that the code path is hit both for the old and unsupported style way of destroying QPlatformScreen by deleting it directly, and the new and safe way of using QPlatformIntegration::destroyScreen(), while still allowing clients to manage the windows themselves by emitting screenRemoved() before applying our fallback logic. [ChangeLog][QtGui][Important Behavior Changes] QWindows will no longer be re-shown automatically when moved from a destroyed QScreen, unless that QScreen was a virtual sibling of the primary screen. Change-Id: If1105bc5ef41a5392854bb97d121c998bffa3606 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-12-291-1/+2
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/kernel/qplatformsystemtrayicon.cpp src/gui/kernel/qplatformsystemtrayicon.h src/plugins/platforms/xcb/xcb-plugin.pro Change-Id: I00355d3908b678af8a61c38f9e814a63df808c79
| * Check screen before changing cursorJoni Poikelin2014-12-231-1/+2
| | | | | | | | | | | | Task-number: QTBUG-43508 Change-Id: I6b525cab2a3958f4e3528ed8102d07984f152e60 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | emit lastWindowClosed even if quitOnLastWindowClosed is falseShawn Rutledge2014-12-231-14/+12
| | | | | | | | | | | | | | | | | | | | | | Behavior will agree with the docs. [ChangeLog][QtGui][QWindow] lastWindowClosed will be emitted even if quitOnLastWindowClosed is not set Task-number: QTBUG-32956 Change-Id: I7bb269d53894859fee27e171eea7ad472ea86af0 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-271-0/+9
|\| | | | | | | Change-Id: Id20053d261b4fbbcc0ac8ba49dd3ef2253fa4b95
| * Implement heightForWidth().Friedemann Kleint2014-11-271-0/+9
| | | | | | | | | | | | | | | | | | | | Add a virtual function QWindowPrivate::closestAcceptableGeometry() which is called from the platform plugin. Task-number: QTBUG-36220 Task-number: QTBUG-36318 Change-Id: I2b3d205e2c75f1d4dd2ba1d333b0d89bc0fcf13a Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-241-6/+6
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice.cpp src/plugins/bearer/linux_common/qofonoservice_linux.cpp src/plugins/bearer/linux_common/qofonoservice_linux_p.h src/plugins/platforms/android/qandroidplatformtheme.cpp src/tools/bootstrap/bootstrap.pro src/widgets/styles/qmacstyle_mac.mm Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
| * Make the -nograb and -dograb arguments actually work on xcbJørgen Lind2014-11-111-4/+0
| | | | | | | | | | Change-Id: Idc725443e4abe27db3e530f08173897bfcbe1278 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * docs: WindowType is important for dialogs to center themselvesShawn Rutledge2014-11-051-0/+4
| | | | | | | | | | | | | | Task-number: QTBUG-41844 Task-number: QTBUG-36185 Change-Id: I61605006048e81d2666eea34f4d041124a24199f Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Ignore alert on an active windowJohn Brooks2014-10-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QWindow::alert() is called with a duration of 0, it calls QPlatformWindow::setAlertState(true), and expects the alert state to be reset when the window is next activated. Other calls to alert are ignored while alertState is still true. If alert was called for an active window, it would remain in the alert state until deactivated and activated again, and on some platforms calls to alert would be broken while deactivated. Alerting doesn't make sense for active windows, so we can simply ignore it, which was the behavior with Qt 4 on some platforms. Change-Id: Ia3324da4c89db711b63eb31cddf0bf742bb4e3b8 Found-By: Jan Noertemann <jan.noertemann@uni-dortmund.de> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Martin Gräßlin <mgraesslin@kde.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Send events when platform surfaces are created/about to be destroyedSean Harmer2014-11-171-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | These synchronously delivered events allow applications to correctly and conveniently handle native platform surfaces being destroyed. This is particularly useful when doing rendering on a non-gui thread as it allows to shutdown rendering before the native surface gets destroyed from under us. Task-number: QTBUG-42476 Task-number: QTBUG-42483 Change-Id: I63f41bbdb32f281d0f3b8ec2537eb2b0361f3bb3 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-091-5/+5
|\| | | | | | | Change-Id: I05fcd8dc66d9ad0dc76bb7f5bae05c9876bfba14
| * Do not re-create windows during application shutdownShawn Rutledge2014-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 9c3a58a913a7e59359146264ee59d40d703d4db2 causes any window to be re-created when the screen it is shown on is destroyed. This is for the use case of detaching one monitor while another remains. In QWindow::setScreen(), if the screen is null, it will be set to the primary screen. However during application shutdown, it may be that the primary screen has been destroyed before all the windows are destroyed; so trying to set it anyway will cause a crash. qtdeclarative/tests/auto/quick/qquickwindow was segfaulting, especially when running testWindowVisibilityOrder by itself. Change-Id: Ice6b30320ac563f0c70264aa5c57de21d2e4d56e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Doc: Use title case in section1 titlesNico Vertriest2014-09-301-4/+4
| | | | | | | | | | | | | | | | Using Python script title-cased.py Task-number: QTBUG-41250 Change-Id: I00d3d7a0b30db7304a7904efd6d63abd9a7b493b Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Introducing QWindow::requestUpdate().Gunnar Sletta2014-10-091-0/+44
|/ | | | | Change-Id: I0e2a09b53459a56d90dcd9043e694b19e2d77a9e Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-231-13/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isAlwaysAskOption was removed in 38621713150b663355ebeb799a5a50d8e39a3c38 so manually removed code in src/plugins/bearer/connman/qconnmanengine.cpp Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qcollator_macx.cpp src/corelib/tools/qstring.cpp src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow_p.h src/gui/text/qtextengine.cpp src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h src/plugins/platforms/android/qandroidinputcontext.cpp src/plugins/platforms/xcb/qglxintegration.cpp src/plugins/platforms/xcb/qglxintegration.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp src/testlib/qtestlog.cpp src/widgets/dialogs/qfiledialog.cpp src/widgets/kernel/qwindowcontainer.cpp tests/auto/corelib/tools/qcollator/tst_qcollator.cpp tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
| * Recreate child windows when changing screensDyami Caliri2014-08-281-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | When setting a new screen, the code calls QWindow::destroy(), which recursively destroys all child windows. It then calls create() on the top-level window, leaving child windows destroyed. This causes crashes if you have embedded native widgets. Task-number: QTBUG-40817 Change-Id: Iaace2589f48bbfd5faaf5ff95357ff43b310504a Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>