summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-131-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config_help.txt configure mkspecs/features/uikit/sdk.prf src/corelib/global/qhooks.cpp src/corelib/io/qfilesystemwatcher.cpp src/corelib/io/qlockfile_unix.cpp src/corelib/tools/qalgorithms.h src/gui/kernel/qwindowsysteminterface.h src/gui/text/qtextdocument_p.cpp src/network/access/access.pri src/network/access/qnetworkaccessmanager.cpp src/network/access/qnetworkreplynsurlconnectionimpl.mm src/src.pro src/testlib/qtestcase.cpp src/widgets/kernel/qwidgetbackingstore_p.h src/widgets/styles/qwindowscestyle.cpp src/widgets/styles/qwindowsmobilestyle.cpp tests/auto/corelib/io/qdiriterator/qdiriterator.pro tests/auto/corelib/io/qfileinfo/qfileinfo.pro tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp tools/configure/configureapp.cpp Change-Id: Ibf7fb9c8cf263a810ade82f821345d0725c57c67
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-061-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf config.tests/unix/nis/nis.cpp mkspecs/unsupported/freebsd-g++/qplatformdefs.h src/corelib/tools/qdatetime.cpp src/corelib/tools/qsimd.cpp src/corelib/tools/qsimd_p.h src/network/access/access.pri src/network/access/qnetworkreplynsurlconnectionimpl.mm src/network/access/qnetworkreplynsurlconnectionimpl_p.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/printsupport/windows/qwindowsprintdevice.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp tests/auto/network/access/qnetworkreply/BLACKLIST tests/auto/widgets/widgets/qopenglwidget/BLACKLIST Change-Id: I4b32055bbf922392ef0264fd403405416fffee57
| | * Update the high scaling settings after an XCB screen is addedThiago Macieira2016-05-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this, the newly-added screen will still have the scaleFactorProperty unset, which means QScreen::devicePixelRatio will return 1.0. That differs from what happens if the screen had been detected when the application started. This is part of the fix for the bug report, but insufficient. Task-number: QTBUG-53500 Change-Id: Id3aab65533904562a6cbfffd14502365d86bd36d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Remove checkEvent function no-one usesAlbert Astals Cid2016-05-311-18/+0
|/ / | | | | | | | | | | | | | | It was confusing me until i found we have another one so i think it makes sense to remove it if no-one uses it. Change-Id: I49bdb8d795f7617c193c8b62690ee34dc154d2f8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | add AA_CompressHighFrequencyEvents to control compression on xcbShawn Rutledge2016-05-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 7edd10e6c added this compression feature, but some applications may need to disable it. [ChangeLog][X11] It's now possible to unset AA_CompressHighFrequencyEvents to disable the new X event compression feature that was added in 5.6.0. This is a replacement for the WA_NoX11EventCompression flag in Qt 4. Task-number: QTBUG-44964 Change-Id: I37a9c8a4831f1c02eda0f03b54125f3255d25500 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-061-1/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qtestlib/tutorial5/containers.cpp examples/widgets/tools/tools.pro src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/network/kernel/qdnslookup_unix.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp tools/configure/configureapp.cpp Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
| * xcb: don't compress tablet motion eventsShawn Rutledge2016-05-041-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7edd10e6c added this compression feature, but it's not a good idea for drawing-tablet applications, because smooth drawing depends on receiving every movement of the stylus. Also show the device ID in qt.qpa.input.devices category logging. [ChangeLog][X11] The new X event compression feature that was added in 5.6.0 no longer applies to motion events from drawing tablets. Task-number: QTBUG-44964 Change-Id: Icd2ca8ca77d8f80c2f39160c74208db10e382501 Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* | xcb: eradicate Q_FOREACH loops [needing qAsConst()]Marc Mutz2016-04-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | ... by replacing them with C++11 range-for loops. To avoid detaches of these mutable Qt containers, wrap the container in qAsConst(). Saves more than 2KiB in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: I9610e711edc01d2a1ba19fef65d6b000ffc77255 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | xcb: eradicate Q_FOREACH loops [already const]Marc Mutz2016-04-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | ... (or trivially marked const) local variables, parameters, or data members, by replacing them with C++11 range-for loops. Saves ~1.5KiB in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: Ief6c0cbf08bcdcda28cb8ce6d72a13b7b6ac59c2 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-271-0/+6
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_win.cpp src/widgets/itemviews/qheaderview.cpp Change-Id: I0a59ade9cd6e91f770fdf298a7d72a41e79fd761
| * xcb: Properly process enter/leave eventsBłażej Szczygieł2016-04-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ignore enter/leave events when there is a window under mouse button. Unset window under mouse button if other window is grabbed. Smarter ignoring (un)grab ancestor enter/leave event. Ignore ungrab inferior leave event. Amends: b9f76db30d261421e4da58f29053181af04ceb4d Task-number: QTBUG-46576 Task-number: QTBUG-51573 Task-number: QTBUG-52332 Task-number: QTBUG-52488 Change-Id: I8d926309aa60bb8929728691c31ecf93d1e299ad Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | xcb: eradicate Q_FOREACH loops [rvalues]Marc Mutz2016-04-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | ... by replacing them with C++11 range-for loops. This is the simplest of the patch series: Q_FOREACH took a copy, so we do, too. Except we don't, since we're just catching the return value that comes out of the function (RVO). We can't feed the rvalues into range-for, because they are non-const and would thus detach. Change-Id: I982851f15868e62b7a191676ddf4ba6b92c0a42d Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QXcbConnection: add some qAsConst()Marc Mutz2016-04-261-7/+7
| | | | | | | | | | | | | | | | | | | | ... to prevent hidden detach(es| attempts). Saves ~160b in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: I74e1f1304c522b9a4349918e99f562853ec8684e Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QXcbConnection: mark some more methods constMarc Mutz2016-04-261-3/+3
| | | | | | | | | | | | | | ... because we can. Change-Id: Ib5fd281a63ced9dce0de1f74fc849da6c6fc162a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-251-0/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test configure src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java src/corelib/global/qglobal.cpp src/widgets/kernel/qapplication.cpp src/widgets/styles/qwindowsvistastyle.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp Change-Id: I067083f34e5290aa5f7565e40c30a069cc37b83a
| * xcb: Fix interpretation of the size from RRCrtcChangeNotifyAlexander Volkov2016-04-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The size in RRCrtcChangeNotify is a size of the mode and it is not rotated. At the same time when we call RRGetCrtcInfo, it returns a rotated size, which is then passed to QXcbScreen::updateGeometry(const QRect &geom, uint8_t rotation). So to pass the expected size to QXcbScreen::updateGeometry() after receiving RRCrtcChangeNotify, we should rotate the size according the screen rotation. Change-Id: If5b5b52403b077d3cd64b9a05d938bb9ac00b1e0 Reviewed-by: Daniel Vrátil <daniel.vratil@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | xcb: remove tablet->mouse event synth; harmonize handle/report methodsShawn Rutledge2016-04-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The synthesis of mouse events for unhandled tablet events is now in cross-platform code, so the platform plugins don't need to do it. xi2HandleTabletEvent's signature included an eventListener which is no longer needed; removing it makes it look needlessly inconsistent with the signature of xi2ReportTabletEvent; and while we're at it, might as well make the events const and deal with the repercussions. Task-number: QTBUG-47007 Change-Id: I0f76c8ed2d2b0baed0652bc68286f1734b8b72ff Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | xcb: replace qt.xcb.glintegration logging category with qt.qpa.glShawn Rutledge2016-04-081-4/+4
| | | | | | | | | | | | | | | | This is more concise, consistent with Windows, and fits the pattern that all logging categories in QPA plugins should begin with qt.qpa. Change-Id: Ica169b547cb3d816e6e2c0449f0e4a0c58883b9a Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* | Reduce verbosity for QT_XCB_GL_INTEGRATION=noneGatis Paeglis2016-04-071-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | When QT_XCB_GL_INTEGRATION=none we were printing: 1) qt.xcb.glintegration: QT_XCB_GL_INTEGRATION is set to "none" 2) qt.xcb.glintegration: Choosing xcb gl-integration based on following priority () 3) qt.xcb.glintegration: Failed to create xcb gl-integration Omit line 2 (useless) and line 3 (misleading). Change-Id: If5e65a5bc8cc4a1fa97858049a26aac9a9535950 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-03-131-1/+3
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-111-1/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define and undef in src/corelib/tools/qsimd_p.h. This change is also squashed with "Fall back to c++11 standard compiler flag for host builds" which is done by Peter Seiderer. Conflicts: mkspecs/features/default_post.prf src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch src/3rdparty/sqlite/sqlite3.c src/corelib/tools/qsimd_p.h src/gui/kernel/qevent.cpp src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface_p.h src/plugins/bearer/blackberry/blackberry.pro src/plugins/platforms/cocoa/qcocoasystemsettings.mm src/plugins/platformthemes/gtk2/gtk2.pro src/plugins/styles/bb10style/bb10style.pro src/sql/drivers/sqlite2/qsql_sqlite2.cpp tools/configure/configureapp.cpp Task-number: QTBUG-51644 Done-with: Peter Seiderer <ps.report@gmx.net> Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
| | * Silence the warning: Unhandled client message: "_GTK_LOAD_ICONTHEMES"Thiago Macieira2016-03-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Qt Creator keeps printing that warning. Change-Id: I0c94a5c2846b48c8aea7ffff1435775f04234656 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | QtBase (remainder): use printf-style qWarning/qDebug where possible (I)Marc Mutz2016-03-121-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this first part, replace qWarning() << "" with qWarning("..."). Had to fix broken qImDebug() definition. Instead of defining it as a nullary macro in the QT_NO_DEBUG case and as a variadic macro in the other, define it in both cases, as is customary, as a non-function macro so that overload selection works without requiring variadic macro support of the compiler. Saves e.g. ~250b in text size in QtPrintSupport on optimized GCC 5.3 AMD64 builds. Change-Id: Ie30fe2f7942115d5dbf99fff1750ae0d477c379f Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-111-3/+14
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemwatcher_win.cpp src/corelib/plugin/plugin.pri src/plugins/platforms/cocoa/qcocoaaccessibility.mm tests/auto/corelib/tools/qlocale/tst_qlocale.cpp Change-Id: Id6824631252609a75eff8b68792e4d10095c8fc1
| * xcb: XInput2 fixes, enter/leave event fixesBłażej Szczygieł2016-02-061-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Added enter/leave event handling in XInput2 to avoid problems with those events when the mouse is grabbed. This commit amends: 53d289ec4c0f512a3475da4bbf1f940cd6838ace This commit amends: ed2e15780385f7cf0a0d3aedc9cb2059d470bd58 Task-number: QTBUG-50340 Change-Id: I7a120b46daa4f8fa4c218346273ae90b6abfa156 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * xcb: Take into account the orientation of touch pointsAlexander Volkov2016-02-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add support for ABS_MT_ORIENTATION value. Linux kernel multi-touch protocol allows it to be in a wide range: https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt, but we need only to know whether the touch point rect is rotated by 90 degress. So adjust the angle to the closest axis. Change-Id: Ie20725dc4bef509e2f9b19571efc69502d00c019 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-02-021-1/+1
|\| | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/plugins/platforms/cocoa/qcocoahelpers.mm src/tools/qlalr/cppgenerator.cpp Change-Id: I0103ca076a9aca7118b2fd99f0fdaf81055998c3
| * Don't use QStringLiteral in comparisonsAnton Kudryavtsev2016-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For QLatin1String, operator== is overloaded, so comparing to a latin-1 (C) string literal is efficient, since strlen() is comparatively fast. OTOH, QStringLiteral, when not using RVO, litters the code with QString dtor calls, which are not inline. Worse, absent lambdas, it even allocates memory. So, just compare using QLatin1String instead. Change-Id: I761b2b26ab5b416bc695f524a9ee607dacf0a7b2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QXcbConnection: use erase and std::remove_if with QVectorAnton Kudryavtsev2016-01-091-7/+6
| | | | | | | | | | | | | | ... instead of using erase in a loop, with quadratic complexity. Change-Id: Ia5201e0bedca7abec6d485505f61f3f76a028bd1 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into devFrederik Gladhorn2016-01-081-6/+53
|\| | | | | | | | | | | Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
| * xcb: fix drag and drop when window is hiddenBłażej Szczygieł2016-01-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Add Xinerama supportBłażej Szczygieł2015-12-221-6/+48
| | | | | | | | | | | | | | | | | | This patch makes possible to use Xinerama screens in XCB platform plugin. Task-number: QTBUG-48615 Change-Id: Ib4dbfcdfadc46d2875a2fc09e8b852181edfbed2 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-181-121/+152
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/painting.pri src/plugins/platforms/xcb/qxcbconnection.cpp tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro tests/auto/corelib/tools/qlocale/test/test.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp tools/configure/environment.cpp Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
| * xcb: Use a placeholder QScreen when there are no outputs connectedBłażej Szczygieł2015-12-111-121/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If no screens are available, windows could disappear, could stop rendering graphics, or the application could crash. This is a real use case in several scenarios: with x11vnc, when all monitors are physically disconnected from a desktop machine, or in some cases even when the monitor sleeps. Now when the last screen is disconnected, it is transformed into a fake screen. When a physical screen appears, the fake QScreen is transformed into a representation of the physical screen. Every virtual desktop has its own fake screen, and primary screens must belong to the primary virtual desktop. It fixes updating screen geometry on temporarily disabled screens in the middle of the mode switch. Expected results: Windows don't disappear, the application doesn't crash, and QMenu is displayed on the appropriate screen. This reverts patch 51ada7734ad780178ecced11e0dff454dfc2e5f2 Change-Id: I6e8eb682b0c8425d08ffdaecbd4c6c7700c914b4 Task-number: QTBUG-42985 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Xcb: Fix debugging codeUlf Hermann2015-12-101-4/+7
| | | | | | | | | | | | | | | | | | | | We need to pass the correct connection and we need a specialization for reply pointers. Also, there is not much of a point in first creating a QString from a QByteArray, only to retrieve a QByteArray again. Change-Id: Ia1bb5655f6229638e3bd2339acadeffc80561b9e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Use Q_UNLIKELY for every qFatal()/qCritical()Marc Mutz2015-11-291-2/+2
|/ | | | | | | | | | | | | | | | | | | | | 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>
* xcb: Fix windows opened from keyboard are not active on Marco or Xfwm4Błażej Szczygieł2015-11-231-1/+5
| | | | | | | | | | | Windows opened from keyboard (e.g. keyboard shortcut) are not active on Marco or Xfwm4. These windows are under the window which received the key event. This patch fixes the problem by updating XCB timestamp on every key press like Qt4 does. Task-number: QTBUG-49567 Change-Id: I9ea483784ac361d0b645d0f11f643868b367ac2c Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* xcb: Process _NET_WORKAREA and screen geometry changes separatelyAlexander Volkov2015-11-171-1/+10
| | | | | | | | | | | | | | This commit allows to avoid superfluous calls to the X server. We don't request _NET_WORKAREA values when the screen geometry changes, and we avoid RandR calls on each _NET_WORKAREA change. Besides, update the available geometry of all screens with the same root window, rather than only that one which corresponds to Qt::Desktop window. Change-Id: I5ec624717f5f261c986cd9aaf2425f22985e11c0 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* xcb: Handle screen siblings in QXcbVirtualDesktopAlexander Volkov2015-11-171-10/+5
| | | | | | Change-Id: I2f3c3ad75bb3914667cf6f27dc2d91aac103607b Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* xcb: Use XShape for DnD when a compositing manager is not runningAlexander Volkov2015-10-141-3/+42
| | | | | | | | | Otherwise transparent areas of the drag'n'drop pixmap are painted with the black color. Task-number: QTBUG-45193 Change-Id: I55b7c7caababe13584fa1c7a52835f112e20f920 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Libraries: Fix single-character string literals.Friedemann Kleint2015-10-131-1/+1
| | | | | | | Use character literals where applicable. Change-Id: I8e198774c2247c1cc1d852a41b59b301199b7878 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* xcb: fix yet another crash when screens are disconnectedShawn Rutledge2015-09-241-2/+4
| | | | | | | | | Can't assume that m_screens is not an empty list. Task-number: QTBUG-42985 Change-Id: I6f9422638c219123dc898813910d03c7afbd1450 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Silence the _COMPIZ_TOOLKIT_ACTION warning.Gatis Paeglis2015-09-221-1/+2
| | | | | | | | | | It is still unclear how to act on those messages. We are already doing this for other Compiz messages -_COMPIZ_DECOR_*. Change-Id: I45f76b5f56ee1b07eb4c7398cc85b5d7bed86c4c Task-number: QTBUG-46954 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* xcb: Compress mouse motion and touch update eventsGatis Paeglis2015-09-221-73/+147
| | | | | | | | | | | | | | | | | | | | | | The current version of the mouse motion event compression algorithm does not work with certain configurations - situations where we get one XCB_GE_GENERIC event between every XCB_MOTION_NOTIFY event. The new implementation tries to be less fragile. The previous approach checked "is *the next* event the same type as the current event", the new check asks "have we buffered more events of the same type as the current event". We buffer events of the same type only when the main thread is unresponsive. This patch adds event compression for XI_TouchUpdate in addition to the fix for motion even compression. Change-Id: Ie215eb5969e2060e463ebe48e3d3007390a30deb Task-number: QTBUG-40889 Task-number: QTBUG-47069 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Notify when the primary screen changesAleix Pol2015-09-081-6/+3
| | | | | | | | | | | | | Makes it possible to notify that the QGuiApplication::primaryScreen has changed. XCB backend adopts the new API, as it was accessing QGuiApplication private API directly. Change-Id: Icde05c44138265f865fa42d2cd6974c552fdc5e2 Task-number: QTBUG-38404 Task-number: QTBUG-40659 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Harmonize input context selectionBernd Weimer2015-08-251-3/+0
| | | | | | | | | | | | | | | | | Input context selection works differently across platforms. On some platforms it is not possible to request a specific context at all (e.g. Wayland). This will be unified, depending on the environment variable "QT_IM_MODULE", you will get: - null: default (platform) context, if defined (otherwise no context) - empty: no context - set: set one, if it exists and is valid (otherwise no context) [ChangeLog][Platform Specific Changes] Haromnized input context selection. QT_IM_MODULE environment variable will be taken into account. Change-Id: Ic8f826fbc6ace25941cd19b9b086943e848fbe01 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
* Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-061-19/+45
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/qt-cpp-defines.qdocconf src/3rdparty/forkfd/forkfd.c src/corelib/codecs/qtextcodec.cpp src/corelib/kernel/qmetatype.cpp src/corelib/tools/qset.qdoc src/gui/accessible/qaccessible.cpp src/gui/image/qpixmapcache.cpp src/opengl/qgl.cpp src/tools/qdoc/generator.cpp src/widgets/kernel/qwidget.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
| * Let the linker find xcb_poll_for_queued_event for usThiago Macieira2015-07-281-6/+9
| | | | | | | | | | | | | | | | It's more efficient than we are. This also enables the code to work in the unlikely case of an ELF platform without RTLD_DEFAULT. Change-Id: Ib306f8f647014b399b87ffff13f12f8aeeb2589a Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
| * Make the function pointer to xcb_poll_for_queued_event not a memberThiago Macieira2015-07-281-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | In the normal case, this change is a no-op. In case RTLD_DEFAULT isn't defined, this makes the job of the optimizer easier to detect that the static variable is never modified and that it can do a lot of dead code elimination. This also enables the optimization in the next commit. Change-Id: Ib306f8f647014b399b87ffff13f12f40a359233b Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>