summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
Commit message (Collapse)AuthorAgeFilesLines
...
* | QTesselator: disable for-loop analysis on ClangShawn Rutledge2017-06-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | Caught by Clang 4: error: variable 'k' is incremented both in the loop header and in the loop body [-Werror,-Wfor-loop-analysis] But we don't want to change behavior unless we can prove that it's wrong or that there's a way to refactor this without changing it. Change-Id: Iecee112b0cd96bec8d975430a74ca548ee2f470f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | XCB platform plugin: add missing includeMarcel Krems2017-06-021-0/+1
| | | | | | | | | | | | | | | | | | 89870a35bde2f67f9c371ba145e90b86d3e2dd1b introduced an usage of std::free without including cstdlib. Change-Id: I9b7ae1caf90bf22aae99cc0407347350c83181a2 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | xcb: don't use C-style cast in qxcbnativepainting.cppGatis Paeglis2017-06-021-1/+1
| | | | | | | | | | Change-Id: Ifb61ca142a77ed89686a54e0827c136613a36e52 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | xcb: remove CREATE_VISUALINFO_FROM_DEFAULT_VISUALID macroGatis Paeglis2017-06-021-1/+0
| | | | | | | | | | | | | | | | | | It was added by d605883 and become unused after 5f39a0e. The patch that added this macro used it only in one place, which rarely is a good reason for introducing a macro. Change-Id: If7065956fc79daf9b2d535527beaa42dbe0243a2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | xcb: remove duplicate QXcbConnection::supportsThreadedRendering()Gatis Paeglis2017-06-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | It is unused and it duplicates QXcbConnection::threadedEventHandling(): bool supportsThreadedRendering() const { return m_reader->isRunning(); } bool threadedEventHandling() const { return m_reader->isRunning(); } "threadedEventHandling" is more appropriate name by looking at the body of the function. Change-Id: I99733e9c1ddb3ff75444d61d28eca54dcd6b0418 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | xcb: rename QXcbConnection::{setButton,buttons,m_buttons}Gatis Paeglis2017-05-163-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | ... to {setButtonState,buttonState,m_buttonState}. This is more consistent with the naming from XCB events: xcb_button_press_event_t->state xcb_button_release_event_t->state xcb_motion_notify_event_t->state Change-Id: I51ebb858defbdfee4a2009922178f0e58658e6b6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-05-071-6/+5
|\| | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkreply.cpp tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
| * QXcbConnection::xi2ReportTabletEvent: use fixed1616ToRealShawn Rutledge2017-04-261-5/+3
| | | | | | | | | | | | | | | | | | This should not change the result since fixed1616ToReal also divides by 65536. It's just to make it consistent with the other places that we use fixed1616ToReal. Change-Id: I96b3a07d1cbc98d7bdbe7a3b6035b196e34a5abc Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * xcb: include keyboard modifiers with every touch eventShawn Rutledge2017-04-251-1/+2
| | | | | | | | | | | | Task-number: QTBUG-60389 Change-Id: I9bf77dffc39b82993bc66c7c7c26e3fa9778534e Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | xcb: Decode EDID blobPier Luigi Fiorini2017-05-043-1/+74
| | | | | | | | | | | | | | | | | | | | | | | | Retrieve and parse EDID blob. Return screen product information from EDID. [ChangeLog][Platform Specific Changes][Linux/XCB] Add screen product information from EDID. Change-Id: Ic54429cdc90c41342c37511bcaebce95c175f517 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Introducing AA_CompressTabletEventsGabriel de Dietrich2017-05-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tablet events compression has been missing since commit 60cd1c67759642018ef93cc45a90714729100d9d in 5.6.1, and there's no way to bring the old behavior back. Since tablet events are not taken into account by AA_CompressHighFrequencyEvents on purpose, we introduce this new flag. This new flag is conditional to AA_CompressHighFrequencyEvents being set in order for it to be effective. [ChangeLog][QtCore][Tablet support] If the application attribute AA_CompressTabletEvents is set in addition to AA_CompressHighFrequencyEvents, even the QTabletEvents will be compressed (only on the X11 platform so far). AA_CompressHighFrequencyEvents does not enable compression of tablet events by itself, because paint applications typically need to process all possible tablet events in order to draw the smoothest curves. Change-Id: Ie7434ab4f9a4c64f2626c75e661cfd0d6cd22896 Task-number: QTBUG-44964 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Wayne Arnold <wayne.arnold@autodesk.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Fix resource leakJesus Fernandez2017-04-271-0/+1
| | | | | | | | | | | | | | | | | | CID 178811 (#1 of 1): Resource leak (RESOURCE_LEAK) 25. leaked_storage: Variable dptr going out of scope leaks the storage it points to. Change-Id: I3354fe46cfb08701f387f65aaaa5c4f235079501 Coverity-Id: 178811 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | QPixmap/X11: fix compilation with C++17Marc Mutz2017-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | C++11 deprecated 'register' as a storage specifier, and C++17 removes it. Fixes GCC 7.0 warning-turned-error: nativepainting/qpixmap_x11.cpp:2013:25: error: ISO C++1z does not allow ‘register’ storage class specifier [-Werror=register] Amends 07942adb77f60738a6043665673d51fc7991233b. Change-Id: Ideb674d903e5e6eb5ae92cfc3979ff59b243520c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | xcb: Add experimental legacy support for native X11 paintingLouai Al-Khanji2017-04-2120-2/+8476
| | | | | | | | | | | | | | | | | | | | This commit revives the old native QPixmap and QPaintEngine implementations that were present in Qt4. The backing store supports regular raster windows in this commit. Support for render-to-texture widgets and OpenGL compositing will be added in a follow-up commit. Change-Id: I80a9c4f0c42a6f68f571dfee930d95000d5dd950 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | xcb: remove x11FilterEvent() code pathGatis Paeglis2017-04-071-34/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a legacy code that was there to support IM plugins using the Qt4's QInputContext::x11FilterEvent. Updating IM plugins to the new API is a trivial task, external plugins have had enough time to switch to the new API QInputContext::filterEvent(). The 'fcitx' plugin did the required changes in Oct 2014. AFAIK this was the only remaining plugin that still used x11FilterEvent. Change-Id: I7702bcd7017d2d24a1ed07fdebac8b61ca178161 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/devLiang Qi2017-04-075-23/+19
|\ \
| * | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-075-23/+19
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/linux-icc/qmake.conf mkspecs/macx-icc/qmake.conf mkspecs/win32-icc/qmake.conf src/gui/painting/qgrayraster.c Change-Id: Ib08c45ea3215be05f986ecb3e1f4b37d209aa775
| | * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-064-20/+12
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp src/platformsupport/fontdatabases/freetype/qfreetypefontdatabase.cpp src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp src/widgets/widgets/qtabbar.cpp Change-Id: Iaa9daee5f7a6490d56257a3824730a35751ceb05
| | | * xcb: fix build when xlib is not presentGatis Paeglis2017-04-031-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove Xutil.h include from qxcbmime.cpp as it does not use any Xlib APIs. Using API from Xutil.h requires Xlib as noted in Xutil.h: /* You must include <X11/Xlib.h> before including this file */ Everywhere else we do check for presence of Xlib, before including Xutil.h And remove some useless #undef(s) Task-number: QTBUG-39665 Change-Id: Ibfd2341338fe7e902b47eae2df6b9dafe4ab962d Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | | * xcb: prevent dangling pointer when window focus changesGatis Paeglis2017-04-033-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the current implementation, the QXcbConnection::m_focusWindow was holding a dangling pointer during the focus transition from a dying modal window to other modal window. 1) QXcbConnection::m_focusWindow holds a pointer to A; 2) A is closed; 3) relayFocusToModalWindow B; => m_focusWindow now points to a dead window. 4) We get a reply back from WM in a respone to relayFocusToModalWindow (_NET_ACTIVE_WINDOW) => m_focusWindow now points to a valid window. The fix is to update m_focusWindow to nullptr, when the current focus window was destroyed and the new focus window has not been set yet by WM. This patch actually solves a more general case - whenever we get a focus-out event, we should set m_focusWindow to nullptr. It is ok for none of the windows to be in-focus while focus transition is happening. The focusInPeeker will make sure to "optimize out" (when possible) this no-window-in-focus state, and GUI won't be bothered by this extra event. This is how things were working before relayFocusToModalWindow was introduced. Having a focus-relay mechanism in-between is ok, but it should not have changed the original behavior. Task-number: QTBUG-48391 Task-number: QTBUG-55197 Change-Id: I6fdda9de73f999dad84000059ce4b89c0d1a964c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * | Fix warning for -no-feature-draganddrop -no-feature-clipboardStephan Binner2017-04-041-0/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: I974ac692f59622fbb5cf7c6bd60954cf306dabe7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * | Fix warning for -no-feature-textcodecStephan Binner2017-04-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7775c8611a532db96f9843c311463a69c2e9ef82 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * | xcb: Get rid of qCInfo in the GLX backendLaszlo Agocs2017-04-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qCInfo must never be used. For qt.* logging categories Debug is disabled while everything else is enabled by default. This means that doing qCInfo is equivalent to putting a qDebug which is not acceptable. Amends 3e0355014edda23d94605c77dd8c1582b91f9c18 Change-Id: I428e620f12afa324cf6af8dbe3912a55189a38a9 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | | xcb_egl: fix clang error due to m_connection now being unusedDavid Faure2017-04-072-6/+1
|/ / / | | | | | | | | | | | | | | | Change-Id: I00846d26013d31856f049659069852d749d54b8e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-043-4/+4
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h src/plugins/platforms/xcb/qxcbwindow.cpp Change-Id: Ic747c3c50e68c005b425e7a1ec2a90965527c8bd
| * | Prefer rvalue versions of toLatin() and toUtf8()Anton Kudryavtsev2017-03-302-3/+3
| | | | | | | | | | | | | | | | | | | | | ... to re-use existing buffers. Change-Id: I7c42529b8cd4400520a59e658ab76f4f8e965cd4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Prefer rvalue version of toLocal8Bit()Anton Kudryavtsev2017-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | ... to re-use existing buffers. Change-Id: I5907a2e29d7f7dac04df5bf50769b47131e175d8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-281-11/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro tests/auto/corelib/tools/qchar/tst_qchar.cpp tests/auto/other/qaccessibility/accessiblewidgets.h Change-Id: I426696c40ab57d14dc295b8103152cede79f244c
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-211-11/+9
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/eglfs/eglfs-plugin.pro Change-Id: Id76cdbb41b7758572a3b8ea4dcb40d49bac968db
| | * xcb: cleanup QXcbWindow::relayFocusToModalWindow()Gatis Paeglis2017-03-141-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | - recursion is not needed for walking up the parent chain; - use camel-case, modal_window -> modalWindow; Change-Id: I4b7697f2388fd16f11be67ba475bd63ad249d89e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | xcb: Fix embedded Vulkan windowsLaszlo Agocs2017-03-222-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Widget windows choose a visual via the GLX or EGL path. Vulkan windows use the default, simple visual chooser. When having a parent, the different visuals can cause a BadMatch. Avoid this by taking the parent's visual. This way the hellovulkanwidget example is now functional on xcb as well (tested on Jetson TX1 with L4T 24.2). While we are at it, stop forcing RGB888 in the format, unless nothing was set. Change-Id: I39ab87e3219c04d4f547325d13d4873d70564411 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-2010-19/+53
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfilesystemengine_win.cpp src/gui/text/qdistancefield.cpp src/plugins/platforms/xcb/qxcbconnection.h Change-Id: I1be4a6f440ccb7599991159e3cb9de60990e4b1e
| * | warn of blacklisted GLX OpenGL renderers and vendorsJeremy Katz2017-03-161-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | Notify users when multithreaded OpenGL is disabled due to the renderer or vendor blacklist. Change-Id: I16a80568afe87b227575102ca839f18050613e90 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | xcb: send keyboard modifiers with every QTabletEventShawn Rutledge2017-03-141-3/+4
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-59415 Change-Id: If64a6513131fd85189e3621cb2a105e80e919ecf Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-139-16/+33
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| | * Use QT_CONFIG(library) instead of QT_NO_LIBRARYUlf Hermann2017-03-064-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * xcb: fix misuse of xcb_send_eventGatis Paeglis2017-03-014-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following Valgrind warning: "Syscall param writev(vector[...]) points to uninitialised byte(s) Uninitialised value was created by a stack allocation" The xcb_send_event() requires all events to have 32 bytes. It calls memcpy() on the passed in event. If the passed in event is less than 32 bytes, memcpy() reaches into unrelated memory. And as it turns out, this behavior is actually described in the xcb_send_event function's documentation. This patch adds a macro that declares an event for safe usage with xcb_send_event. Change-Id: Ifcaab5e9a3b52b7f64ac930b423e0c7798bbfedb Done-with: Uli Schlachter Task-number: QTBUG-56518 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * streamline libdl detection and linkingOswald Buddenhagen2017-02-272-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of having a library and a test, use a library with two sources, the first being empty (i.e., just libc). this allows us doing away with the "libdl" feature, and using just the "dlopen" one. subsequently, replace all LIBS+=$$QMAKE_LIBS_DYNLOAD with QMAKE_USE+=libdl. the definitions of QMAKE_LIBS_DYNLOAD remain in the qmakespecs for backwards compat only. n.b.: the only specs where it is not empty or "-ldl" (i.e., what we support now) are the hpux ones, where the library is called 'dld'. technically, the "library" feature should depend on '!unix || dlopen', but that's for a later patch. Change-Id: Ib8546affc4b7bc757f1a76729573ddd00e152176 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Basic Vulkan enablersLaszlo Agocs2017-03-179-5/+438
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Android, Windows and xcb. Verified on Win10 with NVIDIA, Win10 with AMD, Android with Tegra K1, Android aarch64 with Tegra X1, and Linux aarch64 with Tegra X1 (Jetson TX1, L4T). Introduce QPA-based Vulkan library loader, core function resolver, and instance creation support. In addition to creating a new VkInstance, adopting an existing one from an external engine is supported as well. The WSI specifics are hidden in the platform plugins. Vulkan-capable windows use the new surface type VulkanSurface and are associated with a QVulkanInstance. On Windows VULKAN_SDK is picked up automatically so finding vulkan.h needs no additional manual steps once the LunarG SDK is installed. [ChangeLog][QtGui] Added support for rendering to QWindow via the Vulkan graphics API. Task-number: QTBUG-55981 Change-Id: I50fa92d313fa440e0cc73939c6d7510ca317fbc9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Make QWindow's windowState a QFlags of the WindowStateOlivier Goffart2017-03-162-76/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reflects QWidget API, and restores some behavior from Qt4. Some WM can have several state at the same time. On Plasma for example, when a window is both maximized and minimized, the "maximized" checkbox is checked from the taskbar entry. The API of QPlatformWindow was changed to take a QFlag and the platform plugins were adapted. - On XCB: Always send the full state to the WM. And read the full state. - On Windows: The code was originally written with '&' in Qt4, and was changed to == when porting. Some adaptation had to be made so the states would be preserved. - On macOS: Only a single state can be set and is reported back for now, with the possibly to expand this in the future. - Other platforms: Just do as before with the effective state. Task-number: QTBUG-57882 Task-number: QTBUG-52616 Task-number: QTBUG-52555 Change-Id: I7a1f7cac64236bbd4c591f796374315639233dad Reviewed-by: Gunnar Sletta <gunnar@crimson.no> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-141-4/+20
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/widgets/qpushbutton.cpp Change-Id: I615de00e6e64540c50f658d4d8ab3e002d701a81
| * | xcb: stringify enums for tablet qt.qpa.input.events qCDebugShawn Rutledge2017-03-031-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | It's a bit easier to read, not having to look up TabletDevice and PointerType enum values manually. Change-Id: I53353be4dcea3e2cb875f04250502ffe802fc971 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * | Make "finger touch" not be a tabletAlbert Astals Cid2017-03-031-0/+2
| | | | | | | | | | | | | | | | | | | | | Otherwise QTouchDevices::devices() doesn't return the touchscreen on my Thinkpad Yoga 460 Change-Id: Ibb829df95f92152a77c512e4325522825901074e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Remove QPlatformDrag::platformDropDataAlbert Astals Cid2017-03-132-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Its only uses were: * Call it to just store it in QDragManager::QDragManager * qnsview.mm calls it but since it knows it's a QCocoaDrag it can just call a function of that class directly * qxcbdrag.cpp calls it but since it basically was calling itself can just use the class member directly Change-Id: Ic7797c877d77f944a1212a7ea01173393bf903fe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | xcb: remove code and macros related to Q_XCB_DEBUGGatis Paeglis2017-03-1011-384/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... early spring-cleaning, leaving one block of virtual root debug code that was inappropriately conditioned on Q_XCB_DEBUG; it now gets its own define. Removed Q_XCB_CALL: 1) I don't know anyone who actually uses it. 2) Enabling this feature (via Q_XCB_DEBUG) fails to build (and has been like that for about 1 year). 3) There are better ways to debug X11 client message exchange (see xtrace for example). 4) Using Q_XCB_CALL is a very fragile approach. Grep for example for xcb_change_property and you will see that half of the calls are not wrapped with the Q_XCB_CALL macro. This patch also removes the Q_XCB_NOOP macro. It's unclear what its purpose was. There was a TODO comment in qxcbeglcontext.h suggesting removal of this macro as well. Its evaluation of its parameter, even without Q_XCB_DEBUG, had no side-effects, so its removal should be harmless. Change-Id: I9fa48af454061d8b38f69f308131647cd18f85f4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | xcb: Optimize QXcb{Screen,VirtualDesktop} for multi-monitor setupAlexander Volkov2017-03-022-241/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move non-monitor-specific members of QXcbScreen to QXcbVirtualDesktop: they relate to an X screen rather than to a monitor. It allows to save some memory and X server callings that were previously made for each monitor. Change-Id: I079cdec5f27ca93a2aade00c3040936a0e50b494 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-021-6/+3
|\| | | | | | | | | | | Change-Id: I84097f8e7b3b2128028bd7693c913d6968b82bfe
| * | xcb: correct conversion of AbsX/AbsY to tablet width and heightShawn Rutledge2017-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This was a mistake in cb37ab82982569ef316d4948e0f13a9bfa6b3f55 Change-Id: I5897ceb34ab4aa1655efd20697d0e761cf7796b1 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
| * | handle TabletMove events during stylus hoverShawn Rutledge2017-02-231-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reason for this is to get feedback about the stylus orientation (angles and rotation) before the user presses it. For example an application might provide an image of the brush which rotates along with the stylus. As with mouse events, applications can distinguish hovering by the fact that no buttons are pressed. On the xcb platform we need to stop blocking the hover events, and in QWidgetWindow we need to send the event to the widget being hovered, while keeping the existing "grab" behavior: after pressing the stylus (or any button on the stylus or on the tablet), keep sending the events to the same widget until release. Task-number: QTBUG-26116 Change-Id: Iaed8b3b94961290dbb29b5fd2ea892fed7221685 Reviewed-by: Dmitry Kazakov <dimula73@gmail.com> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-02-283-8/+26
|\| | | | | | | | | | | Change-Id: I7d84cfed0b2a122d334b8a920e6e4f18472d2f11