summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
Commit message (Collapse)AuthorAgeFilesLines
* remove unnecessary beginPaint and endPaint overridesShawn Rutledge2013-09-162-5/+0
| | | | | | | | | | | | | QPlatformBackingStore::endPaint does not take a QRegion parameter. 6ce6b8a378b0d97ba950240ffb048a4b7e485235 set the API, but the platform implementations were not all synced up since then. There was anyway no point in overriding beginPaint and endPaint on platforms which don't need to do anything there. This fixes clang warnings of the form QXcbBackingStore::endPaint hides overloaded virtual function Change-Id: Id6cd0fc2c831a34576ac2c73eeb0d5741d26e622 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Bring back Qt4 X11 session management functionality.Teo Mrnjavac2013-09-135-0/+622
| | | | | | | | | | | | | | | 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>
* QXcbSystemTrayTracker::trayWindow compiles if Q_XCB_DEBUG is onShawn Rutledge2013-09-121-1/+1
| | | | | | | | Fixes qxcbsystemtraytracker.cpp:125:134: error: 'connection' was not declared in this scope Change-Id: If881aa9466ea94d5392da9f177e4b79e044710b7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Replace XCB native interface resource map by a lookup function.Friedemann Kleint2013-09-081-43/+23
| | | | | | | | | Remove global variable and duplicated lookup in the old code (map.contains() followed by map.value()). Change-Id: Id68c34bf38c6706db69dcb8422c3b1ea718aa064 Y# issue or contains a behavior change that is relevant to others, Reviewed-by: David Faure <david.faure@kdab.com>
* Remove qFind usages from the XCB pluginGiuseppe D'Angelo2013-09-062-10/+13
| | | | | | | | 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-052-6/+1
| | | | | | Change-Id: I88b5b2527808f7c603c5a041df9c8c9e8031a608 Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Compile fix in qxcbwindowhjk2013-09-051-1/+1
| | | | | | | | There was a error: narrowing conversion of 'Myns::XEMBED_VERSION' from 'unsigned int' to 'long int' inside { } [-Werror=narrowing] Change-Id: I1e155870b0b632bfe5ffa9deac69c4f151f5aa23 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Enable XSync extension also for KWinMartin Gräßlin2013-09-041-1/+1
| | | | | | | | KWin supports the XSync extension. Since the check got added the XSync implementation in KWin got reworked (release KDE SC 4.8). Change-Id: I15c37fe4dd5501ca107b90a07ae8d70295ffaeda Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-272-0/+7
|\ | | | | | | | | | | | | 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>
| * QXcbBackingStore: don't crash in flush() if no platformWindowShawn Rutledge2013-08-211-0/+4
| | | | | | | | | | | | Task-number: QTBUG-32681 Change-Id: Iec7204985867a8d65cea393ba6ab66d328a5e7b2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Thiago Macieira2013-08-221-3/+5
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-211-3/+5
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/src.pro Change-Id: I0a560826c420e46988da3776bd8f9160c365459a
| | * xcb: Fix TouchPointPressed being sent multiple times.Jocelyn Turcotte2013-08-191-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XI2 sends events for individual touch points, but QTouchEvent sends all of them with a stationary state if they didn't change. If a touch pressed event is received, and the next XI2 event is about a different touch point, we wouldn't update the state of the previously pressed touch point. Change-Id: I1ebcbea1cea54872064ef7710e2aac7b0b41cd70 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | | XCB: Suppress warnings about unhandled client messages.Friedemann Kleint2013-08-211-3/+5
|/ / | | | | | | | | | | | | | | | | | | | | Introduced by the tray icon refactoring d8090022f66cc6cff6af5ed2ae702212fd172ff7 among other things. Task-number: QTBUG-33068 Change-Id: I7c536c68acc2fae39ca30afb401500d0dc8701b1 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | XI2 touch support: must call deviceForId to create the deviceShawn Rutledge2013-08-161-2/+4
| | | | | | | | | | | | | | | | | | | | After change 4dbf574b7acb7ae8f852219700afa95f8d568f0e touch worked only if XI2_DEBUG is turned on. That is because it creates the QTouchDevice and calls QWindowSystemInterface::registerTouchDevice, which must be done at startup so we can receive events. Change-Id: I9446d72bc702fbd819bf26bcdc2a3d657180f642 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-08-164-44/+84
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-144-44/+84
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| | * Fix QDialog position shift bug after resize.Balazs Domjan2013-08-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Linux (XCB), resizing a dialog shifts its position. The fix corrigates the geometry of the dialog to the right values. Task-number: QTBUG-32473 Change-Id: I6d38539a3ebc3b95eacc7f13a76f83fc9e4d821c Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * Merge branch 'release' into stableSergio Ahumada2013-08-092-22/+51
| | |\ | | | | | | | | | | | | Change-Id: I5e94c4f01564df633c9925561ebb0b553bd31a2e
| | | * Fix handling of non-latin1 shortcutsGatis Paeglis2013-07-312-22/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables non-latin1 shortcut handling on Qt5/X11. Task-number: QTBUG-32274 Change-Id: Ia084258b956128ffade8eddfbcb18af334d79a59 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * | Fix stuck modifier issue in the non-xcb_xkb code pathGatis Paeglis2013-08-021-19/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since updating the xkb_state throght core events is more tricky (opposed to the xcb-xkb code path) where we have to use xkb_state_update_key, we need to make sure that our local state is in sync with the X server's state. The local state was getting out of sync if key was pressed down in a Qt application and released in other X client (by changing the focus to another window with a mouse, for example). Task-number: QTBUG-32660 Change-Id: I662bf5aad3ab0e8591109994e746d85ff61ad6ef Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * | xcb: mouse wheel does not focus a windowShawn Rutledge2013-07-311-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The window should react to the wheel event (e.g. scroll content) but without becoming focused; this is the X11 convention. Task-number: QTBUG-32517 Change-Id: I7e12425e5a6e1549b7f23dc318612a436c24d14b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * | xcb: Fix minor leaks in XSettings codeUli Schlachter2013-07-251-1/+3
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If some of the X11 requests fail, QXcbXSettings::QXcbXSettings() prints a warning and returns. These error paths all caused memory leaks. Change-Id: Idfecf03dd412c35552c3bbbebdda9c039aeadc13 Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | / XCB: Ignore _NET_WM_PING on the root windowUli Schlachter2013-08-161-0/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With a _NET_WM_PING message, a window manager can check if an application still works or if it froze. The WM sends such a message to the application window and the application sends the message back to the root window. Since change Ia04268b0 / commit d8090022f "Move the X11 system tray code from widgets into XCB-plugin.", Qt selects StructureNotifyMask on the root window. Due to this, we now also receive replies to _NET_WM_PING and treat them like a _NET_WM_PING request. This caused an endless loop as soon as any _NET_WM_PING was seen where Qt would send a _NET_WM_PING to itself and handle it again and again. Fix this by ignoring _NET_WM_PING messages that are sent to the root window. According to EWMH, such messages can only be replies to _NET_WM_PING and GTK does this, too. Task-number: QTBUG-32957 Change-Id: I1b0aa682f99b17d633baacc14b18b3adca7a1aba Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Implement support for global whatsthis on WindowsSimon Hausmann2013-08-131-2/+1
| | | | | | | | | | | | | | Task-Number: QTBUG-32835 Change-Id: Ifee10d815ce0037c96eda574ab9e1af67ff6bd78 Reviewed-by: Andy Shaw <andy.shaw@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>
* | Export getTimestamp to the native interfaceMartin Gräßlin2013-08-072-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | The functionality to get the current x11 timestamp is also needed by applications which need to interact with the X11 directly. With XCB it is not possible to inspect the event queue and by that an application is not able to retrieve the current timestamp using the property change pattern and waiting for the matching event. Change-Id: Ie7ba78ecbe509ed3a902c702266917f65bf5ad07 Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Move the X11 system tray code from widgets into XCB-plugin.Friedemann Kleint2013-07-309-3/+350
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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>
* | XCB: Readd support for -name command line argument.Friedemann Kleint2013-07-252-0/+7
| | | | | | | | | | | | | | | | Task-number: QTBUG-27349 Change-Id: I85390942927cd1c54f76fd7ddc0f3487c7205b57 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-07-246-7/+62
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-236-7/+62
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp Change-Id: I18a9d83fc14f4a9afdb1e40523ec51e3fa1d7754
| | * xcb: Don't use Xlib's XBell() functionUli Schlachter2013-07-221-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XBell() just sends a Bell request to the X11 server. This can be done equally well (and with less ifdefs) through xcb's xcb_bell(). Change-Id: If41d955aa97acfe9e0a8b9fce05c11ebc146ce8e Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * Prevent activation of windows with Qt::WindowDoesNotAcceptFocus.Friedemann Kleint2013-07-221-1/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-32385 Change-Id: I307e2a3e5157b351663940d5d02fc16b3127b5dd Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * XCB: Set WM_CLASS.Friedemann Kleint2013-07-185-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Bump QPA-API-version.Friedemann Kleint2013-07-231-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | Changes f5dbc876378ae58a7bdfe1e9664fc81caca18dfb (Use QUrl in QFileDialog API) and c96a6ab627100452864eb4d8da973300401c1bfa (Pass argc, argv to platform plugin) introduced changes to the plugin API. Task-number: QTBUG-29396 Change-Id: I46ee22d16f045b69f141dc6c982017586efef662 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* | xcb: touchpad supportShawn Rutledge2013-07-223-30/+110
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | added maximumTouchPoints to QTouchDeviceShawn Rutledge2013-07-221-2/+3
| | | | | | | | | | | | | | This was missing information which the driver can provide. Change-Id: I2574745635d6fdf608bc5617999aec46d9312c09 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Pass argc, argv to the platform plugins.Friedemann Kleint2013-07-183-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | 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>
* | Merge branch 'stable' into devSergio Ahumada2013-07-113-2/+38
|\| | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * Resolve modifier mask conflicts on X11Gatis Paeglis2013-07-072-1/+37
| | | | | | | | | | | | | | | | | | | | | | On X11 key codes and modifiers can have many-to-many relationship, i.e. a key can activate several modifiers, and a modifier may be activated by several keys. This patch handles these cases, the logic is borrowed from Qt4. Task-number: QTBUG-31572 Change-Id: Ide4eb890ec723c68afafe0576d8285440a47d7b0 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Fix system tray icon on X11.Friedemann Kleint2013-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | Observe Qt::BypassWindowManagerHint in XCB and use it for the tray. Remove the call to XSync(), which sometimes was causing the window to appear in the wrong place for a short time. Task-number: QTBUG-31762 Change-Id: I7b4fc5e42b8c8bb9d03b1575be99d6d1c727be37 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Key mappings for more remote-control keysAllan Sandfeld Jensen2013-07-051-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | We are missing a few key mappings to have support for remote control keys supported by Android and DirectFB. This patch adds the four color keys Red/Green/Yellow/Blue and ChannelUp and ChannelDown. Change-Id: I4d859c28e0d61c5362f1212ba1e577a47de86ec1 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | xcb XI2: simplify and generalize tablet detectionShawn Rutledge2013-07-053-99/+74
| | | | | | | | | | | | | | | | | | | | 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>
* | 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>
* Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-06-271-2/+2
|\ | | | | | | refs/staging/stable
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-251-2/+2
| |\ | | | | | | | | | Change-Id: I4c0ae2ac1c10d4d50c03625c802d981b7850ed6f
| | * Fix missing focus events for mapped child windowsJørgen Lind2013-06-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Its a bit brutal Task-number: QTBUG-31776 Change-Id: I2d8b530646d1e2b2ba86f0e82d76f928c9a2bb11 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>