summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
Commit message (Collapse)AuthorAgeFilesLines
* QXcbXSettings: don't construct a QByteArray just to append itMarc Mutz2016-01-141-2/+3
| | | | | | | | | | | | ... use QByteArray::append(char*,int) instead. Also cache the return value of the out-of-line function xcb_get_property_value_length(). Saves ~120b in text size, and a heap allocation. Change-Id: I4d1deafdcd3345f2b7dfbf8c45702cfee733a269 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QXcbXSettings: replace a QLinkedList with a std::vectorMarc Mutz2016-01-141-19/+16
| | | | | | | | | | | | | | | Required to change an erase() loop into std::remove_if to avoid running into quadratic behavior. While at it, made QXcbXSettingsCallback a proper struct, used aggregate initialization, and ported another loop to C++11 range-for. Saves ~0.5KiB in text size on optimized GCC 5.3 Linux AMD64 builds, and a lot of heap allocations. Change-Id: I228bb853519ed2590375dc511e527f47bb8daa34 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2016-01-124-12/+8
|\ | | | | | | Change-Id: I5839bded07e23af65ced9491c4f50242f964dd31
| * 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-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | 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-0811-22/+113
|\| | | | | | | | | | | Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
| * 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>
| * Default to OpenGLES when building with -opengl es2Allan Sandfeld Jensen2015-12-251-0/+4
| | | | | | | | | | | | | | | | | | | | Fixes the xcb_glx plugin to follow the -opengl configure option for default surface types. This makes it match closer to xcb_egl behavior and makes the default match QOpenGLContext::openGLModuleType. Change-Id: Iea3f8069fffefa46a32945eeeea1312566df129f Task-number: QTBUG-50015 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * xcb: Add Xinerama 3rd party source code for static buildBłażej Szczygieł2015-12-221-2/+4
| | | | | | | | | | Change-Id: I421d0bcf3fd6362ad6e95db5cfcdefd1a9ec096f Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * xcb: Add Xinerama supportBłażej Szczygieł2015-12-226-19/+75
| | | | | | | | | | | | | | | | | | 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>
* | xcb: use qLoadPlugin()Marc Mutz2016-01-052-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | ... instead of rolling your own. qLoadPlugin() expects the create() method of the Plugin class to take at least the QString key. Since this plugin create() method doesn't take one, supply a wrapper. Change-Id: I690fecd3390cc706a45f40ba06dda2b952ff0d85 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-187-192/+246
|\| | | | | | | | | | | | | | | | | | | | | | | 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: Don't try to detect cases where the WM restricts geometry changesTor Arne Vestbø2015-12-141-8/+5
| | | | | | | | | | | | | | | | | | This caused issues in upstream tests that didn't expect to have their geometry requests not being respected by the WM. Task-number: QTBUG-49912 Change-Id: Iec99f341d81488de6026f04c99dff45a0d3f8587 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * xcb: Use a placeholder QScreen when there are no outputs connectedBłażej Szczygieł2015-12-116-171/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Don't cache the screen for a windowAlexander Volkov2015-12-112-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QXcbWindow::m_xcbScreen was introduced in 4e1b09fa8ff1a9ab42c0a29a2efe1ae7f4700d71 (Keep screen geometries from overlapping) to map the window geometry for the right screen, because it wasn't possible to rely on QPlatformWindow::screen(). But we don't need it since a705b4ec1f6f7133390054f8b6b8077ef0550311 (Introduce cross platform high-dpi scaling), because QGuiApplication triggers GeometryChangeEvent right after processing WindowScreenChangedEvent. So just use QPlatformWindow::screen() instead of cached m_xcbScreen. m_xcbScreen was also used in d4bc56cb4218f6f8378f04c23865156b349b037d (Fix screen detection on configureNotify) to compare the new screen after receiving ConfigureNotify to the correct old screen. Just send WindowScreenChangedEvent event and leave making the comparison to QGuiApplication. Change-Id: Ibe717ae4bf4c40b0a04cd62fe2ecaee5df5f4060 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * xcb: compare to previous state when sending geometry and expose eventsTor Arne Vestbø2015-12-101-6/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By calculating the previous geometry and passing it on when calling handleGeometryChange we can detect cases where setGeometry() on a QWindow didn't result in the expected geometry. The new (actual) geometry is delivered as a resize event. This also allows us to only send expose events when the size of the window has actually changed (instead of also sending when the window has just moved). Due to the async delivery of geometry changes on the xcb platform we need to avoid using QWindowPrivate's cached state of the geometry, as that will result in duplicate resize events when events are not flushed in between two system resize events coming in with the same size. Change-Id: I3d4abe4a1095dd96e6e354288d5b646c623c30dd Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * XCB: prevent a fp division by zeroGiuseppe D'Angelo2015-12-101-4/+7
| | | | | | | | | | | | | | | | | | | | | | For certain devices vci->resolution is zero, which causes a SIGFPE if FE_INVALID exceptions are enabled. Try to prevent that. Task-number: QTBUG-42717 Change-Id: I388735f5dfb6218496787dbb74cf0c0f43cc928f Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | iOS: Implement support for QApplication::beep()Tor Arne Vestbø2015-12-174-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Vibrates the device or plays an alert sound on devices that do not support vibration. The other implementations of beep() have been moved to QPlatformIntegration as a proper API instead of having them as invokables in QPlatformNativeInterface. Change-Id: Ic597dbef04b46d49862b070e78ddfc0d763829a2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
* | Make native cursor handles accessible.Friedemann Kleint2015-12-143-0/+23
| | | | | | | | | | | | | | | | | | | | Add QWindowsNativeInterface::nativeResourceForCursor() and implement for Windows (returning the HCURSOR) and XCB (returning the xcb_cursor). Task-number: QTBUG-49386 Change-Id: I963869f6e8741449822ecbe6489f9c42a786c7a6 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Xcb: Fix debugging codeUlf Hermann2015-12-103-11/+30
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-022-2/+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
| * Avoid dynamic switching between backingstore composition pathsLaszlo Agocs2015-12-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it opt-in because doing a normal backingstore flush does not seem to work on Cocoa once we use OpenGL on the window. Windows and Linux should be able to cope with this. This means that platforms outside Windows and Linux will continue to have the problem of having GL-based compositing enabled for ever after having a QOpenGL/QuickWidget shown in the window once, but the issue is most prevalent on Windows anyway, OS X machines can deal with OpenGL better in general. Task-number: QTBUG-49172 Change-Id: I30fd2efa95cc4f6eed9cf7f7613d0750355c775c Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
| * QtBase: remove explicit function info from qWarning() etcMarc Mutz2015-11-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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-293-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.6' into devSimon Hausmann2015-11-274-15/+10
|\| | | | | | | Change-Id: Ib43c6f126998eefcfed9a7c1f2bcbac8b4dd05ec
| * Fix potential division by zero.Nicolas Capens2015-11-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | In a Chrome Remote Desktop session the htotal and/or vtotal timings can be zero and lead to a SIGFPE exception. Task-number: QTBUG-49322 Change-Id: Id530335cc760d1938ed888ad095427fcf32c651d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Nicolas Capens <nicolas.capens@gmail.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
| * xcb: Don't assume creating a window will result in ConfigureNotify eventTor Arne Vestbø2015-11-242-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We assumed that creating a window would always result in a configure notify event, so we delayed sending the initial expose event until receiving the configure notify. That strategy fails in cases where the window does not need a reconfigure after being created, such as when not running a window manager, or when creating child windows. In those cases the window is just mapped, and we ended up never sending an expose event. The problem was masked by sometimes receiving an explicit expose event from X, just after the mapped notification, which we then sent without waiting for configure. Unfortunately we can't rely on this behavior and need to remove the deferred expose event logic, so that we always ensure that at least one expose event is sent to Qt. Change-Id: I702be7f24de2a1e89c085fb6bd95bb8ff7792a27 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.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: propagate stays-on-top or -below hints from window flagsUlf Hermann2015-11-252-0/+11
| | | | | | | | | | | | | | | | | | | | Before, you had to first hide a window, then set the flags, then show it again as the flags were only applied when showing the window. This is unintuitive. Task-number: QTBUG-49628 Change-Id: I240e633ac2581c0ff0e4f35dead1b79e15e15350 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-232-5/+1
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/thread/qthread_unix.cpp Change-Id: Ia08d613c3f0bd08cb6dc3e3a57257207dfd4a099
| * xcb: Fix slow widget resizingBłażej Szczygieł2015-11-192-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can speed up window resizing using on XCB platform (like in Qt4 or GTK). It doesn't affect QRasterWindow, but it affects all QWidget-based windows and OpenGL windows. This code uses XCB Sync Protocol on all windows when it is supported. In previous code the XCB Sync Protocol was used only when window doesn't support OpenGL (on QRasterWindow),but QWidget can use OpenGL, so it doesn't use the XCB Sync Protocol. With XCB Sync Protocol which is implemented in Qt XCB plugin, windows can be resized smoother/faster. You can see bigger difference when you use non-composited window manager to test it: - Kwin without compositing and fast style, - Marco, - Xfwm4, - Openbox. Task-number: QTBUG-46641 Change-Id: Ia18dee94616e64ba7e11bd4b062d2326ec530748 Reviewed-by: Martin Gräßlin <mgraesslin@kde.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-186-49/+83
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/network/kernel/qnetworkinterface_winrt.cpp tools/configure/configureapp.cpp Change-Id: I47df00a01597d2e63b334b492b3b4221b29f58ea
| * xcb: Process _NET_WORKAREA and screen geometry changes separatelyAlexander Volkov2015-11-174-25/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-173-15/+17
| | | | | | | | | | | | Change-Id: I2f3c3ad75bb3914667cf6f27dc2d91aac103607b Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * move addition of libdl to right projectOswald Buddenhagen2015-11-162-2/+2
| | | | | | | | | | Change-Id: Ifae8b906ef3767d9c21f09953076bd640829858f Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * remove abuse of module include path overridesOswald Buddenhagen2015-11-161-7/+0
| | | | | | | | | | | | | | | | these modules simply have no "proper" include paths (they are used only within qtbase, with explicit INCLUDEPATH statements). Change-Id: Iec6aa6ae0bc449eb8cac2fa1c86a791755eec06e Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-11-043-6/+16
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/ptrsize.test configure src/corelib/global/qnamespace.h src/network/socket/qabstractsocket.cpp tests/auto/other/networkselftest/networkselftest.pro Change-Id: Ic78abb4a34f9068567cea876861d4220f5a07672
| * Xcb: fix crash on screen power savePaul Olav Tvete2015-10-263-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | Handle various cases where we have null QScreen or QPlatformScreen pointers. With this change, I can run Qt Creator for several days. Before, it would crash multiple times per day with a two-monitor setup. Change-Id: I0923d886ae2a4199ac37edd711ddd4f6f99df93d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * xcb: better error reporting when shmget() failsShawn Rutledge2015-10-261-2/+2
| | | | | | | | | | | | Change-Id: I160ebc07f25fd08b86ca5494cb149c5fc7c70086 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-238-27/+90
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf configure src/corelib/global/qglobal.h src/tools/qdoc/node.cpp src/tools/qdoc/qdocdatabase.cpp tests/auto/corelib/io/qsettings/tst_qsettings.cpp tools/configure/configureapp.cpp Change-Id: I66028ae5e441a06b73ee85ba72a03a3af3e8593f
| * xcb: Use XShape for DnD when a compositing manager is not runningAlexander Volkov2015-10-146-25/+87
| | | | | | | | | | | | | | | | | | 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>
| * Add default argument to QPlatformWindow::isEmbedded()Tor Arne Vestbø2015-10-141-1/+1
| | | | | | | | | | | | | | Removes magic 0-pointers at the call sites. Change-Id: I6740f6b8cc75004ab5f2ebcb3b3c95cbbdc43153 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Avoid triggering OpenGL initialization for RasterSurfaceJohn Lindgren2015-10-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Application that do not require OpenGL need a way to opt-out of GLX/EGL calls completely. The initialization can be expensive and what is more, some systems may not have functional GLX at all (some VMs are known to crash when trying to get FBConfigs for the window). QApplication already has AA_ForceRasterWidgets, which causes the use of plain RasterSurface everywhere instead of RasterGLSurface. Combined with a trivial check in the xcb backend to skip all the Xlib+GLX/EGL path, the attribute will allow apps to ensure that no GLX/EGL calls are ever made. This however implies a change in QWindowContainer: the embedded window must use the same initialization path as the parent otherwise we will end up with a BadMatch. QWindowContainer can do this transparently to the applications, unless the QWindow is already created. Change-Id: I846af7edb8b92b9836cdbd93c6a5eec5a6147a49 Task-number: QTBUG-46765 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-149-57/+73
|\| | | | | | | | | | | | | | | | | Conflicts: tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro Change-Id: Ia93ce500349d96a2fbf0b4a37b73f088cc505c6e
| * Libraries: Fix single-character string literals.Friedemann Kleint2015-10-132-2/+2
| | | | | | | | | | | | | | Use character literals where applicable. Change-Id: I8e198774c2247c1cc1d852a41b59b301199b7878 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * xcb: Fix DnD for separate X screensAlexander Volkov2015-10-097-53/+53
| | | | | | | | | | | | | | | | Recreate QShapedPixmapWindow when the cursor goes to another X screen. Change-Id: Ifd4c4281971b23abc45a9f6c0509832a45c31521 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * xcb: Add support for Qt::WA_ShowWithoutActivatingAlexander Volkov2015-10-081-2/+15
| | | | | | | | | | | | | | | | Also re-enable and update the tst_showWithoutActivating test. Change-Id: Ic7fa9b1bf7637e4661c593aaeabb3220cd4204ff Task-number: QTBUG-46098 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * xcb: Show buttons on the title bar for QWindowAlexander Volkov2015-09-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindow by default doesn't have the window flags to display buttons on the title bar and it's up to the window manager whether they will be shown. For example, fluxbox doesn't show the maximize button. The cocoa plugin and the windows plugin adjust the window flags in this special case of QWindow to show some buttons, so do the same in the xcb plugin. Change-Id: Idc2575cfeaced524dd67eb5ba99126663626e2b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>