summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
Commit message (Collapse)AuthorAgeFilesLines
...
| * Make sure we can build with -no-feature-draganddropJoerg Bornemann2018-05-2910-30/+24
| | | | | | | | | | | | | | | | | | We move QInternalMimeData to a separate file, because this class is used, even if draganddrop is disabled. From now on, include qinternalmimedata_p.h instead of qdnd_p.h for QInternalMimeData. Change-Id: I594e08e2e90d574dc445119091686b4b69e4731b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-241-0/+2
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/corelib/tools/qstring.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/widgets/qmainwindowlayout_p.h Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
| * Fix build without features.cursorTasuku Suzuki2018-05-151-0/+2
| | | | | | | | | | Change-Id: I450bd9f160c64f718c49e87d274c1ccc4a657aca Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-141-15/+25
|\| | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_module_headers.prf tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qwidget/BLACKLIST Change-Id: I2a08952d28d1d0e3d73f521a3d44700ce79ff16c
| * Merge remote-tracking branch 'origin/5.11.0' into 5.11Qt Forward Merge Bot2018-05-091-15/+25
| |\ | | | | | | | | | Change-Id: Id6e2acd5e31c1ac858ddf1d8873a6f10694141de
| | * Also support reset notification on non-nvidiaAllan Sandfeld Jensen2018-04-191-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | In 5.11 robustness was added for nvidia drivers, this patch extends that to other opengl drivers, and fixes the reported format. Change-Id: Ia81934c3bcf13e7300fb4e75674ea63317039870 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Vulkan: share library loading implementationMorten Johan Sørvig2018-05-142-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | The macOS, Windows, and XCB implementations are identical and can be moved to QBasicPlatformVulkanInstance. Change-Id: Id84b27ffd87f86afe3798c4ad2743ba05e6190d3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Vulkan: Share destroySurface() implementationMorten Johan Sørvig2018-05-142-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | The macOS, Windows, and XCB implementations are identical and can be moved to QBasicPlatformVulkanInstance. Change-Id: I1380b2bd03080710084a1458bdce3a362ba5c287 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Move default implementation of update requests to QPlatformWindowTor Arne Vestbø2018-05-072-3/+3
| | | | | | | | | | | | | | | Change-Id: I4cbb8d2023068288e298ab21f5cd8bc258825c77 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | qpa: improve API to support DnDs from other processesGatis Paeglis2018-05-046-22/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... instead of using a hack of directly accessing QGuiApplication members. The current QPA API was bad for two reasons: 1) It expects platform plugin authors to know about internals of Qt Gui, particularly that QGuiApplication uses QGuiApplication::{mouseButtons,keyboardModifiers} to construct QDragMoveEvent and QDropEvent events. Which results in the second reason why this is bad. 2) Platform plugins should not directly access member variables of QGuiApplication, just to make sure that QDragMoveEvent and QDropEvent events contain correct state. Platform plugins should instead use QWindowSystemInterface to communicate with Qt Gui (which is also the solution here). The solution is to extend QWindowSystemInterface::handle{Drag,Drop} to require mouse/keyboard state. We already do this for some of the other methods, so it is nothing extraordinary. This type of interface is also _required_ to support drag-n-drops from other processes. We can't use QGuiApplication::{mouseButtons,keyboardModifiers} when the drag originates from another process, instead we need to query mouse/keyboard state from the system. This patch fixes drag-n-drops from others processes on XCB platform plugin. Task-number: QTBUG-57168 Change-Id: I3f8b0d2f76e9a32ae157622fef801829d629921d Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-031-1/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/elasticnodes/graphwidget.cpp examples/widgets/graphicsview/elasticnodes/node.cpp examples/widgets/graphicsview/elasticnodes/node.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_drawing.mm src/widgets/kernel/qmacgesturerecognizer_p.h Change-Id: I13cf06bac75d48d779d8ee7b5c91bfc976f2a32c
| * | xcb: round down the scale factor for values < 0.8Mathieu Velten2018-05-021-1/+6
| |/ | | | | | | | | | | | | | | | | | | This solves huge UI on some (most ?) HD 13 inches that have a calculated scale factor around 1.75. Task-number: QTBUG-53022 QTBUG-57211 Change-Id: I6cc22d3e47d38cb1d5a0daf5646a936256664e48 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-157-59/+74
|\| | | | | | | Change-Id: I8c353b4c53e90434453c76691eac39a894d23b49
| * xcb: prevent crash with pixmap cursors on XRender-less X serversGatis Paeglis2018-04-143-8/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were using xcb_render_* APIs without checking if the server even supports this extension. Attempting to use an extension which is not present will always result in a crash. This patch adds the required guards and refactors how we detect presence of XRender extension. Also instead of falling back to some odd-looking bitmapped version just leave the current cursor unchanged. That is how we did it in Qt4 AFAICT. Task-number: QTBUG-66935 Change-Id: I4f27f1d65a77563ec34f3e0e94492c9236d7f9a6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * xcb: fix bitmap cursor loading performance regressionGatis Paeglis2018-04-144-45/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... introduced by 422838685c31d9b57133a8711bfd5db92095d96d. Instead of completely droping caching for bitmap cursors we can do the same what is done in libXcursor - have a fixed size cache, with oldest entries eventually being replaced with new bitmaps. This fixes the original issue, where the hash was growing indefinitely until running out of file descriptors and won't have the performance penalty as in 422838685c31d9b57133a8711bfd5db92095d96d. Task-number: QTBUG-66897 Change-Id: I14f80b46f97fd0e2c920e17a31ffbc0441cd9d22 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * xcb: cleanup the code for detecting when to create/destroy SHM segmentGatis Paeglis2018-04-141-6/+8
| | | | | | | | | | | | | | | | | | | | | | - removed the check for "m_segmentSize > 0" as according to the code it will never be <= 0. - wrap the entire logic in connection()->hasShm() { .. } as that is when the logic becomes relevant. This makes the code more readable. Change-Id: I572420df8e29cc46593f8a13c250f8c05c6a9108 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-04-111-0/+2
|\| | | | | | | | | | | | | Conflicts: src/plugins/platforms/ios/quiview.mm Change-Id: I0fd0adeca1590fffddd577873172f6d987a60412
| * glx: Fix loading OpenGL library when libGL.so symlink is missingDmitry Shachnev2018-04-101-0/+2
| | | | | | | | | | | | | | | | Task-number: QTBUG-67537 Change-Id: Ib59bc27582f44b0c6b04efa57c44d877e1685bbb Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-102-56/+52
|\| | | | | | | Change-Id: I0120f804522c0c652e9537b6e9fe08189f071ed2
| * xcb: various coding style cleanups in qxcbbackingstoreGatis Paeglis2018-04-092-37/+33
| | | | | | | | | | | | | | | | | | | | | | - Pass QXcbBackingStoreImage a pointer to QXcbBackingStore. This allow for simpler QXcbBackingStoreImage ctor. - Use member initializers. Change-Id: Ia992390060bb30e1184813cd0d115a8bf0fbc237 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * xcb: rename two classes in qxcbbackingstoreGatis Paeglis2018-04-092-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QXcbShmImage to QXcbBackingStoreImage as it is an image that might or might not have SHM capability. The current name implies that it always uses SHM. QXcbShmGraphicsBuffer to QXcbGraphicsBuffer as it has nothing to do with SHM. Change-Id: I57ced75891e8b10515142769278a7f3f40da91ef Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | xcb: minor cleanups around QT_CONFIG(xcb_xlib)Gatis Paeglis2018-04-093-26/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove unused createVisualInfoForDefaultVisualId() function. This amends dff3c0f14f3c3a7288c456028d5bec23bee5406a. - Inline QXcbConnection::xlib_display(). - Don't nest QT_CONFIG(xcb_native_painting) in QT_CONFIG(xcb_xlib). configure.json already checks for the dependencies, we don't need to do that again in *.h/*.cpp. Change-Id: If39912e67ce9baa31faf091bebe120bac5cf6876 Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-061-1/+7
|\| | | | | | | Change-Id: Ic811cd444e523b904211797112bba6aaec85dddd
| * Make nvidia resets opt-in based on QSurfaceFormat::ResetNotificationDavid Edmundson2018-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | We can't be sure every user will check the return value from makeCurrent and reset appropriately. Even though after a reset a user will be left with the same garbage as before, it's safer than a potential infinite loop. Change-Id: I5b328c654ad2a89c5b8c4399e2eb38150f4f384b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Support graphics reset status for offscreen surfaces in XCB-GLXDavid Edmundson2018-04-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | I originally didn't to match the ANGLE code, however it's important for all surfaces to be able to know to reset if their makeContext fails. This is espcially relevant on some Linux nvidia drivers which has a bug where while(glGetError()) won't ever clear whilst a reset is in progress. Change-Id: Iae3502168cda748c601a9aee1497e40c6d82cd83 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-03-282-8/+58
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_mouse.mm src/testlib/testlib.pro Change-Id: Ia0ce4243418fe6a485b0f290c67bd433b3b04ff2
| * Support GLX_NV_robustness_video_memory_purge in XCB-GLXDavid Edmundson2018-03-222-8/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | Nvidia doesn't handle suspend very well in Linux and textures get corrupted. To handle this Nvidia has a bespoke extension to query when this has happened. This patch checks if graphics have been reset and invalidates the surface. Task-number: QTBUG-56610 Change-Id: I0b97d539ce6cc2b9cfe41c71bf6efd4f68496cd6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Update READMEs for the bundled xcb sources and the xcb pluginAlexander Volkov2018-03-231-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | Mention that the current minimal supported version of libxcb is 1.9.1, amend 1f5d791708d5d256a76872f254251dac66e82cdb. Remove the specific package requirements for the xcb plugin: these lists are unmaintained and besides there are build instructions in wiki: https://wiki.qt.io/Building_Qt_5_from_Git Change-Id: I4d5b0583a1ba8a355ee1649022845f6c8d520e7c Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | xcb: Use XCB instead of Xlib for XInputAlexander Volkov2018-03-229-427/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replace xinput2 feature by xcb-xinput, which doesn't depend on xcb-xlib - Remove xi2PrepareXIGenericDeviceEvent() that was used to fix incompatibilty between XCB and libXi structs - Drop XCB_USE_XINPUT21 and XCB_USE_XINPUT22 defines that were needed with libXi Although xcb-xinput was released in version 1.13 of libxcb, it was quite stable in version 1.12, and the parts that we use did not change between versions, so require system xcb-xinput 1.12. [ChangeLog][X11] The xcb plugin was ported to use libxcb-xinput instead of libXi for XInput2 support. The -xinput2 configure option was replaced by -xcb-xinput. Task-number: QTBUG-39624 Change-Id: I37475b09b2bd7057763345c3f33d8c7751a4e831 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Add xcb-xinput to 3rd party libsAlexander Volkov2018-03-201-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The added xcb-xinput code was produced by build of libxcb 1.13 with xcb-proto 1.13. The following parts were removed from it: - Pointer Barriers API (requires xcb-xfixes 1.9 with xcb-proto 1.9) - SendExtensionEvent API (requires definition of xcb_raw_generic_event_t from libxcb 1.13) [ChangeLog][Third-Party Code] Sources of xcb-xinput 1.13 were bundled and are available via -qt-xcb. Change-Id: I43d2f43bee0ba874d099c9fb858e74b0e3edc970 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-151-35/+83
|\| | | | | | | Change-Id: I8b5a10d897a926078895ae41f48cdbd2474902b8
| * xcb: Prevent shared memory allocation on every window resizeBłażej Szczygieł2018-03-141-35/+83
| | | | | | | | | | | | | | | | | | | | | | Allocate new shared memory only when window size grows or when window size is 2 times smaller than allocated memory size. This improves window resizing performance and also allows to free some memory if window becames much smaller. Change-Id: I3454cd3c6023eede8242d6b29038f4dd6638f9f1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-102-2/+2
|\| | | | | | | Change-Id: Ia2441257c23169f8ca6a3933b2371255e1ba64e6
| * qxcbconnection_xi2.cpp: fix debug check to avoid confusing debug outputDavid Faure2018-03-091-1/+1
| | | | | | | | | | | | | | | | | | The check on line 972 says lcQpaXInputEvents().isDebugEnabled() so that debug output was always showing "from 0,0" due to lastScrollPosition not being set. Change-Id: I345732e36db05108f70474261c47e78333b57d30 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * xcb: Fix FP1616 to int conversionAlexander Volkov2018-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | Divide the whole FP1616 value by 0x10000 instead of dividing the integer part by 0x10000 and the fractional part by 0xFFFF. It also makes fixed1616ToInt() consistent with fixed1616ToReal(), see 7d3f353a5bd573dc0e72f7f55c70212a6b3837fa. Change-Id: Id76025028c926872b002ef0a1ca8a8bdc2de3e1e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-021-1/+3
|\| | | | | | | Change-Id: I42ec9e6aafc203465cbeb88af70c7af26b7df8ed
| * Fix QXcbScreen::format() when rgb-swap is neededAllan Sandfeld Jensen2018-03-011-1/+3
| | | | | | | | | | | | | | | | | | QXcbScreen::format() was producing console warning and returning invalid format if rgb-swap was necessary. Let it match possibly reversed formats since the backing-store will swizzle it anyway. Change-Id: I6a53cb8ceda029e9d708d25ad635832f1163ffe7 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-02-281-7/+7
|\| | | | | | | Change-Id: I1ce43c8a214a869c5c4ac4245bb92c88c6bc6999
| * Silence a GCC 8 warning in qxcbnativeinterfaceVille Voutilainen2018-02-271-7/+7
| | | | | | | | | | | | | | | | qtbase/src/plugins/platforms/xcb/qxcbnativeinterface.cpp:309:65: error: cast between incompatible function types from ‘void (*)(const char*)’ to ‘QPlatformNativeInterface::NativeResourceForIntegrationFunction’ {aka ‘void* (*)()’} [-Werror=cast-function-type] return NativeResourceForIntegrationFunction(setStartupId); Change-Id: I83409b3a6cc67ccb4c9e91e592e6a01bb6ce45ea Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-02-263-692/+438
|\| | | | | | | Change-Id: I5a919ac999c4c5a3ca2024b63a78c094a44a1191
| * xcb: simplify handling of keymap updatesGatis Paeglis2018-02-253-43/+41
| | | | | | | | | | | | | | The old code was somewhat too scattered. Change-Id: Ib0445c66653f757ccac28778f34f4bcb5df49a70 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * xcb: cleanup TODOs for KeyboardLayoutChangeGatis Paeglis2018-02-252-18/+23
| | | | | | | | | | Change-Id: I5d2207fdb21cbabb04460faf73c35275bc76b7b0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * xcb: minor refactoring in QXcbKeyboard::checkForLatinLayout()Gatis Paeglis2018-02-251-6/+6
| | | | | | | | | | | | | | We don't need xkb state APIs to check for keys on first level. Change-Id: I728e6bfe09bce127ad8eae78ecee7cefd620f52e Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * xcb: remove X11 deps from QXcbKeyboard::checkForLatinLayout/lookupLatinKeysym()Gatis Paeglis2018-02-251-4/+4
| | | | | | | | | | | | | | | | | | | | This will allow us to reuse these functions on systems that do not rely on X11, but use libxkbcommon for handling keyboard input. Task-number: QTBUG-65503 Change-Id: I78034238771be96fbb38e8187801fefbee1a5fed Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * xcb: have a proper detection of key events originating from SendEventGatis Paeglis2018-02-252-47/+58
| | | | | | | | | | | | | | | | | | | | | | This is a more correct fix for QTBUG-48795. The original fix was unnecessarily using non-XKB code path for updating state for all incoming key events. This would result in losing some valuable bits from xkb state. Task-number: QTBUG-48795 Change-Id: Ic4fb28b2d834272f1db2cbf5888cafb209707847 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * xcb: use keysym defs from xkbcommon, instead of X11 headersGatis Paeglis2018-02-251-590/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xkbcommon-keysyms.h is generated from X11 header files, so it contains all the same values. Removed all of #ifndef XK_* as those keysyms are present in xkbcommon-keysyms.h (checked the header from 0.4.1, the minimal required version). The same for XF86XK_* defines. This will allow to reuse some of this code on platforms that don't depend on X11, for details see QTBUG-65503. Task-number: QTBUG-65503 Change-Id: I68083e11cea1f29d775a6ed46503a06b04b9a05c Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-02-244-271/+427
|\| | | | | | | Change-Id: Icddf8720dae2cf594e16bcddab4d1cafc9d094c0
| * xcb: minor cleanup in QXcbKeyboard::handleKeyEvent()v5.11.0-beta1Gatis Paeglis2018-02-241-15/+23
| | | | | | | | | | | | | | | | | | | | - Use smart pointer for handling xkb state. - Make it more clear (in the code and the comment) when a latin keysym is used. Change-Id: Iee8106c72177c22b1a8fe875027b1dda82196b36 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * xcb: refactor QXcbKeyboard::keysymToQtKey() and fix bugGatis Paeglis2018-02-243-61/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now also digits from other alphabets e.g ۲ (arabic two) are mapped to Qt::Key_* digit keys. Re-factored logic: - All known dead keys have direct mappings since 1d86e5f84abac6db0b7b1503a6f52c72b272a897. Don't special treat them in "unicode mapping" code path. - Removed the ISO8859-1 legacy logic, which is leftover from Qt4 where keysym to Qt decoding was done from raw data. In Qt5 we always get a utf8 string from xkb_state_key_get_utf8(). Furthermore, ISO8859-1 and utf8 encode ASCII exactly the same way. - Set Qt::KeypadModifier from key input handler methods. This logic does not belong in keysymToQtKey(). Note: KeyTbl[] and keysymToQtKey() have been duplicated in several places in Qt. That stuff will be cleaned up as part of QTBUG-65503. This change will make those cleanups easier. Task-number: QTBUG-58865 Task-number: QTBUG-65503 Change-Id: Iaf10205a26804f7fc03eb8a16a0879f1bd7bf332 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * xcb: re-factor QXcbKeyboard::updateKeymap() to remove various fallbacksGatis Paeglis2018-02-242-176/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3edcd9420e3ad661cad89420e18dbb70e7ad450b added more robust support for keyboard input on XKeyboard-less X servers. The various fallbacks that we had did not work that well in practice. We can remove them now. The xkb_keymap_new_from_names() function relies on reading XKB config files from a file system. Since we don't use this function anymore, we can also simplify xkb context creation (see XKB_CONTEXT_NO_DEFAULT_INCLUDES), as we don't care about DFLT_XKB_CONFIG_ROOT (which we previously set via -xkb-config-root for the bundled libxkbcommon). This patch also changes the code to use smart pointers for managing the global xkb context, keymap and state. [ChangeLog][X11] The -xkb-config-root command line switch has been removed as it it no longer needed when configuring with -qt-xkbcommon-x11. Change-Id: I80eecf83adae90af5cd20df434c1fba0358a12fd Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>