summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Change the ELF linker version script creator to take no parametersThiago Macieira2016-01-112-33/+21
| | | | | | | | It only needs stdin now, instead of stdin plus a separate file containing a list of file names. Change-Id: I9f3db030001e47e4a4e5ffff1425b76884cc7ca0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Revert "dbus: Print out 'serial' and 'serial reply to' with DBusMessage ↵Thiago Macieira2016-01-112-10/+4
| | | | | | | | | | operator<<." This reverts commit d3fe4f066f70bc8e4aef06b963444ecdbc3dd00f. Required to revert the parent commit. Change-Id: I1039e2ee65c0cd2c3209ea18bd3bd2d84a8daef3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Revert "dbus: Add method serial() and replySerial() to class DBusMessage."Thiago Macieira2016-01-115-54/+0
| | | | | | | | | This reverts commit 618e2cc081e09d9222418bd933876224675a7530. The original commit has a section of code that I failed to review properly and is of questionable functionality. Change-Id: I61c53d7b8b2aa7c3312292b017a18aba7da11bc5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix a few container detachmentsSérgio Martins2016-01-104-6/+6
| | | | | Change-Id: I018a1fe4bdbbe42b683793d7ddbf19f464d6e3b0 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* CMake: Make all tests link to Qt librariesKevin Funk2016-01-093-3/+4
| | | | | | | | | | | | | | | | | | This is needed as of commit v5.6.0-beta1~483 (Add an automatic use of the ELF-versioned QtCore symbol, 2015-10-20). Even if a translation unit only contains #include <QtCore/QString> int main(int,char**) { return 0; } it must link to QtCore which provides the qt_version_tag symbol. Change-Id: I827c0a7403320e7e5b384d8608face20fcecdaea Reviewed-by: Stephen Kelly <ske@ableton.com>
* QDate: fix calculation of the week number for the last days of 2020Thiago Macieira2016-01-092-11/+32
| | | | | | | | | | Off-by-one error: we should have calculated whether the current year is leap, not the next year. This affected any 53-week leap years. Task-number: QTBUG-50273 Change-Id: I134ce5db2f82468585ffffff14264cb9f12998fd Reviewed-by: Martin Klapetek <mklapetek@kde.org> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Make QUrl::removeAllQueryItems actually remove the query itemsThiago Macieira2016-01-091-2/+2
| | | | | | | | | We forgot to setQuery() after the query was modified. Task-number: QTBUG-49963 Change-Id: I11f559ef75544c50b3f8ffff1420148ba3092200 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: David Faure <david.faure@kdab.com>
* Windows: Output resulting DPI awareness in debug and warning output.Friedemann Kleint2016-01-083-4/+21
| | | | | | | | | | | | Fix the signature of QWindowsShcoreDLL::GetProcessDpiAwareness and output the value in the warning about failures of SetProcessDpiAwareness and in debug output. Failures occur when Qt is embedded into another application, for example Active Qt servers. Task-number: QTBUG-41186 Task-number: QTBUG-50206 Change-Id: I3fd6cba26826ee8bbfa0a34f129deb64797c947f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* xcb: Remove QXcbScreen::m_nativeGeometryAlexander Volkov2016-01-083-12/+4
| | | | | | | | | | | | It is equal to m_geometry since c173a5071906867de9da26ee8f49224b23c2ef1d (Remove QT_DEVICE_PIXEL_RATIO support from xcb). Also remove the declaration for QXcbWindow::screenForNativeGeometry(), which was forgotten to be removed in that commit. Change-Id: I8ec425a3bc111ec579e2e25c4fda8a02f1c8d09c Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Use backing store formats with alphaAllan Sandfeld Jensen2016-01-084-51/+42
| | | | | | | | | | | | | We depend on being able to punch holes in the backing store when integrating with FBO elements. To do that we need a format with an alpha channel. This was only working previously because RGB32 didn't mask when filling or when converting to ARGB32_PM, but other formats didn't. Also unifies the logic for getting alpha versions of QImage formats. Task-number: QTBUG-50281 Change-Id: Ied1325f60e2b67d9ea2dfa9701b06fc2231ebfca Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* fix docs creation in debug_and_release buildsOswald Buddenhagen2016-01-082-18/+25
| | | | | | | | | | | | qtAddToolEnv() (via qtPrepareTool()) does not write the tool wrapper scripts during build passes, while qt_docs.prf (which calls it for qdoc and qhelpgenerator) was loaded only during build passes. the consequence was that the makefiles tried calling non-existent scripts. amends 5418d77a1, sort of. Change-Id: I64ab573495ca339be4c7b5e8c6848b298b6cb605 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Fix wrapper batch file names for flex/bison in ANGLE buildJoerg Bornemann2016-01-081-0/+1
| | | | | | | | | The wrapper batch files were called wrapper.bat for both, flex and bison. Resolve this conflict by providing proper tool names. Change-Id: I7987f94976abc29302c9f6a696faa5c7d1fb030d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* un-nest enabling .la creation from enabling .pc creation (again)Oswald Buddenhagen2016-01-081-13/+12
| | | | | | | | | | | now that we don't create .pc files for private modules any more, the conditionals cannot be nested. amends 6c5d227da, partially reverting aa20e7f9d. Task-number: QTBUG-49763 Change-Id: I2578c83e0c767b6533abdb26bf4e8bcc8c416ef1 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* don't build with explicitlib on unixOswald Buddenhagen2016-01-081-2/+1
| | | | | | | | | judging by the history, this was only ever a workaround for poor rpath handling. we're supposed to be over that. Change-Id: I85601493a05a76ead999e707a2d2e9a430610981 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* don't rely on transitive dependenciesOswald Buddenhagen2016-01-086-0/+10
| | | | | | Change-Id: Ide872b452e02ebefb3eeb51464c8d59e8bf58bc4 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* windows: bump OpenGL blacklist versionLaszlo Agocs2016-01-081-1/+1
| | | | | Change-Id: If27c36de850b55907143e2b8a412fa8ac458fe97 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Work around GCC 6 warning about offset outside bounds of stringThiago Macieira2016-01-081-2/+2
| | | | | | | | | | | | | | This is a false positive because the only offset that can be outside the bounds was the last one (-1), which could not be reached in this line because of the qBound on the line before limiting the maximum value. The -1 wasn't generated by the Perl script embedded in the file anyway. qdbuserror.cpp:142:64: error: offset outside bounds of constant string [-Werror] Change-Id: I24a735698d3c4a719fc9ffff1425f8aad5e5978e Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* fix doc builds in paths with spacesOswald Buddenhagen2016-01-081-7/+7
| | | | | | Change-Id: Ie76411e3a4a8df69ff9b12a18480d1a987fac639 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Revert "use bindir instead of libdir when launching tools on windows"Oswald Buddenhagen2016-01-081-4/+2
| | | | | | | | | | | | | | | proper prefix builds don't have the redundant .dlls in bin (the copy step is simply omitted), so this is broken. the change would have to be done atomically with making DLLDESTDIR sane. This reverts commit 9b2e98245a95bec9179edf648d7b562d2d1cb692. Task-number: QTBUG-50065 Change-Id: I9ce0a2d1147a1a2d4bd2f22e619d5c737864a637 Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com> Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* add always_prepend mode to qtAddToolEnv()Oswald Buddenhagen2016-01-082-4/+9
| | | | | | | | | this is just an optimization/clarification: variables which are known to be never empty (like PATH) can be extended with less convoluted code. Change-Id: Ib365bbec8301673ed1c874979b4de19bc983dab1 Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* rewrite qtAddToolEnv()Oswald Buddenhagen2016-01-084-18/+60
| | | | | | | | | | | | | | | | | | | | | the primary purpose is making env var prepend mode work for unset variables on windows. this is achieved by using a conditional and delayed variable expansion. however, the latter is disabled by default and can be locally enabled only in batch files. therefore, write wrapper scripts and substitute them for the actual commands. we do this also on unix, both for consistency and simply because the commands look much less confusing. this change is slightly backwards-incompatible, as invoking qtAddToolEnv() multiple times on the same command will now make a total mess. also, invoking it on a command that contains 'make' macro expansions isn't a good idea, so testcase.prf needed an adjustment. the function is an undocumented internal, so Nobody Should Care (TM). this also reverts 80ebedecf9, as it's obsolete now. Change-Id: I8394b77868b495abcf27b688996ca74c40b80994 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Prospective fix for running cmake tests with -no-widgetsSimon Hausmann2016-01-071-1/+1
| | | | | | | Don't try to run test_interface when Qt is configured without QtWidgets. Change-Id: If6c376c250215c1d639b06881d16c0141091f288 Reviewed-by: Stephen Kelly <ske@ableton.com>
* Fix mac build with -no-widgetsStephen Kelly2016-01-072-0/+2
| | | | | | | Unused parameters are errors. Change-Id: I79782a8094491a953d6e838e6b8c5b9d6327f30a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix offset and size for native child rtt widgetsLaszlo Agocs2016-01-071-11/+7
| | | | | | | | | | | | | | | Render-to-texture widgets that are native children may have a non-zero offset telling the position within the top-level widget. The size is usually different (smaller) than the tlw's size as well. An unfortunate optimization attempt led to ignoring the size for native children with offset (0, 0). This resulted in interesting rendering artifacts whenever such widgets were placed in the top-left corner of the toplevel. This is now corrected. Task-number: QTBUG-48130 Change-Id: If449610c3f3333cb73ae149efaefd7ef42953951 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* doc: correct documentation of QT_AUTO_SCREEN_SCALE_FACTOR env varShawn Rutledge2016-01-071-1/+1
| | | | | Change-Id: I4fa57279b23911893a615fe8a3ce9854d0fec971 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* QtGui: Don't set screen to a child window when processing screen eventsBłażej Szczygieł2016-01-071-4/+6
| | | | | | | | | Setting a screen to a child window causes a warning message. This patch prevents the debug message by catching incorrect behavior made by QPA earlier. Change-Id: Idf3ac02290a18afc134f19c2b91348dc009ca4ca Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* QtGui: Fix obtaining the top level window at a pointBłażej Szczygieł2016-01-071-10/+30
| | | | | | | | | | Find the top level window on the primary virtual desktop first to avoid obtaining a window which doesn't belong to the primary virtual desktop when screen geometry is similar. Change-Id: I78fdfa0b5146d0ba9b912338adeb612c102c4ac3 Reviewed-by: Adam Majer <adamm@zombino.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* QPair<QRunnable*, int> is too large for QList to be efficient-ish.Volker Krause2016-01-072-6/+6
| | | | | | | | | | Qt3D is making heavy use of this, causing the QList node allocations to be among the top 10 per frame allocation sources. Switching to QVector fixes that. Change-Id: I3b4df329710f82bf8d6797ea1f0c79b288a08063 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* dbus: Print out 'serial' and 'serial reply to' with DBusMessage operator<<.Ralf Habacker2016-01-072-4/+10
| | | | | | | | | | | | The reply serial is displayed for method call returns and errors, while the serial is displayed for all message types. To see a message serial it is required to dump messages after sending, not before. Task-number: QTBUG-44490 Change-Id: I859f50d739ed059d5b2dfe1a2efdf04b906891a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* dbus: Add method serial() and replySerial() to class DBusMessage.Ralf Habacker2016-01-075-0/+54
| | | | | | | | | | | | | This patch includes setup of class member 'msg' in QDBusMessagePrivate::toDBusMessage() to be able to get the serial after message sending. Testcases for comparing the 'reply serial to' with the 'serial' are included. Task-number: QTBUG-44490 Change-Id: Iae7c48f5b0c70a6c5ae500904072b38b46dfd876 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows: Fix QWindowsInputContext for Japanese IME.YAMAMOTO Atsushi2016-01-071-1/+2
| | | | | | | | | | | | | | | | Change the QWindowsInputContext::composition if it is called with lParam has flags GCS_RESULTSTR and GCS_DELTASTART, it doesn't call endContextComposition. Task-number: QTBUG-49955 Change-Id: I49de3f239bf8a77414e433b255db08f227141158 Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Takumi ASAKI <takumi.asaki@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> (cherry picked from qtbase/786984e7e47a63094ad64ec86a4892cc5c0ad6d4) Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Android: Activate Qt::Popup windowsBogDan Vatra2016-01-061-2/+6
| | | | | | | | | | On Android, back button will send a CloseEvent to the focused window. This change will activate (focus) the Popup windows when they'll become visible. Task-number: QTBUG-46419 Change-Id: I6787435b24502bbf9a78662a0c6fd159d4ee2e8d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* QDesktopWidget::screenNumber(QPoint): fix handling of virtual desktopsBłażej Szczygieł2016-01-061-6/+19
| | | | | | | | | | | | On X11, QXcbVirtualDesktop represents an X11 screen while QScreen represents an X11 output. In the case that there are multiple screens (possibly with multiple outputs), calculate the screen number correctly: Find the screen index on the primary virtual desktop first to avoid obtaining a screen index which doesn't belong to the primary virtual desktop when screen geometry is similar. Change-Id: I4cbb29b7aa7cd2125759ffbbbe3db4e934feaeae Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* QDesktopWidget::screenNumber(QWidget*): check virtual sibling screensBłażej Szczygieł2016-01-061-17/+35
| | | | | | | | | | | | | | | | | | Find the root widget only when more than one virtual desktop exists and find the screen index using virtual siblings from this root widget. Use intersecting rects instead of middle point to obtain the screen. This can help to get the screen index when the middle point is outside the screen geometry, but part of the window is still on the screen. If the widget is completely outside the screen geometry, -1 is returned. This commit amends: a6b2a4642f07cd6e52b447e1e441b257990a8d03 Change-Id: I80247fc1956a82c487ee6f728d1576bf48b28748 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* QtGui: Don't set a screen to a child windowBłażej Szczygieł2016-01-061-7/+9
| | | | | | | | This is a partial revert of eaa3a9d0108cdf692f1686cafefb7b834f0e5af6 Task-number: QTBUG-50081 Change-Id: Ic3dc4daa90d7a968a4ebf45d3029c99a12985686 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* QFontDialog: optimize allocation of QFontDialogOptionsMarc Mutz2016-01-061-1/+2
| | | | | | | | Use QSharedPointer::create(), to fuse control block and payload into a single memory allocation. Change-Id: I8d87c73566c3be960e957ec0b5419a77da2fc8c9 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Unbreak ubsan developer-buildMarc Mutz2016-01-067-8/+21
| | | | | | | | | | | | | | | | | | | | | | | GCC 5.3's undefined-behavior sanitizer checks that the declared type of the object is a base class of the dynamic type of the object on each access to a member of a class type. It therefore requires the typeinfo for these types, which for polymorphic types is emitted in the TU where the vtable is emitted, too. QFileDialogPrivate is a polymorphic non-exported class, so this failed at link-time. Ditto for the other cases. Fix by autotest-exporting the classs. Also, where applicable, de-inline the dtors, so the vtable (and typeinfo) are pinned to one TU, and the ctor, just because it's the correct thing to do. Change-Id: I2b7dba776282a2809c80eb2bc36440d7d698f926 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fixed recently added "excess colon in front of brace" qmake warningOliver Wolff2016-01-064-5/+5
| | | | | Change-Id: I3a650bb4e27cad00f639e6445c36fa8b69edb5b9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* WinCE: Remove QIncrementalSleepTimer from QProcess::waitForFinishedJoerg Bornemann2016-01-061-12/+6
| | | | | | | | | | | Remove a superfluous loop and thus the usage of QIncrementalSleepTimer from QProcess::waitForFinished. We just wait for the process handle. There's no need for a loop that checks multiple wait conditions. This enables us to remove QWindowsPipeWriter from the Windows CE port in a subsequent commit. Change-Id: If6a82405227cf145263dba3726bae959e6871d0e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QString: prevent resize() from shedding capacityMarc Mutz2016-01-061-14/+5
| | | | | | | | | | ...even if reserve() hasn't been called before. [ChangeLog][QtCore][QString] resize() will no longer shrink the capacity. That means resize(0) now reliably preserves capacity(). Change-Id: If499a20990bbf3a20553da14e50a42918d310c9f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fixed crash on iOS devices due to unsupported selector.Harald Meyer2016-01-061-2/+4
| | | | | | | | Added check for traiCollection selector. Task-number: QTBUG-50159 Change-Id: Ie3efafe9e22e59aef862a681ad733f2bb0a5ba49 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Diaglib: Output more information about QWindow.Friedemann Kleint2016-01-061-0/+13
| | | | | | | | | Output surface class/type, screen name and scaling factors. Task-number: QTBUG-50206 Change-Id: I88d3494962b29985cd9e492c1761361b73e0172e Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Remove doc for non-existent QTest::qCompare() variant.Edward Welbourne2016-01-061-4/+0
| | | | | | | There's no variant with bool first argument. Change-Id: Ib18b50ed6271d21253d075dc72b6e2b8744cf131 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Windows/DirectWrite: Dynamically load GetUserDefaultLocaleName().Friedemann Kleint2016-01-061-1/+14
| | | | | | | | The function is not available on Windows XP. Task-number: QTBUG-50188 Change-Id: I4ded1a4eb37af84979c3ce1a9af0d95da60b56ac Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Avoid unnecessary detaching of the pending deletions list.Volker Krause2016-01-061-3/+3
| | | | | | | | | | | This code seems to be hit three times per frame in a hybrid QQ2/Qt3D app, quickly generating thousands of allocations here via the detach in begin(). Heaptrack confirms they are all gone now. Change-Id: I7d09f3f5c2b24a2590b701216715055751306e82 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Blacklist failing tst_QFile tests (OS X)Timur Pocheptsov2016-01-061-0/+4
| | | | | | | | | | | openStandardStreamsFileDescriptors and openStandardStreamsBufferedStreams fail on OS X: lseek somehow works on sequential streams (standard streams) but QFile has pos() == 0 (since it's sequential). Change-Id: I6a6161c012a91de189f59c533880fb8fe7a66d37 Task-number: QTBUG-49841 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
* Remove declaration of method nowhere definedEdward Welbourne2016-01-061-2/+0
| | | | | Change-Id: Ia95aac626803a85fea0bc0bc99972eb34215d351 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Fix potential crash in FreeType font database for WinCETakumi ASAKI2016-01-061-1/+1
| | | | | Change-Id: Iea922c2561d59a67cc26c300325a3f198baaafa7 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* xcb: fix drag and drop when window is hiddenBłażej Szczygieł2016-01-054-2/+29
| | | | | | | | | | | | | | This patch fixes drag and drop operation on XCB platform when window will be hidden. The window can be hidden during dnd operation by switching virtual desktops or by minimizing all windows (show desktop) using key shortcut. The ShapedPixmapWindow must grab mouse before dnd operation if mouse is not grabbed by other window (like in Qt4). Task-number: QTBUG-46243 Change-Id: I807bc842719a2d0ea0f4dcb733c06c1fd08813e1 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* xcb: don't select XInput events on the root windowShawn Rutledge2016-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | If we select XInput events, then when the mouse is clicked, there will not be a fallback to a core pointer event. But a typical Qt application doesn't own the root window. If the window manager (such as OpenBox, Awesome or fvwm) relies on receiving core pointer click events, e.g. to show a desktop menu, then each time a device is hotplugged while a Qt application is running, we would select XI2 events and thereby prevent the window manager from receiving them. QDesktopWidget's native window is added to m_mapper, even when it isn't mapped. Then after hotplugging there's a hierarchy event, and that calls xi2Select for every window in m_mapper. The assumption with this patch is that the root window does need to be in m_mapper in case the QDesktopWidget is shown (that was done already in Qt 5.1: fca94fa5ed8321e84e7b0ff515620fbb901db545), but xi2Select must avoid selecting XI2 events on it to fix this bug. Task-number: QTBUG-49952 Change-Id: I5c160e879d93fadfce14120ef2e89a4f71d4f599 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>