summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
Commit message (Collapse)AuthorAgeFilesLines
* Fix TouchEnd events not being received on Harmattan.Jocelyn Turcotte2011-10-171-2/+3
| | | | | | | | | TouchEnd is sent when all the touch points have a TouchPointReleased state, and we would clear all touch points on finger release before sending them up the stack. Change-Id: I14e7347090ce9a1865743202f6926ae2fc035bd3 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Add multipoint touch support for Harmattan to the xcb platform plugin.Jocelyn Turcotte2011-10-175-0/+384
| | | | | | | | | | | Proper multipoint touch support was only introduced in XInput2.1, but Harmattan uses a tweaked version of XInput2.0 that transfers touch data through mouse events. This patch applies on the xcb plugin a subset of the changes that were applied on the Qt 4.7 that was shipped to Harmattan to get similar multipoint touch support. Change-Id: Ifda7ad40de29d7ded1443d4f78b3ec3807303a9f Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Add a warning and a return value to xcb's createGLPlatformContextLaszlo Agocs2011-10-171-0/+2
| | | | | | | | | | | | | | | | | There was no value returned previously when none of GLX, EGL, DRI was enabled. Now we show a warning message and return null (resulting in a crash). Previously not returning a value resulted in obscure crashes with strange-looking call stacks, now it will be clear what the problem is. This is particularly important because not having libx11-xcb-dev installed results in silently disabled xlib support which in turn disallows the usage of glx too. The result is an obscure crash in any GL (e.g. QML2) app. Now there will be a proper warning message at least. Change-Id: I15cf3a6c16ca373d4ada7abb6d3c8f7e30c1e03d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Do not fail user time window creation when xcb is using xlibLaszlo Agocs2011-10-172-2/+8
| | | | | | | | | | | | | | | | | | | QXcbWindow::updateNetWmUserTime() creates a new window using the actual window as its parent. This operation was failing when Xlib usage and GLX (or EGL) was enabled because in these cases the real window was created with a different visual using XCreateWindow. For the user time window however we were passing the xcb_screen's root_visual always, and this cannot work when Xlib+GLX/EGL is in use, resulting in a BAD_MATCH (followed by some annoying flicker on the screen on Ubuntu at least, or a full log off (X crash?) on Fedora). The patch saves the visual id used to create the actual window and passes that when creating the user time window. This way the creation of the user time window succeeds with Xlib+GLX too. Change-Id: If3925d9ac1670d385dcc7c2b475c196908569f06 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Accessibility plugin for mac and xcb.Frederik Gladhorn2011-10-142-0/+13
| | | | | | | | | | Instead of creating new instances of the class whenever accessibility() is called, create one on startup. Change-Id: Idd5b06ee935d7acf4934b98882d254a1ef0ca04e Reviewed-on: http://codereview.qt-project.org/6435 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Fix OpenGL on Harmattan showing only the first frame.Jocelyn Turcotte2011-10-141-0/+14
| | | | | | | | | | | | swapBuffers would wait until DRI2_InvalidateBuffers was received from the X server, but would never receive it since we are not running the xlib event loop. This patch calls the XESetWireToEvent xlib callback of an unhandled event from the xcb event loop directly, if one is available for its response type. Change-Id: I3b4ef3f6e3efbae25f49f161e229e9b15e951778 Reviewed-on: http://codereview.qt-project.org/6557 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Minor build fix for newer XCB versionsJani Uusi-Rantala2011-10-101-0/+1
| | | | | | | | | | - Defines XCB_WM_STATE_WITHDRAWN as XCB_ICCCM_WM_STATE_WITHDRAWN if necessary Change-Id: I4212a0e1d7f14ac6695d23d6586dd97f898d3f2b Signed-off-by: Jani Uusi-Rantala <jani.uusi-rantala@nokia.com> Reviewed-on: http://codereview.qt-project.org/6267 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Make sure window state is synced back to Qt from the XCB plugin.Samuel Rødal2011-10-073-3/+49
| | | | | | | | | | We should properly react to the property notify events. Task-number: QTBUG-21856 Change-Id: I0d2aa90b7d8da3b96acf4d88684b0200de7d7413 Reviewed-on: http://codereview.qt-project.org/6266 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixed potential issue in XCB plugin.Samuel Rødal2011-10-072-9/+10
| | | | | | | | | | Use the actual atom instead of the enum value of the atom when signaling that the event loop should exit. Change-Id: Ib98c6a46cadcecc727b28411b4c0c12c434ea828 Reviewed-on: http://codereview.qt-project.org/6265 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix QMouse/Wheel/TouchEvent::modifiers with the XCB back-endSimon Hausmann2011-10-072-8/+11
| | | | | | | | | | | | The modifiers are provided by X and need to be propagated through the QWindowSystemInterface. Change-Id: I127d0b6e9918b558ca15d9302c4cc0cbd94eb757 Reviewed-on: http://codereview.qt-project.org/6244 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com> Sanity-Review: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Improved logical and physical DPI APIs.Samuel Rødal2011-10-062-3/+3
| | | | | | | | | | | | | | Made physicalSize() return QSizeF instead, to prevent rounding errors. Added logicalSize() as the base to compute font pixel sizes instead, and added convenience functions in QScreen to access the logical and physical sizes and DPI metrics. Task-number: QTBUG-21736 Task-number: QTBUG-21737 Change-Id: Ic705dc98eb3632617659e65a0c9a552673dc0c65 Reviewed-on: http://codereview.qt-project.org/5888 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix compilation on HarmattanSimon Hausmann2011-10-042-0/+8
| | | | | | | | | | Include Xlib.h for XInitThreads and add the SUPPORT_X11 macro to DEFINES for Harmattan's EGL library. Change-Id: I34ad284fe5b671f3924e406a18b8c5520df8346a Reviewed-on: http://codereview.qt-project.org/5935 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix XCB back-end on HarmattanSimon Hausmann2011-10-041-3/+15
| | | | | | | | | | | Use RGB16 as image format on 16-bpp displays. Based on patch by Jocelyn Change-Id: Ic91ab33132769da59a2097abb43b64a2d09c0009 Reviewed-on: http://codereview.qt-project.org/5971 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Don't use un-guarded printfs for debug logging in XCB platform pluginTor Arne Vestbø2011-10-032-20/+22
| | | | | | | | | | | | Using qDebug() instead of printf and friends allows clients to install a message handler to supress the output. The remaining printfs in the code are all guarded by custom debug ifdefs. Change-Id: I38edc7452184783152f26b4dde6342c3bb9ef799 Reviewed-on: http://codereview.qt-project.org/5875 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make qtbase build with Qt-in-namespace againKent Hansen2011-09-2814-0/+54
| | | | | | | Change-Id: I5faa8690a05d6ec352fc69c0b69848539f2ed216 Reviewed-on: http://codereview.qt-project.org/5460 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove debug outputLars Knoll2011-09-281-1/+0
| | | | | | | Change-Id: I1d1884956a02bc58e760f0893ec4762e3c2f3f4d Reviewed-on: http://codereview.qt-project.org/5560 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Prevent potential crash in QXcbConnection::checkEvent().Samuel Rødal2011-09-281-1/+1
| | | | | | | Change-Id: I4b2ed85fecbfc1cc4fecfa9bb37aa0d9bd329817 Reviewed-on: http://codereview.qt-project.org/5616 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix mouse coordinate translation when searching for a drop targetLars Knoll2011-09-281-11/+5
| | | | | | | | | | | Correctly transform the coordinates when mapping from parent to child in the window hierarchy. Also avoid a second roundtrip to the xserver querying information that we already have. Change-Id: Ia13f1c7ee20c60df283562daa4869d6db30a37e9 Reviewed-on: http://codereview.qt-project.org/5558 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Unlock the eventreader before calling handleEvent()Lars Knoll2011-09-281-0/+2
| | | | | | | | | | | Handle event can cause accesses to the event queue from other places (e.g. through checkEvent()). Unlock the reader to avoid deadlocks. Change-Id: I1e5a79ce556920127848fccc3387d711c7cd32c2 Reviewed-on: http://codereview.qt-project.org/5557 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Implemented QWidget's move() vs setGeometry() distinction in QWindow.Samuel Rødal2011-09-231-3/+8
| | | | | | | | | | | | | | QWidget's move() sets the position of the window including the window frame, unlike setGeometry(). There was no equivalent for this in QWindow, so several QWidget auto-tests were failing. Now we add setFramePos() to achieve the same purpose in QWindow. This fixes tst_QWidget::windowState(), which uses move(). Change-Id: I9a3e558bd615a8f0234cc3dd94fbb2bf5ecbc148 Reviewed-on: http://codereview.qt-project.org/5405 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Don't flood expose events in the xcb plugin.Samuel Rødal2011-09-232-1/+13
| | | | | | | | | | | | The X server sends a series of expose events, where the count member specifies how many expose events are remaining in the current series. By merging them into an expose region we can send a single expose event to the lighthouse interface. Change-Id: If73c9972fe02c5e4137e8742aaaf5679ccea5a09 Reviewed-on: http://codereview.qt-project.org/5366 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Only set frame margins as dirty when we get a configure notify event.Samuel Rødal2011-09-231-5/+2
| | | | | | | | | | | It's dangerous to set them as dirty in anticipation of a configure notify event, as if frameMargins() is called before the event is received the computed values are bogus. Change-Id: Ib6db975fba5fcb13a2511e4716cbb5ca79265c34 Reviewed-on: http://codereview.qt-project.org/5365 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixed geometry issues.Samuel Rødal2011-09-231-9/+3
| | | | | | | | | | | We need to compare against the window's currently known geometry to know when to send resize and move events. Also make sure at least one resize event is sent, instead of sending one before each expose. Change-Id: Id7ebe4c1c0e723af9198c668a0c736d64efdbf3e Reviewed-on: http://codereview.qt-project.org/5364 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix preedit text on XCBEskil Abrahamsen Blomfeldt2011-09-231-1/+1
| | | | | | | | | | indexOfMethod() requires a full signature, not just a method name. Change-Id: Icb15ab46cab61b35f5d56e8e94b71f5e3b72f97a Reviewed-on: http://codereview.qt-project.org/5386 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* workaround XCB-ICCCM 3.8 breakage, second instanceOswald Buddenhagen2011-09-231-0/+2
| | | | | | | | Change-Id: Ic456f6ca9d845f50506b41d71bb5d2b83239a37e Reviewed-on: http://codereview.qt-project.org/5333 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixes to the Xdnd code in xcbLars Knoll2011-09-212-61/+63
| | | | | | | | | | Make sure we move the drag pixmap when required, and readd some commented out code from Qt 4.x. Change-Id: Ib4302b394f4ac7b966d0146267651b9c3860c62b Reviewed-on: http://codereview.qt-project.org/5262 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add Qt::WindowTransparentForMouseEventsLars Knoll2011-09-212-0/+42
| | | | | | | | | | | Add a flag for output only windows that are transparent for mouse events and implement it for the xcb backend. Change-Id: I24afdb6b27de34bcdf0c061a5a4987ac2880e4ae Reviewed-on: http://codereview.qt-project.org/5260 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Create the window when neededLars Knoll2011-09-211-1/+6
| | | | | | | | | | | We need to create the XWindow here to avoid crashes, when resizing the backing store before creating the window. Change-Id: Ib8d9efca3552e5a91f5f63a9262449080ae301e5 Reviewed-on: http://codereview.qt-project.org/5259 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Implemented key filter support on platform input contextPekka Vuorela2011-09-201-2/+11
| | | | | | | | | | | As previously with QInputContext, now supporting filterEvent() interface. Usage only on XCB so far. Change-Id: I8e5972626552bda32318fe060017d0217bb79a94 Reviewed-on: http://codereview.qt-project.org/5240 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make sure to clip in QXcbBackingStore::flush()Samuel Rødal2011-09-191-3/+12
| | | | | | | | | Clip to image and window dimensions to prevent X errors. Change-Id: I7fa581217444e00d6eb83ac356c600f86ae03636 Reviewed-on: http://codereview.qt-project.org/5140 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
* Fix xcb-icccm 3.8 supportJędrzej Nowacki2011-09-151-3/+15
| | | | | | | | | Build fix on platforms having xcb-icccm >= 3.8 Change-Id: Ia20c9a439d57e147db90d635679e471bfa02c840 Reviewed-on: http://codereview.qt-project.org/4779 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix stale license headers from refactor branchJason McDonald2011-09-154-68/+68
| | | | | | Change-Id: I38cd941202641f50bf632af35165a944d03a20e3 Reviewed-on: http://codereview.qt-project.org/4848 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix warnings received when xcb platform is ran without ibus platforminputcontextJoona Petrell2011-09-141-7/+8
| | | | | | | | | | | | | | | Warnings like QMetaObject::invokeMethod: No such method PlatformInputContext::x11FilterEvent(uint,uint,uint,bool) QMetaObject::invokeMethod: No such method PlatformInputContext::x11FilterEvent(uint,uint,uint,bool) QMetaObject::invokeMethod: No such method PlatformInputContext::x11FilterEvent(uint,uint,uint,bool) QMetaObject::invokeMethod: No such method PlatformInputContext::x11FilterEvent(uint,uint,uint,bool) Ibus is not always available and QPlatformInputContextFactory is allowed to load different input methods. Change-Id: Id498a5e024e6646e73ed4db2efe5b007e6601698 Reviewed-on: http://codereview.qt-project.org/4738 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixed race condition in xcb plugin logging (when debugging is enabled).Samuel Rødal2011-09-122-0/+4
| | | | | | | Change-Id: I8fa11ba26037d8f78e7c5131326d94836d0de9d4 Reviewed-on: http://codereview.qt-project.org/4647 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Make inputcontext plugin loading a bit more genericLars Knoll2011-09-082-18/+1
| | | | | | | | | | | | | | Add a create() method to the inputcontext factory that takes no arguments. Add a virtual isValid() to QPlatformInputContext to determine whether it actually works. Remove IBUS dependencies in the xcb code so that it can also load other plugins. Change-Id: I6345a845f48fd4b3cacf6d8652711b16835a235c Reviewed-on: http://codereview.qt-project.org/4487 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixup a few minor errors in the previous commitLars Knoll2011-09-082-6/+6
| | | | | | | | | | | Methods need to be Q_INVOKABLE to be able to call them with QMetaObject::invokeMethod(). Also use the correct return type. This makes the IBUS input context work again. Change-Id: If7ed6dd8fb99f3363c4ecebb98f889ed9eeeff00 Reviewed-on: http://codereview.qt-project.org/4486 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add plugin mechanism to load platform input contextsJoona Petrell2011-09-082-10/+25
| | | | | | | Change-Id: I6e74fd395325445420efce4adf13e89abe8177ee Reviewed-on: http://codereview.qt-project.org/4482 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixed symbol lookup failure with xcb when using GLX and XRender.Samuel Rødal2011-09-071-1/+1
| | | | | | | Change-Id: I17870f0acd934bf6203e432d406f1717d99386ee Reviewed-on: http://codereview.qt.nokia.com/4310 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Fixed tst_QGL::partialGLWidgetUpdates.Samuel Rødal2011-09-071-2/+31
| | | | | | | Change-Id: Ie37051e28b199b5d159f5be05be41efbd17fdf08 Reviewed-on: http://codereview.qt.nokia.com/4273 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Refactor QMouseEvent to contain the position inside the windowLars Knoll2011-09-011-2/+4
| | | | | | | | | | | | | | Rename the default accessors for positions to localPos, windowPos and screenPos, to be explicit about their use. Introduce a QT_NO_INTEGER_EVENT_COORDINATES define so one can make sure to always use the float based coordinates. Fixup all Qt code to use the correct constructor that specifies all three coordinates. Change-Id: If4bb93b8d1e2eb2440260d99680c468706cfe68f Reviewed-on: http://codereview.qt.nokia.com/4058 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Make xcb plugin compile again.Laszlo Agocs2011-09-011-1/+1
| | | | | | | | | The name of function handleExposeEvent has not changed. Change-Id: Ida4621bbf988088c0a75f1c93a3332702f0d92b7 Reviewed-on: http://codereview.qt.nokia.com/4037 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* The XCB plugin should not rely on QT_CONFIG=opengl anymoreGunnar Sletta2011-08-312-23/+18
| | | | | | | | Change-Id: Ieeedb7eb68704df811c613873bd2fc4b77e2aa04 Reviewed-on: http://codereview.qt.nokia.com/3966 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kevin Simons <kevin.simons@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Cocoa: Fix qmlscene flicker on startup.Morten Sorvig2011-08-312-2/+2
| | | | | | | | | | | | | | | | | | | | | | | The SG render thread was racing window creation in the GUI thread, which would cause flicker if the window won the race and was shown before the SG thread had a frame ready. Send a synchronous expose event before showing the window - this will wait for the SG render thread. In addition, don't defer NSwindow creation. The GL context setup is done before the window is shown and needs a fully created window. New API: QWindowSystemInterface::handleSynchronousExposeEvent Retire: QWindowSystemInterface::handleExposeEvent Change-Id: I0bb46089d16ec4882aaac8db67b57d15e0f51531 Reviewed-on: http://codereview.qt.nokia.com/3399 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* Copy core GL functionality to QtGui with QGL -> QOpenGL naming.Samuel Rødal2011-08-298-20/+20
| | | | | | Change-Id: Ibc989afa4a30dd184d41d1a1cd89f97196e48855 Reviewed-on: http://codereview.qt.nokia.com/3710 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Always relay configure notify events from XCB plugin.Samuel Rødal2011-08-291-3/+0
| | | | | | | | | | QWindow no longer sets its geometry member in setGeometry(), so it needs to happen through handleGeometryChange() from the platform plugin. Change-Id: Ia22b788c65dba4fc4b1efed1965ccd9473f1f743 Reviewed-on: http://codereview.qt.nokia.com/3709 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* xcb: Disable GLX when xcb-xlib is not present due xlib usageHolger Hans Peter Freyther2011-08-262-2/+2
| | | | | | | | | | The GLX and EGL code is using DISPLAY_FROM_XCB which requires xlib support, disable GLX when when xlib is not present. Change-Id: I55126e48e52390fdcfb1348a11fbf9628d32b13c Reviewed-on: http://codereview.qt.nokia.com/3665 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* xcb: Be able to compile without xlib supportHolger Hans Peter Freyther2011-08-261-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use XCB types for events instead of indirectly depending on Xlib includes because of the GLX includes. Manually verified the right values. ButtonPressMask (1L<<2) XCB_EVENT_MASK_BUTTON_PRESS = 4, define ButtonReleaseMask (1L<<3) XCB_EVENT_MASK_BUTTON_RELEASE = 8, ButtonMotionMask (1L<<13) XCB_EVENT_MASK_BUTTON_MOTION = 8192, EnterWindowMask (1L<<4) XCB_EVENT_MASK_ENTER_WINDOW = 16, LeaveWindowMask (1L<<5) XCB_EVENT_MASK_LEAVE_WINDOW = 32, PointerMotionMask (1L<<6) XCB_EVENT_MASK_POINTER_MOTION = 64, GrabModeAsync 1 XCB_GRAB_MODE_ASYNC = 1 Change-Id: I1fade68947b1e2f39ca3514573c10fae7ee2dfb1 Reviewed-on: http://codereview.qt.nokia.com/3664 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix some compiler warnings, shut up QIbusPlatformInputContext.Friedemann Kleint2011-08-261-1/+0
| | | | | | Change-Id: Idadf40b2bbe53928d8577a099f38a2be0a2d6e16 Reviewed-on: http://codereview.qt.nokia.com/3640 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Introduce new platform capability ThreadedOpenGL.Samuel Rødal2011-08-261-0/+6
| | | | | | | | | | | | | Lets the platform plugin advertise whether it's safe to use OpenGL from a different thread. With XCB we only advertise this if we have a reasonably new XCB libary, as older versions suffer from the xcb_wait_for_reply() blocking bug, which cause GL rendering in a separate to stall when using Mesa drivers. Change-Id: I4829df7e583a1c8aed218ae13a159d21266cc594 Reviewed-on: http://codereview.qt.nokia.com/3613 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Move XCB event reading to a separate thread.Samuel Rødal2011-08-263-19/+137
| | | | | | | | | | | | | | Work-around for bug in XCB which causes a xcb_wait_for_reply to block if xcb_poll_for_events() is called simultaneously from a different thread. If the XCB version is too old this work-around causes even more problems, so we kill two birds with one stone by only using the work-around if the XCB version has the recent xcb_poll_for_queue_event() function, which we also need to read events from a separate thread with reasonable efficiency. Change-Id: I8a899dad6ded381ce42cba0112e77da3c8aa6887 Reviewed-on: http://codereview.qt.nokia.com/3612 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>