summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
Commit message (Collapse)AuthorAgeFilesLines
...
| * xcb: don't compress tablet motion eventsShawn Rutledge2016-05-043-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * egl: Reshuffle headers to help less fortunate systems with X11Laszlo Agocs2016-05-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EGL headers including X headers has traditionally been problematic due to getting macros for Status, None, etc. In most cases this is not an issue anymore because on embedded one will almost always use a driver targeting the framebuffer or DRM/KMS and therefore the EGL headers do not pull in X dependencies. Furthermore, Mesa supports MESA_EGL_NO_X11_HEADERS which we set, avoiding the problem altogether with Mesa regardless of targeting X11 or KMS. However, other drivers do not have this option. On i.MX6 for instance, targeting X11 is problematic due to not having EGL_API_FB defined, which in turn means the EGL headers pulls in X headers in order to be able to define the native display and window types as Display and Window. Try to play nice with this use case by reshuffling the includes and undefining the problematic names. Task-number: QTBUG-52928 Change-Id: I059f26b340b6e442e7296055915d18f5a1ce7a7f Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
| * xcb: Fix drag and drop to Emacs.Urs Fleisch2016-05-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, the improved patch for QTBUG-45812 fixed things for Chromium, but did no longer work for Emacs. This fixes commit [269fdb] to make it work for both Emacs and Chromium. Task-number: QTBUG-45812 Change-Id: I2fca708503f27679681bc6959de1ad94943a063e Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> 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-05-021-11/+44
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-291-11/+44
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qml_module.prf mkspecs/features/qt_common.prf src/gui/text/qzip.cpp src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/windows/array.h src/testlib/qtestcase.cpp src/widgets/dialogs/qfilesystemmodel.h Change-Id: Ie41c5868415b81f7693c80e045497035504bb210
| | * xcb: Fix drag and drop to applications like Emacs and Chromium.Urs Fleisch2016-04-251-11/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drops without matching time stamp do not work. I have fixed the issue by reanimating the findXdndAwareParent() function (adapted to XCB) and using it to find a matching transaction if all else fails. Task-number: QTBUG-45812 Change-Id: Ibca15bbab02ccf2f25280418e9edf36972ebf9a0 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | | xcb: support nested paint operations in remote scenariosLouai Al-Khanji2016-04-292-5/+14
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent changes to the xcb platform plugin added logic to paint to a server-side X Pixmap when the MIT-SHM extension is unavailable. Those changes also added logic to keep track of the dirty areas that need to be flushed to the server from the backing store when the backing store is flushed to a window. Because a single QRegion was used to track those areas, nested paint operations no longer accurately tracked all the dirty areas. Consider: void Widget::paintEvent(QPaintEvent *) { QPainter p1(this); for (int i = 0; longRunningOperationInProgress(); i++) { QPixmap pixmap(size()); QPainter p2(&pixmap); p2.drawText(pixmap.rect(), i & 1 ? "Working." : "Working.."); p2.end(); QBackingStore *bs = backingStore(); bs->beginPaint(rect()); p1.drawPixmap(0, 0, pixmap); bs->endPaint(); bs->flush(rect(), windowHandle()); } p1.fillRect(rect(), Qt::red); p1.drawText(rect(), "Done!"); } While this code could be restructured, it is a common pattern in legacy Qt applications which cannot be easily changed. Change-Id: I3b919266abe41c96a584cb02f41cafac3f9d1d7c Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | xcb: eradicate Q_FOREACH loops [needing qAsConst()]Marc Mutz2016-04-285-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | ... 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 [const-& returns]Marc Mutz2016-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | ... by replacing them with C++11 range-for loops. The function QObject::children() returns by const-reference, so its result can be passed to range-for without further changes. Saves ~300B in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: I8360e946774b0d30233c0fa68f318872da61e867 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | xcb: eradicate Q_FOREACH loops [already const]Marc Mutz2016-04-272-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | ... (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>
* | Optimize QXcbScreen::visualForFormat()Marc Mutz2016-04-271-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... by stopping the work when finding the first RGB candidate, and otherwise only remembering the first candidate as a fall-back. This way, we don't need to allocate memory as we did when collecting the candidates in a QVector. Saves more than 800b in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: I7d0cae69fa421fed881dd5a0f1aa45035d8f7461 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | xcb: don't iterate over .keys()Marc Mutz2016-04-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | ... iterate over the container itself instead. Avoids temporary QList creation as well as the lookup cost when actually calling value(key). Saves more than 1KiB in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: If4b2fb7eada0e9cde72ab101a5f6e5cb1ba64054 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-273-15/+64
|\| | | | | | | | | | | | | | | 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-223-15/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-264-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | ... 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>
* | QXcbIntegration: simplify a switchMarc Mutz2016-04-261-11/+19
| | | | | | | | | | | | | | | | | | | | | | ... by aggregating similar blocks under multiple case labels, and caching functions's return values. Even saves a few bytes in text size on optimized GCC 6.0 Linux AMD64 builds. Change-Id: I5784567a09732b4e55b64163b69e7a946f0783ae Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QXcbConnection: mark some more methods constMarc Mutz2016-04-262-6/+6
| | | | | | | | | | | | | | ... 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-252-1/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | 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 compilation with -no-c++11Kai Koehne2016-04-171-1/+1
| | | | | | | | | | | | | | | | | | nullptr (introduced in commit d7db6c6c194) is a C++11 keyword. Change-Id: Id6aa639f5d2ddbe8b228f8648754c2b24ef53799 Reviewed-by: David Rosca <nowrep@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Uli Schlachter <psychon@znc.in>
| * 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-193-40/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Fix image scanline paddingLouai Al-Khanji2016-04-151-15/+22
| | | | | | | | | | | | | | | | | | | | Commit b9d386f2ccd69c7f6a766a6d90a6024eeb48e90a neglects to account for the scanline padding requested by the X server. This can result in visual artifacts if padding is required. This commit fixes this by factoring in the X server's requested scanline padding when calculating image stride. Change-Id: I082cb7101ec3a9c554b9b58a76f53f780b87d31e Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | xcb: Optimize non-shm backing store flushingLouai Al-Khanji2016-04-101-21/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately the functions in xcb-image are quite slow, both for the subimage generation and the byte order swapping. xcb_image_subimage is implemented as a pixel by pixel copy, and the xcb byte swapping is done manually without utilizing potential CPU instructions to accelerate the swap. Replace both with their Qt equivalents. Change-Id: I1fe1fe5d9576fdf2bab4a8c401d2a6bb842c2727 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | X11: Better support non-32bit visualsLouai Al-Khanji2016-04-0912-129/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch improves support for non-32bit screen configurations on X. The patch mostly touches the xcb platform plugin but the changes to the glx convenience functions do affect e.g. the offscreen plugin as well. Since QWindow instances are now by default of type RasterGL instead of Raster the majority of all windows are in fact instances of QXcbGlxWindow. This means that the eventual QSurfaceFormat that we use is chosen based on the available OpenGL configurations. Here the GLX config resolution code did not do a very good job in trying to find the closest match relative to the requested QSurfaceFormat, instead preferring higher bit depths. This is an issue since many configurations support 32-bit windows even if the screen itself has a root window with depth 16. In particular, servers supporting both GLX and Render are very likely to have such visuals. Particularly affected are remote X connections - even if the application itself makes no use of OpenGL at all! The changes introduced by this patch are as follows: 1. Improve the GLX visual selection logic 2. Improve the xcb visual selection logic 3. Remove duplicated visual lookup for OpenGL-enabled windows 4. Configure the default QSurfaceFormat to match the primary screen depth Change-Id: Id1c176359e63a4581410e20350db5ac2c083e1cf Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | xcb: replace qt.xcb.glintegration logging category with qt.qpa.glShawn Rutledge2016-04-085-12/+12
| | | | | | | | | | | | | | | | 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 remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-071-2/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qftp.cpp src/widgets/itemviews/qheaderview.cpp src/widgets/itemviews/qlistview.cpp tests/auto/network/access/qftp/tst_qftp.cpp Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9
| * Fix assert with Meta modifierJoni Poikelin2016-04-051-2/+1
| | | | | | | | | | | | | | | | | | Meta modifier is not found in some configurations which triggers an assert. Instead of assert, ignore the modifier if it is not found. Task-number: QTBUG-52298 Change-Id: I258cee4014a30162afebb423eadaf07ef0ed6a1f Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | QXcbBackingStore: Fix scrolling when backed with native X PixmapLouai Al-Khanji2016-03-301-32/+62
| | | | | | | | | | | | Change-Id: I7c6618783996c814dc6873b950e2c35e95680f11 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-214-9/+37
|\| | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qgtkstyle_p.cpp tests/auto/corelib/io/qtextstream/test/test.pro tests/auto/corelib/plugin/plugin.pro Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
| * xcb: Merge _NET_WM_STATE hints instead of overwritingDavid Rosca2016-03-181-8/+24
| | | | | | | | | | | | | | | | | | | | | | This makes possible to set custom _NET_WM_STATE hints before showing the window. Change-Id: I86ad3863f7a8b3bb610a31b9af4b02c9d38eb111 Task-number: QTBUG-26978 Reviewed-by: Ilya Kotov Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Uli Schlachter <psychon@znc.in>
| * xcb: Initialize all xcb_client_message_event_t members before useShawn Rutledge2016-03-154-1/+13
| | | | | | | | | | Change-Id: I01e4b69b138fd19fc7e67751d93adebc1326b2f9 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-03-1312-43/+67
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-1112-43/+67
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * xcb: mark mouse events from tablet devices as synthesizedShawn Rutledge2016-03-094-22/+32
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-51617 Change-Id: Ic1d258c56165947ff821b1bf4d044bcf29b41a3b Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| | * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-03-074-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: Icbce502dcbcb4d4b4d922c42679f44e2cc930bf3 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| | * Silence the warning: Unhandled client message: "_GTK_LOAD_ICONTHEMES"Thiago Macieira2016-03-053-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Expose the number of X screen through the QXcbScreenFunctionsAlexander Volkov2016-03-053-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | X screen corresponds to Qt virtual desktop, and RandR output corresponds to QScreen. There can be more than one X screen, so we need a way to get the number of X screen for QScreen, in particular for the right implementation of some methods in QX11Info. Change-Id: Ib5e38703bf11ae08bb283f26a7b7b15f1a5e8671 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| | * xcb: resourceType names must have only small lettersBłażej Szczygieł2016-03-041-1/+1
| | | | | | | | | | | | | | | Change-Id: I563ae26c9e7e6111399fd0b9af7bfb3ff750b34a Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | | QtBase (remainder): use printf-style qWarning/qDebug where possible (I)Marc Mutz2016-03-127-12/+12
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | xcb: support more visual formatsLouai Al-Khanji2016-03-041-0/+14
| | | | | | | | | | Change-Id: I03e0fc5fdfbd7ce478ebc4b0ae8e72d57450bc51 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QXcbBackingStore: Minor code cleanupLouai Al-Khanji2016-03-041-8/+2
| | | | | | | | | | | | Change-Id: I5086e2031201b939b49603f17c373e414a91c32a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | xcb: Do not create OpenGL-enabled platform windows for raster windowsLouai Al-Khanji2016-03-041-1/+1
| | | | | | | | | | | | Change-Id: I07d12441db6c7f289363417e21fec65bfcf08b78 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | QXcbNativeIntegration: Add query for compositing enabledGabriel de Dietrich2016-03-042-2/+8
| | | | | | | | | | | | | | Task-number: QTBUG-41195 Change-Id: I4f37c82f6757283ed58b38c7fd47849fb4810bce Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | xcb: Be smarter about how we flushLouai Al-Khanji2016-03-031-59/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | For the remote X case the backing store previously always reuploaded image data for every expose event. Instead of doing that create a remote X pixmap and only flush repainted regions. For regular expose just copy from the pixmap. Additionally, atomically update the window by setting a clip mask and flushing the entire region at once instead of doing it rect by rect. Change-Id: I26bb1834b159e309c7ad93287dd297769f7e2633 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Avoid repeated QByteArray creation when resolving opengl functionsLars Knoll2016-03-012-4/+4
| | | | | | | | | | | | | | | | | | | | Add an getProcAddress(const char *) overload to QOpenGLContext, and refactor the QPA interface to take a const char *. Like this we can avoid lots of mallocs when resoving GL methods. Change-Id: Ic45b985fbaa0da8d32ba3e3b485351173352ca6f Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | xcb: Remove unneeded null pointer checksBłażej Szczygieł2016-02-243-14/+4
| | | | | | | | | | | | | | | | | | | | Since a094af001795c9651b299d700a992150d1aba33a we don't need any null pointer checks for xcb screens. This reverts patch 7532fb4e61fc4102fd11022f57f7d8195414167b Change-Id: I8b90ed538aad4403650ef42aab6f39de5861d9ed Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-244-1/+57
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/plugins/platforms/windows/qwindowsfontengine.cpp src/plugins/platforms/windows/qwindowsnativeimage.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I649b32b260ce0ed2d6a5089021daa0d6a8db85f7
| * xcb: Deliver mouse enter event to window when closing modal windowBłażej Szczygieł2016-02-241-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | When a modal window is closed and the mouse is not under the modal window - find a proper window and send a fake enter event. Added auto test for checking enter event on window when modal window is closed. Task-number: QTBUG-35109 Change-Id: I370b52d386503820ac9de21e6d05fd019ca456ec Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>