summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use XI2 event detail to determine changed mouse buttonv5.3.0-rc1Allan Sandfeld Jensen2014-05-051-13/+0
| | | | | | | | | | | The button state part of the XI2 events appears to be badly constructed on some devices and platforms. Even where supported the 'detail' field of the XI2 events is what we should be reading since it indicates the button the event refers to and not just the state of all buttons. Task-number: QTBUG-38169 Change-Id: Iedb7971194b3c27448b72c285a54100c511c17e4 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Use runtime detection of XInput 2.1 to disable legacy wheel eventsAllan Sandfeld Jensen2014-04-251-0/+13
| | | | | | | | | | Ensure we fall back to using wheel button events if xinput 2.1 scroll events are not available. Handles lack of xinput 2.1 support in the server or in the input devices drivers. Task-number: QTBUG-38169 Change-Id: Ie4ad9069f648d0ab02d8f9540ed01ad58fd9e9d8 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* XCB: Print error code on Xlib I/O errorsUli Schlachter2014-04-101-0/+28
| | | | | | | | | | | | | | When Xlib detects that its underlying XCB connection got into an error state, it calls its I/O error handler. However, the default implementation doesn't print the error code from XCB which might be useful for debugging. This commit adds an I/O error handler which prints the error code from XCB with a string describing the error and then calls Xlib's default error handler. Change-Id: I7f1fb3f1e8d0fdc3ac9db03ae7d154330c31db0c Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* XCB: use requested primary screen DISPLAY=:0.1 when possibleDavid Fries2014-03-291-2/+6
| | | | | | | | | | | | | | | | | | | The current logic requires primary->output to not be specified, or match the output number. This fails when the output by that number doesn't currently have a display attached, as non-connected outputs are skipped. This means setting the display to :0.1 for Qt5 will put the window on :0.0 and it can't be moved to :0.1 after the fact. The solution is to pick the first output on the requested screen, then override if an output exactly matches the primary output value. That way it will at least be on the requested screen. Tested with Xephyr, ATI, and nVidia (proprietary driver), where the nVidia had the primary output disconnected. Task-number: QTBUG-15418 Change-Id: I7951dcef74cb135dc12a6e133a71c5852eae9778 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Add better support for keymap update handlingGatis Paeglis2014-03-271-31/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new X11 support API xkb_x11_* released in libxkbcommon version 0.4.0. From the commit message where this API was introduced: "These are function to create an xkb_keymap directly from XKB requests to the X server. This opens up the possibility for X clients to use xcb + xcb-xkb + xkbcommon as a proper replacement for Xlib + xkbfile for keyboard support. Why not just use the RMLVO that the server puts in the _XKB_RULES_NAMES property? This does not account for custom keymaps, on-the-fly keymap modifications, remote clients, etc., so is not a proper solution in practice. Also, some servers don't even set it. Now, the client just needs to recreate the keymap in response to a change in the server's keymap (as Xlib clients do with XRefreshKeyboardMapping() and friends)." This patch moves XKEYBOARD presence decision from compile time to runtime for a proper remote X client support. Task-number: QTBUG-31527 Task-number: QTBUG-32760 Change-Id: I4d402668cda2126ef180b27022154f96b1874b1d Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* XCB plugin: query screen resources without _currentRolf Eike Beer2014-03-141-6/+6
| | | | | | | | | | | | | | | | | | | xcb_randr_get_screen_resources() and xcb_randr_get_screen_resources_current() do basically the same, but for one case: if nothing has queried these information ever before. So if an application is the very first client ever to connect to an X server it may just return nothing. A call to xcb_randr_get_screen_info_reply() will then cause the X server to allocate the needed information and send an update notification, resulting in a second QXcbScreen being created, but the other one is still around and probably used. The behavior I observed with a simple test application was that the application was not visible on the screen when it was the first client ever on the X server. Killing the application and starting it again made it work just fine. Change-Id: Id64f267e8ebcfa5b39d21d98307170a09e5169df Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* xcb: Do not leak when compressing eventsLaszlo Agocs2014-01-201-2/+1
| | | | | | | | | The event must be freed in all cases, also when a motion or configure notify is skipped. Change-Id: Ie55e62d0c3ab25bd9b20cc85098ea337d0b1ac5d Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Use XInput2 scrolling events to enable smoother scrollingAllan Sandfeld Jensen2014-01-091-18/+24
| | | | | | | | | | | With this patch all wheel events will be generated by XInput2 where available. This enables higher precision and smoother scrolling especially from input devices such as touchpads on laptops. [ChangeLog][Platform Specific Changes][X11 / XCB]Support XInput2 smooth scrolling events Change-Id: I3b069ed92ad5c53e08af64baaece32de82e9b5c4 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-01-031-2/+16
|\ | | | | | | Change-Id: Id13badc270db98806048753fd7fb658aa17f1ede
| * xcb platform: Fix build when both EGL and xcb-Xlib are usedAndrew Knight2013-12-311-2/+6
| | | | | | | | | | | | | | | | Fix a multiple define when Qt is configured to use both EGL and xcb-Xlib. Change-Id: I6fdb282f575842711b3b5d377bbdf3bc9909bf0c Reviewed-by: Christoph Cullmann <cullmann@kde.org> Reviewed-by: David Faure <david.faure@kdab.com>
| * fix compile of qt without egl availableChristoph Cullmann2013-12-301-1/+1
| | | | | | | | | | | | | | | | move the dpy to the place where it is used inside the egl ifdef guard fixes compilation on old distros not having egl Change-Id: I7eebe5305f3a584c0c5da2ea7b9099fdd994249d Reviewed-by: David Faure <david.faure@kdab.com>
| * xcb: added env variables to show input devices and eventsShawn Rutledge2013-12-301-0/+10
| | | | | | | | | | | | | | | | | | | | export QT_XCB_DEBUG_XINPUT_DEVICES=anything to show detected input devices at startup export QT_XCB_DEBUG_XINPUT=anything to log mouse, touch and tablet events Change-Id: Id14844b68ad376740f82a36aab2c59c84d2017ab Task-number: QTBUG-35583 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-051-7/+8
|\| | | | | | | | | | | | | Conflicts: src/sql/drivers/sqlite/qsql_sqlite.cpp Change-Id: Ia7cffd2c99ae3d5eea6b5740683c06e921336dcd
| * xcb qpa: initialize EGL for non-XLib buildsAndrew Knight2013-12-031-7/+8
| | | | | | | | | | | | | | | | Move the EGL initialization code outside of the XLib ifdefs, so it can be enabled for non-XLib builds as well Change-Id: Ie025551e4e99bb0b365f025356bd9725f4283b82 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-261-4/+23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the conflicts in msvc_nmake.cpp the ifdefs are extended since we need to support windows phone in the target branch while it is not there in the current stable branch (as of Qt 5.2). Conflicts: configure qmake/generators/win32/msvc_nmake.cpp src/3rdparty/angle/src/libEGL/Surface.cpp src/angle/src/common/common.pri src/corelib/global/qglobal.h src/corelib/io/qstandardpaths.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxscreeneventhandler.h src/plugins/platforms/xcb/qglxintegration.h src/widgets/kernel/win.pri tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp tools/configure/configureapp.cpp Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
| * Workaround source compatibility issue introduced by xcb 1.9.3Gatis Paeglis2013-11-201-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous version of the struct: typedef struct { uint8_t response_type; /**< Type of the response */ uint8_t pad0; /**< Padding */ uint16_t sequence; /**< Sequence number */ uint32_t length; uint16_t event_type; uint16_t pad1; uint32_t pad[5]; /**< Padding */ uint32_t full_sequence; /**< full sequence */ } xcb_ge_event_t; New version of it: typedef struct xcb_ge_event_t { uint8_t response_type; /**< */ uint8_t extension; /**< */ uint16_t sequence; /**< */ uint32_t length; /**< */ uint16_t event_type; /**< */ uint8_t pad0[22]; /**< */ uint32_t full_sequence; /**< */ } xcb_ge_event_t; Changes are: - "pad0" became "extension" - "pad1" and "pad" became "pad0" More details in https://bugs.freedesktop.org/show_bug.cgi?id=71502 Task-number: QTBUG-34748 Change-Id: Ibd801c11510f75fa82d5c14346b95236142487ac Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Silence the _COMPIZ_DECOR_* warnings on UbuntuJørgen Lind2013-10-301-1/+4
| | | | | | | | | | | | | | | | | | Earliest occurrence is to my knowledge in 12.04. It is still unclear how to act on those messages Change-Id: I7da48281c6bec973448a1d4cd800d445a80695a2 Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | xcb: Only create listener window when neededUli Schlachter2013-11-151-22/+13
|/ | | | | | | | | | | | | | | | | | | | | The xcb QPA plugin uses a separate thread for getting events from the X11 server in a race-free manner. This thread has to be stopped when shutting down. This is done by causing the X11 server to send a special event that causes the thread to exit when it sees it. (Also, the thread exits if the xcb connection goes into an error state, but that does not matter here) So this event listener window is only needed when Qt is sending events to itself. This means that it does not have to be kept around and instead can be created only when needed. Since this window does not stay around for long, it does not need a name. However, it does need the list of screens to find the correct root window, so destroy screens later. Change-Id: Ib4104cbc3f372fa5d1391bcf5a633a158409862f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* xcb: every window should have a title in debug modeShawn Rutledge2013-10-091-0/+11
| | | | | | | | | | | | Qt creates various invisible windows for internal purposes. Giving them all titles makes the output of tools like xprop and xwininfo more readable, which makes solving certain bugs (like transient-window bugs) easier. Task-number: QTBUG-33644 Change-Id: I9d37b40d3339fb0f81ffeae64949b88ecb655474 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* xcb: Don't connect() to event-dispatcher until we are sure we have oneTor Arne Vestbø2013-09-301-13/+17
| | | | | | | | | | | | | | | | | | | QCoreApplication sets up the event dispatcher in the constructor, through createEventDispatcher(), which is overridden in QGuiApplication to take the platform-integration into account. The problem is that the platform integration is created before the event dispatcher, so when we create the QXcbConnection we are not guaranteed to have an event dispatcher yet. This is not an issue when using xcb_poll_for_queued_event() in a thread, but for the fallback case we connect to the event-dispatcher's awake() and aboutToBlock() signals. To ensure that we do this only when we have an event dispatcher we post a queued method invocation, that will be processed as one of the first events once there is an event-dispatcher. Change-Id: I623011af447b585884b84c7559737f134aab83e8 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Merge branch 'stable' into devSergio Ahumada2013-09-211-0/+6
|\ | | | | | | Change-Id: I37d85631ab1165ab91457d8880c4da907a9df73b
| * Implement INCR property mechanism for large data transfers [XCB]Gatis Paeglis2013-09-191-0/+6
| | | | | | | | | | | | | | Implement INCR property mechanism according to the icccm specification. Change-Id: Ic8f85b71cab825d70ee1b61f29acd09fa4c3e642 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Remove qFind usages from the XCB pluginGiuseppe D'Angelo2013-09-061-2/+3
| | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: Ieccef12c617276d0526ce2876fd76e37b4240a43 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Change QXcbConnection::atom() to be inline.Friedemann Kleint2013-09-051-5/+0
| | | | | | | | | | | | Change-Id: I88b5b2527808f7c603c5a041df9c8c9e8031a608 Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-271-0/+3
|\| | | | | | | | | | | | | Conflicts: examples/widgets/doc/src/addressbook-fr.qdoc Change-Id: Id1196e8e0c6445f1616c3f29234c974d809f8e48
| * XCB: Fix race with the event threadUli Schlachter2013-08-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The XCB backend runs a thread which gets events out of the XCB event queue and feeds it to the main thread via another queue. This queue is protected by a mutex. However, when the event thread exits, it cleans up after itself and frees all remaining entries in the queue. This code messed with the event queue without acquiring the needed mutex and left behind a list full of stale pointers. Fix this and protect the freeing with the correct mutex and clear the event queue afterwards. Change-Id: Ie49cf6241b76be86d8cebbc931f7226a3f6a14e5 Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Pass Xcb errors through the native event filterMartin Gräßlin2013-08-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far only the xcb plugin is able to handle xcb errors and there is no way for an application to get access to the errors even if the app is using xcb directly. This means Qt is filtering out all xcb errors which are relevant to the app and at the same time the xcb plugin is getting spammed with errors it did not cause and which are logged with a qWarning. By passing the error event through the native event filter an app can filter out all errors it knows to have caused. Change-Id: I158deee2e1c71630f2b1d77174f1091532851b3d Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Move the X11 system tray code from widgets into XCB-plugin.Friedemann Kleint2013-07-301-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add system tray tracker class to XCB plugin and provide functionality via invokable slots of the native interface. - Remove XLib-dependency of widgets/utils. - Reintroduce tracking of tray window destruction and recreation, which was removed in the XLib-code when porting it from Qt 4 to Qt 5. This paves the way for implementing the tray icon completely in terms of QPlatformSystemTrayIcon at some point later. Change-Id: Ia04268b0e2919c05874a3e9548930535332897c7 Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-231-0/+1
|\| | | | | | | | | | | | | Conflicts: tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp Change-Id: I18a9d83fc14f4a9afdb1e40523ec51e3fa1d7754
| * XCB: Set WM_CLASS.Friedemann Kleint2013-07-181-0/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | xcb: touchpad supportShawn Rutledge2013-07-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Relative touch devices tend to provide a moving point for one finger, then when more points are pressed, the root_x/root_y stay stationary while the Rel X/Y valuators provide info about the movements around that point. Synthesize moving touch points from those so that gestures become possible. Behavior is now similar to that on OS X. Change-Id: I1c65fb04849d19f11c3bf166044f296d95c33da1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-151-1/+1
|\| | | | | | | Change-Id: I0218a1f08b89f2d56757ab35eec06799d2a1492f
| * XCB: Append 0-character to atom name string.Friedemann Kleint2013-07-121-1/+1
| | | | | | | | | | | | | | | | The below loop needs 2 consecutive 0-characters to terminate properly. Change-Id: I73e56cadbcd2515d5b0f1b4907316a27a6bbaf0e Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | xcb XI2: simplify and generalize tablet detectionShawn Rutledge2013-07-051-1/+6
|/ | | | | | | | | | We're looking for any tablet which has appropriate valuators, not just Wacom tablets that have recognizable names. The name recognition was always brittle and already stopped working, probably because of changed udev rules or something like that. Change-Id: Ib3a6dfdd9972b16f08f270e3f0a1aa54d6660c9f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Add QXcbConnectionGrabber classJørgen Lind2013-05-201-0/+20
| | | | | | | Inspired by QMutexLocker Change-Id: I66e31091d2a006db3272b627567d95d3e0b1c4f9 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Introduce QXcbXSettingsJørgen Lind2013-05-201-0/+1
| | | | | | | | | | | | | This allows you to easily retrieve properties in the XSETTINGS specification. It is also possible to add listeners to get notified when a specific property changes. XSETTINGS is lazy initialized, so it will not be instansiated before someone uses it. For now the intended use is a fallback for finding cursor theme Change-Id: Id47f0613f5876424cd47d721b40da17d3f63429e Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Use X11 core protocol when xkb not availableGatis Paeglis2013-05-071-1/+33
| | | | | | | | | | | | | | | | | | | | To have a properly working key input in the xcb plugin in the case when xcb-xkb library is not available we can update the xkb_state struct with the keyboard state information available in the X11 core events. The current modifier state is reported to clients in a number of core protocol events and can be determined using the QueryPointer request. This is how it is done in Weston, Wayland's reference implementation. Note: In case the X server doesn't have a xkb support on it (which is very unlikely), then xkbcommon will only pick up the user's primary layout. The X server with the xkb support stuffs unused bits (13 and 14) of 'state' in the core events with the effective keyboard group, which we can use to determine layout changes. Change-Id: I9f1ef635109870e7412ef1157ca592f3c8f9271c Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Utilize libxkbcommon API for the keyboard backend on X11Gatis Paeglis2013-05-071-13/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | libxkbcommon is a keymap compiler [1] which utilizes xkb keyboard configuration database [2]. xkbcommon simplifies keyboard state handling by providing xkb_state object which holds the current state of all modifiers, groups, LEDs, etc, relating to the provided keymap. Detecting modifier mapping should become simpler once it gets supported in libxkbcommon. Also with xinput2 we could get rid of the XkbStateNotify events, because xinput2 key press/release already include all the mod/group info. [1] http://xkbcommon.org/ [2] http://www.freedesktop.org/wiki/Software/XKeyboardConfig This patch: - Removes a dependency to -lxcb-keysyms - Removes a dependency to XLib call - XLookupString - Enables required functionality to fix QTBUG-27681 Task-number: QTBUG-27680 Change-Id: I10e10f873821ee02f6df72238e215a541150f38f 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/+1
| | | | | | | | | | | | 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>
* Add QXcbWindowEventListenerJørgen Lind2013-04-261-10/+18
| | | | | | | | This makes it possible to listen for events on xcb_window_t which are not platformwindows inside the xcb plugin Change-Id: Ic9ec17ed757a7f9a5302ef2759c119a72bac573c Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Moving logic from Qt4 for grabbing the X serverJørgen Lind2013-04-261-1/+14
| | | | | | | | | 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>
* Fix segfault while handling system-wide shortcuts with xcbhluk2013-04-241-1/+1
| | | | | | Change-Id: I8485031edc623f99b4b858d4f777be43f4bc3264 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Implement startup notification spec again.David Faure2013-04-231-0/+4
| | | | | | | | | | | | | | | | | This functionality was in Qt4's qapplication_x11.cpp and was missing from the XCB QPA plugin. Ported the code from xlib to xcb. This code was actually tested (with plasma), unlike the Qt-4.8 code which skipped every other character... for (uint i = 0; i < 20 && i + sent <= length; i++) xevent.xclient.data.b[i] = message[i + sent++]; Provide a QPA native-function for accessing the startup id, for cases where an application doesn't show a window, but starts another app instead, or asks a running app to show the window on its behalf. Change-Id: If392179efddd70a51c45a8fab4fb9d753913094a Reviewed-by: David Faure (KDE) <faure@kde.org>
* Implement XEmbed protocolAlberto Mardegan2013-03-061-2/+2
| | | | | | | | | | | | | | | | | | | 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-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Fix focus handling of native child widgets in xcb.Gunnar Sletta2013-02-191-1/+7
| | | | | | | | | | | | Change-Id: If4d596195624011142bff6853849a23064e478df Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> (cherry picked from commit fc663b5f9aae16fe6a03160e3eb148a5f742ac58)
* | Fix primary screen selection.Alain Boyer2013-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | When selecting the primary screen, the m_primaryScreen value obtained from the xcb_connect() call should be respected. This ensures that the proper primary screen is selected when specifying the DISPLAY environment variable. Task-number: QTBUG-27220 Change-Id: I60aa207f13d919087d4d2913141c804928684731 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-241-0/+1
|\| | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsdialoghelpers.cpp Change-Id: I4ca87d44129fa5c1d8541cd58b8d62bc69080688
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-01-241-0/+1
| |\ | | | | | | | | | Change-Id: Idcaa9b0c63aca5ba11ee3fa2da456178655a1ae3