summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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: 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>
* 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>
* 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>
* 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>
* | | Mac/XCB/Windows: Fix initial setting of window icons.Friedemann Kleint2013-06-261-0/+2
|/ / | | | | | | | | | | | | | | | | | | Setting an icon on a QWindow before creating the platform window did not have any effect. Task-number: QTBUG-31961 Change-Id: I8e58a3b239c8bc69af58f765e7826337463d2201 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-201-0/+2
|\| | | | | | | Change-Id: I94bb158562ae6b80a87b40139d7302ea7b9b9aa8
| * Android Mute and FastForward keys mapped wrongAllan Sandfeld Jensen2013-06-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | KEYCODE_MEDIA_FAST_FORWARD is mapped to Qt::Key_Forward, which undoes Back. I believe the best match in Qt would be Qt::Key_AudioForward which is also mapped by XCB from XF86XK_AudioForward /* fast-forward audio track */ KEYCODE_MUTE is mapped to Qt::Key_Volume_Mute, but the mute button is for muting the microphone, the volume mute is called KEYCODE_VOLUME_MUTE. Change-Id: Id0b78c9bde78faef1f5d31019693e6c466941d70 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Make qtbase compile with QT_NO_TEXTCODECTasuku Suzuki2013-06-172-1/+9
| | | | | | | | | | Change-Id: I1614dc08c0dd1950020e415f37c97160431b2336 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Fix for when we don't have XSettingsJørgen Lind2013-06-071-4/+18
|/ | | | | | | | | Task-number: QTBUG-31418 Task-number: QTBUG-31410 Task-number: QTBUG-31446 Change-Id: I3fbed40054f3e0720b50ada0dc4ad0ae4cb0412e Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Move QBasicDrag and QSimpleDrag to QtGui.Samuel Rødal2013-05-302-3/+3
| | | | | | | | | | | | These are useful as default implementations of QPlatformIntegration::drag(), instead of having it return 0 which will lead to crashes in Qt Quick 2 and widgets applications that use drag and drop. Task-number: QTBUG-31288 Change-Id: I70efa139306ced5d879def0f74e3a72d3bcd64f7 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Fixed XCB build with -no-openglSamuel Rødal2013-05-221-1/+3
| | | | | | Task-number: QTBUG-30115 Change-Id: I1651a1cdda2a5370e23fabe631b0742a617631c0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix ambiguity in shortcut matchingGatis Paeglis2013-05-201-10/+13
| | | | | | | | | | | Comparing to the Qt4 implementation, possibleKeys() should skip records where qtKeys are equal. Task-number: QTBUG-31132 Change-Id: I2fb073b4dc7291f909cce616f40f7c2491e7cf26 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* xcb: fallback to gtk cursor themesJørgen Lind2013-05-202-24/+98
| | | | | | | | | When Xcursor LoadCursor fails to find a cursor Task-number: QTBUG-27537 Change-Id: I46086c78c3d5bea3c39187dcc55b4774e58f5749 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Add QXcbConnectionGrabber classJørgen Lind2013-05-203-2/+30
| | | | | | | Inspired by QMutexLocker Change-Id: I66e31091d2a006db3272b627567d95d3e0b1c4f9 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Introduce QXcbXSettingsJørgen Lind2013-05-207-2/+372
| | | | | | | | | | | | | 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>
* Restore cursor before sending QDropEventGatis Paeglis2013-05-131-1/+0
| | | | | | | | | When users created a modal window in a dropEvent(QDropEvent* event), the cursor was not restored to its original shape until after the modal window had been dismissed. Change-Id: Id4723e3cb66b36a3ca18ff097a3993563816d9e1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Don't send QMouseEvent events from the QXcbDrag::timerEvent()Gatis Paeglis2013-05-132-21/+1
| | | | | | | | | | | | | | | | | | This is not needed. The DnD initiated scrolling is done by installing an eventFilter which forwards all MouseMove events to the QGuiApplicationPrivate::processDrag which creates and forwards all the necessary QDrag* events. QAbstractScrollArea has its own logic in the timerEvent() to make the view scroll when the pointer is standing still on the edge and the drag process is still ongoing. With the current implementation, widgets (during the DnD) were receiving DragMove events even when the pointer was standing still outside auto scroll areas. Task-number: QTBUG-28171 Change-Id: I355d88f3eab0ad39f916f84d66f5d0af7c0ff93e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.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>
* Make access to xkbcommon_workaround.h more genericGatis Paeglis2013-05-072-1/+25
| | | | | | | | | | It makes more sense to keep this workaround header together with the other libxkbcommon files for a better access point since it's used by several *.pro files. Change-Id: I63d4eb58f6e7f3852834e41c4b6e058a2c962233 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Use X11 core protocol when xkb not availableGatis Paeglis2013-05-074-20/+236
| | | | | | | | | | | | | | | | | | | | 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>
* Added possibleKeys(QKeyEvent *) to QXcbIntegrationGatis Paeglis2013-05-074-0/+90
| | | | | | | | | | | | | | 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>
* Utilize libxkbcommon API for the keyboard backend on X11Gatis Paeglis2013-05-075-444/+484
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add xcb-xkb to 3rd party libsGatis Paeglis2013-05-072-1/+3
| | | | | | | | | | | | | | | | | | 1) -qt-xcb a) Use xkb from the 3rd party libs. As it is done for the other xcb dependencies when qt configure with -qt-xcb. 2) -system-xcb (default) a) If xkb found then use xkb from the system. (Currenly xkb is not enabled by default when configuring libxcb library). b) If xkb can't be found on the system then keyboard state will be updated from X11 core events. Change-Id: I7c3dbce6daa2cec52067cd5af80f19040233a0db Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Add libxkbcommon to 3rd party libsGatis Paeglis2013-05-071-1/+8
| | | | | | | | | | This library is required by the XCB platform plugin. As we depend on very recent version of this library and it might not be available in base repositories of distributions, users can use -qt-xkbcommom switch to build Qt with the bundled version. Change-Id: I0ed2a5cc2f1df98b0e7cc926cabfa69818674e08 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* xcb: don't do mouse synthesis from touch unless we find a reasonShawn Rutledge2013-05-075-1/+43
| | | | | | | | | | | | 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>
* Fix possible segfault when setting up window's transient parentShawn Rutledge2013-04-301-1/+1
| | | | | | | | tp->handle() can be null. Task-number: QTBUG-30919 Change-Id: Ie18b70d4cc6916d2e821a71d00d1bf99956b0632 Reviewed-by: Liang Qi <liang.qi@digia.com>
* Add QXcbWindowEventListenerJørgen Lind2013-04-266-36/+90
| | | | | | | | 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-264-5/+55
| | | | | | | | | 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>
* Respond to the _NET_WM_CONTEXT_HELP WM_PROTOCOLS messageJan Kundrát2013-04-241-0/+5
| | | | | | | | | | | | | | | | This change restores a proper function of the "(?)" button in the window decorations which is used as a clue for the user to check what a particular widget is supposed to do. The change is only implemented for QtWidgets because the underlying QWhatsThis is inherently widget-specific -- which is why it sends an event to QGuiApplication, but only processes it in the QtWidget-specific QApplication. Thanks to Alberto Mardegan and Gunnar Sletta for their feedback on this patch. Change-Id: Ibb912e3960f1e9aec54c5ed77ade1c6744d6ca23 Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Implement startup notification spec again.David Faure2013-04-238-1/+85
| | | | | | | | | | | | | | | | | 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>
* qxcb: output clear error message when running on an 8-bit displayDavid Faure2013-04-231-1/+3
| | | | | | | | | | | | | | | Currently, running a Qt5 widget app in Xvfb (with its default setup, 8 bit color depth) outputs a stream of error messages, starting with: QWidget::paintEngine: QWidget::paintEngine: Should no longer be called Better output clearly the reason why we end up in that method: painting on a null image, due to the unsupported image format. Maybe this should even be a qFatal... Change-Id: Iae8f1b057518c146bf8e034999c1b5e67ce6ef5e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Read correct font hinting config on Gnome/UnityEskil Abrahamsen Blomfeldt2013-04-224-8/+49
| | | | | | | | | | | | | Fixes regression against Qt 4. This tries to recreate the logic from 5c46d9a4c85abbcc0b5db2bbbafded3efd784cd9 in Qt 4, where we on Gnome would override the default hint style specified in FontConfig with Xft.hintstyle settings. This is the configuration used for changing the hint style in the Gnome Tweak Tool. Task-number: QTBUG-29582 Change-Id: I6b9fe2c8ff55ff080d034e5a53fc8cbb49f7651f Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Implement QApplication::beep().Friedemann Kleint2013-04-192-0/+17
| | | | | | | | | | Invoke slot "beep" on QPlatformNativeInterface. Implement for Windows and X11. Task-number: QTBUG-30416 Change-Id: I2be651165b899e5147818a012001d354827bb090 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Implement alertion state for windows.Friedemann Kleint2013-04-192-1/+18
| | | | | | | | | | | | | | Add QWindow::alert() and QPlatformWindow::setAlertState(). Add logic to clear alertion state when the window becomes active. The platform plugins then only need to implement a setter and a cheap getter and need not handle activation. Prototypically implement X11 and Windows. Task-number: QTBUG-30416 Change-Id: Ia70c4722d812462a21f4034b7d52735c9f2bc49c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Merge remote-tracking branch 'gerrit/release' into stableSamuel Rødal2013-03-211-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/features/qt_module_headers.prf mkspecs/features/qt_tool.prf src/angle/angle.pro src/tools/bootstrap/bootstrap.pro tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: Ide5759fe419a50f1c944211a48f7c66f662684e0
| * Fixed crash when VNCing and trying to use non-present XFixes extension.Mitch Curtis2013-03-151-1/+1
| | | | | | | | | | | | Task-number: QTBUG-29978 Change-Id: I1a6759bafaac7a1d2b598412f0d32077a42192a4 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Merge branch 'dev' into stableOswald Buddenhagen2013-03-2010-84/+455
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This starts Qt 5.1 release cycle Conflicts: src/gui/text/qfontdatabase.cpp src/gui/text/qharfbuzz_copy_p.h src/widgets/kernel/qapplication.cpp src/widgets/kernel/qcoreapplication.cpp Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b