summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbintegration.cpp
Commit message (Collapse)AuthorAgeFilesLines
* iOS: Implement support for QApplication::beep()Tor Arne Vestbø2015-12-171-0/+13
| | | | | | | | | | | | | 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>
* 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>
* Harmonize input context selectionBernd Weimer2015-08-251-1/+4
| | | | | | | | | | | | | | | | | 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>
* Make it possible to use the -visual argumentJørgen Lind2015-04-151-2/+9
| | | | | | | | | | | | for xcb applications to use a specific visual id when creating windows. Also make it possible to retrieve the visual id of a specific window with QXcbWindowFunctions::visualId(QWindow *window). UINT_MAX is used as an invalid visualId. Change-Id: If62ada119ce8f9174cc211f53bbf1ce1bb7d021a Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* xcb: Do not crash with VNCLaszlo Agocs2015-03-271-3/+4
| | | | | | | | | | | | | | When having a vnc server with pixel format bgr888, we may not have a working GL integration. (we may not have one regardless of the pixel format in fact) We should still keep on attempting to create a regular SHM window for RasterGLSurface windows too, to keep regular widgets apps working. Task-number: QTBUG-42776 Change-Id: Idbf8de29694613b240bd27affcc3d80810ce1460 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Don't replay mouse press event which closes a popup on X11Alexander Volkov2015-03-251-0/+2
| | | | | | | | | | | Add a new style hint to QPlatformIntegration: ReplayMousePressOutsidePopup. Return false for it in the xcb plugin. This commit restores the behavior which was in Qt 4. Task-number: QTBUG-34814 Change-Id: I19fee762395a51475cc67b52b368c70679ca736b Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Decide whether to synthesize mouse events on a per device basisAlexander Volkov2015-02-251-3/+0
| | | | | | | | | | | | | | | | | | | | | Currently Qt uses the QPlatformIntegration::StyleHint SynthesizeMouseFromTouchEvents to check whether to synthesize mouse events from touch events. But not only platform plugins can produce touch events, they can be created by e.g. QTest::touchEvent() and in this case we almost definitely need synthesizing regardless of the platform. This commit introduces a QTouchDevice::MouseEmulation capability which replaces use of the QPlatformIntegration::SynthesizeMouseFromTouchEvents. So it's possible to pass QTouchDevice without this capability to QTest::touchEvent() and be sure that mouse events will be synthesized. Notice that touch pads always emulate mouse events. As a result we can activate some tests which were disabled for specific platform configurations by commits 6c1670d8c273819435867c42725c0db0eee597dc and e9760f1559361c39f269fb89f1ebd01f6ee8378d. Change-Id: Idc82fa4007a095fc1cb5934979361b0023d2b793 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* xcb: add qt.qpa.screen logging categoryShawn Rutledge2015-02-251-3/+1
| | | | | | | | | | | Some existing debug output required recompiling with Q_XCB_DEBUG. Being able to enable this debugging in the field will help with troubleshooting any remaining screen management issues. Change-Id: Ie67b0009d4b00b0d39fde0fb4d8d54fcf89d6693 Reviewed-by: Sandro Mani <manisandro@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Have XCB/Windows platform integration classes keep their own instance pointerSandro Mani2015-02-251-0/+5
| | | | | | | | | | | | Through the chain of code called by QPlatformIntegrationFactory::create, there are cases where QGuiApplicationPrivate::platform_integration is accessed (typically through QGuiApplicationPrivate::platformIntegration()) before the call to QPlatformIntegrationFactory::create has returned. Change-Id: I7805b72be5b56aed5cb8ce30cb908743c9b1f91b Task-number: QTBUG-44388 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Linux/XCB: added a missing arg to QXcbConnection::QXcbConnection callStéphane Chatty2015-02-201-1/+1
| | | | | | | | | | | QXcbConnection::QXcbConnection has 3 args now, but in the call for extra X displays it still was used with 2 args. The bug has gone unnoticed so far because of default args and type conversion. Change-Id: I48b60ce6da8edb1e564010d2b4af9ae95da25316 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devGiuseppe D'Angelo2014-12-201-1/+1
|\
| * Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-181-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/platformsupport/platformcompositor/qopenglcompositor.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I5422868500be695584a496dbbbc719d146bc572d
| | * Fix xcb backend not grabbing the server as defaultJørgen Lind2014-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The xcb backend relies on grabbing the x server in a few situations like popuphandling. For Qt 5.4.0 the logic enabling this code path was moved into the plugin. However it defaults to never grabbing the server Change-Id: I82489a0727affbce62587b3d7470085cf716a0cc Task-number: QTBUG-43049 Reviewed-by: Martin Gräßlin <mgraesslin@kde.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Make GLX and EGL dynamic dependencies for xcbJørgen Lind2014-12-201-110/+30
|/ / | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QPA][Xcb] GLX and EGL code paths are now dynamically resolved, making it possible for one build of a plugin to use both code paths. Default is to use the GLX code path if available. This can be overwritten by specifying QT_XCB_GL_INTEGRATION=xcb_egl as an evnironment variable. Enable qt.xcb.glintegration.debug to get debug log output of what integration is used Change-Id: Ia9fa95fcca3d901b91dadb8c98a695fea0ae3b1e Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* / Xcb: remove compile warningsJørgen Lind2014-12-151-1/+1
|/ | | | | Change-Id: Ieb3ccd18a2bdde9ef7628a031266004cd55480da Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Do not apply subpixel gamma-correction on XCBAllan Sandfeld Jensen2014-11-111-1/+3
| | | | | | | | | | | | | To match rendering of subpixel antialiased text in Qt 4.8 and other toolkits on X11, we should not apply gamma-correction. This also makes the rendering of subpixel antialiased text closer to normal antialiased text. Task-number: QTBUG-41590 Change-Id: I45ad3448334951353657b878d002eea429858f2d Reviewed-by: Samuel Rødal <srodal@gmail.com> Reviewed-by: Sérgio Martins <sergio.martins@kdab.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Make the -nograb and -dograb arguments actually work on xcbJørgen Lind2014-11-111-11/+30
| | | | | Change-Id: Idc725443e4abe27db3e530f08173897bfcbe1278 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* xcb: Fix getting the primary screen from QXcbConnection::screens()Alexander Volkov2014-10-291-3/+1
| | | | | | | | | | | | | | | | Currently getting QXcbScreen* for primary screen is too messy and it wrongly uses QXcbConnection::primaryScreen() as an index in QXcbConnection::screens() although QXcbConnection::screens() returns the primary screen as the first item in the list since 3c8eb404877df9c967d81fa9df7d718c538fb407. So to clear the API rename primaryScreen() to primaryScreenNumber(), add QXcbConnection::primaryScreen() that returns correct QXcbScreen* and use it directly. Change-Id: Icb7391aa3e82b32ca48f2bda764dcf7ffd89cc47 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-011-1/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/network/socket/qnativesocketengine_winrt.cpp src/plugins/platforms/android/androidjniaccessibility.cpp src/plugins/platforms/windows/qwindowswindow.cpp Manually adjusted: mkspecs/qnx-armle-v7-qcc/qplatformdefs.h to include 9ce697f2d54be6d94381c72af28dda79cbc027d4 Thanks goes to Sergio for the qnx mkspecs adjustments. Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
| * Flush xcb connection before EventDispatcher is going to blockMartin Gräßlin2014-06-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-threaded QXcbEventReader invokes processXcbEvents when the EventDispatcher is about to block. This method ensures that the xcb connection is going to flush. Applications can use low level xcb code in that case without having to ensure to flush the connection before going to block again. With the threaded QXcbEventReader this didn't work and applications which for example changed a window property and waited for the matching property notify event were stalled. This change ensures that also in the threaded case the connection gets flushed when the EventDispatcher is going to block. Change-Id: If1dc5eb96e2f1bde10b7a40af550b0608c62f70c Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2014-06-051-0/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt.prf src/plugins/platforms/xcb/qxcbwindow.h src/tools/qdoc/qdocindexfiles.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I214f57b03bc2ff86cf3b7dfe2966168af93a5a67
| * Improve the implementation of the _NET_WM_SYNC_REQUEST protocolMartin Gräßlin2014-05-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change improves the synced resizes of xcb windows and adds support for synced resizes of glx windows. The QXcbWindow keeps a better track on whether the window manager expects a sync and can be in one of three states: * no sync required * sync required, but configure notify event not yet received * sync required and configured By tracking this in the QXcbWindow itself the backing store can make use of this information and doesn't need an own heuristic to decide whether a sync is needed. Also this allows to add support for synced resizes of windows with an OpenGLSurface. This is accomplished by checking the sync state after swapping buffers. As the OpenGL context may be bound to a background thread the sync is done using a QueuedConnection to ensure that the sync happens in the thread which created the xcb window. So far this is only added for GLX. This significantly improves the resize experience of QQuickWindow and also the initial mapping with a composited window manager in case the compositor uses the sync protocol to determine whether the window is ready to get painted on screen. Change-Id: Ied0261873043d785dec652d2821fc3638292fa36 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | Support adopting an existing EGLContext in eglfs and xcbLaszlo Agocs2014-05-091-4/+14
| | | | | | | | | | | | | | | | | | | | | | Add also a manual test application. For GLX there is an autotest since that is likely to be run on one of the CIs. For EGL and especially eglfs this is likely not the case so a manual test is better. Task-number: QTBUG-37552 Change-Id: Ib09db5d909befb68d16f69abd401a56abe55f28a Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | Add public and QPA APIs for adapting existing OpenGL contextsLaszlo Agocs2014-04-241-1/+4
|/ | | | | | | | | | | | | For now only xcb on GLX is supported. Other platforms will follow later. Add also some missing documentation for the platform OpenGL context factory functions. [ChangeLog] QOpenGLContext is now able to adopt existing native contexts. Task-number: QTBUG-37552 Change-Id: I5dd959f102df178f646b2df5989203b5dc6de376 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* X11: defaultDragDistance depends on screen resolutionShawn Rutledge2014-03-181-1/+14
| | | | | | | | | | | The usual default is 10 pixels, but on a screen with resolution exceeding 100 DPI, it will be a proportionally larger number. The reason is that such precise finger and mouse movements are more difficult on higher-resolution screens. Change-Id: I6e66299e12e6cac5c4e032251b32a34940970372 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Avoid using GLX Pbuffers on CatalystLaszlo Agocs2014-02-211-1/+12
| | | | | | | | | | | Trigger QOffscreenSurface's fallback mode (hidden QWindow and a regular window surface) instead. queryDummyContext() already works like this but the same must be done for any QOffscreenSurface. Task-number: QTBUG-36900 Change-Id: I64176ac6704e9d6ed768fa3d456c40c8818be6dc Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Enabling QQuickWidget and QOpenGLWidgetPaul Olav Tvete2014-02-121-0/+1
| | | | | | | | | Enable child widgets (without a native window) that render to an FBO and are composed with the raster backingstore by the platform plugin. A preliminary version of QOpenGLWidget is included as private API. Change-Id: I8f984a4d7db285069ce3d6564707942c823d890d Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Support --option in addition to -option for all builtin Qt commandline options.David Faure2014-02-081-12/+9
| | | | | | | | | | | | | | In addition to being more common and consistent with QCommandLineParser, this will make it possible to add the documentation for these options in the QCommandLineParser-generated help output. [ChangeLog][General] Builtin command-line options such as -reverse, -session, -style etc. now all support double dash, e.g. --reverse, --session, --style... Change-Id: Ia2e22c854ccc6a9d7b863b1234317005bc822191 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* xcb: Compilefix #ifdef glx codeJørgen Lind2013-10-301-0/+4
| | | | | Change-Id: I4204cab76b2621318dda909d24ceb2abab6e0ba3 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Add QGuiApplication::sync() functionJørgen Lind2013-10-301-0/+8
| | | | | | | | | This will allow applications to make sure Qt has the same state as the window system at any given point. The use of this function is discouraged but it is very useful for auto tests. Change-Id: I691bff365fc391e9d7213f2607008983505bb774 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Don't support threaded GL on chromium (virtual box GL)Gunnar Sletta2013-10-291-1/+1
| | | | | Change-Id: I84f89450e3fce1cbbafd19dbf4509b1911e06b19 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* QPA: Fix event dispatcher dependent operations in platform integrationLaszlo Agocs2013-10-071-1/+7
| | | | | | | | | | | | | | | | | | 999e5162ec3e86c9cb84c3ec95dfd0ba4b21277f breaks QPlatformIntegration implementations that perform tasks in their constructor that rely on the event dispatcher. For example creating a QSocketNotifier is not possible anymore since the event dispatcher is created later on. This is fixed by introducing an additional virtual in QPlatformIntegration that gets called after createEventDispatcher(). Two broken platform plugins have been identified so far: eglfs is creating socket notifiers to read events from input devices and xcb's input context plugins may use dbus. Both are updated accordingly. Task-number: QTBUG-33768 Change-Id: I5badb623958a52ab5314ff93dd7d60061f5df70a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* xcb: Initialize accessibility lazily, since it requires an event-dispatcherTor Arne Vestbø2013-10-011-3/+8
| | | | | | | | | | | | | | QSpiAccessibleBridge uses a D-BUS connection, which in turn uses socket notifiers and timers internally. Neither of these can be used before a event-dispatcher is in place, so we need to defer creation of the accessibility interface until later. We assume that clients will only call QXcbIntegration::accessibility() when an event-dispatcher is set up, but to be extra safe we do an assert, so that failures of this pre-condition will trigger at the place they are caused -- not as failures to register socket notifiers and timers in the D-BUS code. Change-Id: I4f9d8362a3f285c3da9045d1ff6b8e7b04570488 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* QPA: Fix semantics of GUI event dispatcher ownership in platform pluginsTor Arne Vestbø2013-09-301-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The QPlatformIntegration::guiThreadEventDispatcher() function acted as an accessor to event dispatchers created in the constructor of each platform plugin, but the logic and semantics of event-dispatcher handling in Qt itself (QCoreApplication/QGuiApplication) still assumed both ownership and control over the event dispatcher, such as when to create one, which one to create, and when to delete it. This conflicted with the explicit calls in the platform plugins to QGuiApplication::setEventDispatcher(), as well as left a possibility that the event-dispatcher created by the platform plugin would never be deleted, as none of the platform plugins actually took full ownership of the dispatcher and deleted it in its destructor. The integration function has now been renamed back to its old name, createEventDispatcher(), and acts as a factory function, leaving the logic and lifetime of event dispatcher to QtCoreApplication. The only platform left with creating the event-dispatcher in the constructor is QNX, where other parts of the platform relies on having an event-dispatcher before their initialization. We then need to manually take care of the ownership transfer, so that the event-dispatcher is still destroyed at some point. Change-Id: I113db97d2545ebda39ebdefa865e488d2ce9368b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Build X11 session management only if dependencies are foundTeo Mrnjavac2013-09-201-1/+1
| | | | | | | | | | | This fixes the build breakage caused by Change I50b33d05 when attempting to compile on Linux with session management enabled but libSM and/or libICE not present. Change-Id: I127f32e7041deb2ff968eae8458fee7d4e95d7a5 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: aavit <eirik.aavitsland@digia.com>
* Bring back Qt4 X11 session management functionality.Teo Mrnjavac2013-09-131-0/+11
| | | | | | | | | | | | | | | Added QXcbSessionManager to the Xcb plugin. QXcbSessionManager inherits from QPlatformSessionManager, it's a port of QSessionManager as it is in Qt 4.8. Minor changes also in QPlatformSessionManager and QGuiApplication to hook it up. Task-number: QTBUG-28228 Task-number: QTBUG-30011 Task-number: QTBUG-33033 Change-Id: I50b33d05a1e32c5278dea339f693713acc870a70 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com>
* XCB: Readd support for -name command line argument.Friedemann Kleint2013-07-251-0/+6
| | | | | | | | Task-number: QTBUG-27349 Change-Id: I85390942927cd1c54f76fd7ddc0f3487c7205b57 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-231-0/+44
|\ | | | | | | | | | | | | Conflicts: tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp Change-Id: I18a9d83fc14f4a9afdb1e40523ec51e3fa1d7754
| * XCB: Set WM_CLASS.Friedemann Kleint2013-07-181-0/+44
| | | | | | | | | | | | | | | | | | | | Set the instance name and class name of the application windows. Task-number: QTBUG-29396 Change-Id: Ia1fb492ab169108c3779deb8964bb731b322dd89 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Pass argc, argv to the platform plugins.Friedemann Kleint2013-07-181-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow for parsing of X11-specific arguments like -display, -geometry. Introduce overload of QPlatformIntegration::create() with argc and argv and provide default implementation that calls the old version (for platforms that do not have argc, argv). Provide default implementation for the old version returning 0 so that platforms using the new API compile. Prototypically implement -display in XCB. Task-number: QTBUG-29396 Change-Id: I6a0e9271fad6e2d10f11b80393025ae3a3e36623 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | XCB: Fix warning about unhandled enumeration values.Friedemann Kleint2013-07-041-0/+2
|/ | | | | | | Introduced by 438211ec627073817fcaf6d3a07b76f2aa5d90e0 . Change-Id: Ia6765c2a49f13958c70f83ebf79fdaadfdd25ac9 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* XCB: Handle new enum value in switchThiago Macieira2013-05-131-0/+1
| | | | | | | | The new enum value was introduced in f3612f39ff5fb07f83b89732e8b7a643ee6d5cd3 Change-Id: I9ab5d8fba459408246e9a6f40c5c086af5abbf82 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Added possibleKeys(QKeyEvent *) to QXcbIntegrationGatis Paeglis2013-05-071-0/+5
| | | | | | | | | | | | | | This is required for a modifier+key shortcut support. Also fixes old Qt bug when keymap group changes were not handled properly for shortcut functionality. Task-number: QTBUG-26902 Task-number: QTBUG-4845 Change-Id: I04d2c2ad7049df7420999816154605848fa670e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* xcb: don't do mouse synthesis from touch unless we find a reasonShawn Rutledge2013-05-071-0/+26
| | | | | | | | | | | | One reason is when we are using XInput 2.2, because touch devices will then generate touch events only. For the other X11 scenarios, X11 does its own mouse emulation. QPlatformIntegration::styleHint() wasn't overridden yet. The remaining hints are TODO for now. Change-Id: I2e444a00a18b33ed840ebfa8d8218655c2c39aad Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Moving logic from Qt4 for grabbing the X serverJørgen Lind2013-04-261-1/+35
| | | | | | | | | Basically you don't want to grab the X server while your debugging. Also added an environment variable which lets you force to not grab the X server Change-Id: Iba03f11c8f486ce71c55fac7716bffcb7cc8cb98 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Implement XEmbed protocolAlberto Mardegan2013-03-061-0/+1
| | | | | | | | | | | | | | | | | | | Add a static QWindow::fromWinId(WId id) constructor which can be used to create a QWindow object representing windows created by other processes. Then, QWindow::setParent() can be used to embed a window into a foreign window socket and QWindow::setTransientParent() to stick the current window on top of a foreign window. The changes in the QtWidgets module ensure that the focus chain (TAB navigation) correctly works when a QtWidgets-based window is embedded into another application. As far as the platform implementation is concerned, this commit only implements the embedding functionality in the XCB plugin. So, this is roughly equivalent to the Qt4 QX11EmbedWidget functionality. Change-Id: Iff8f7b9ee974d33fb30f36056f7838b433a413c7 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-051-28/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/generators/mac/pbuilder_pbx.cpp src/corelib/kernel/qtimerinfo_unix.cpp src/plugins/platforms/cocoa/qcocoabackingstore.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
| * Fix OpenGL context creation in the XCB pluginFredrik Höglund2013-02-231-28/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to create a core context with OpenGL implementations that don't implement the compatibility profile or the GL_ARB_compatibility extension. Qt was effectively clamping the OpenGL version to 3.0 by assuming that the highest supported backwards compatible version is also the highest supported core version. Since there is no way to check if the implementation supports a context with a given set of attributes without trying to create the context, we have to try every known OpenGL version until we find one that's supported. Note that this commit does not fix similar breakage on other platforms. Change-Id: I9616762b059db9e6182f853ab7f24ff44dc7d529 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>