summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
Commit message (Collapse)AuthorAgeFilesLines
* xcb: check for nullptr when reading AT_SPI_BUS propertyv5.12.2Gatis Paeglis2019-03-061-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | We always have to check the return value of xcb_get_property(), but this code did not do it. These xcb functions do not check for validity of the pointer, so we have to make sure that we pass-in something valid: void * xcb_get_property_value (const xcb_get_property_reply_t *R) { return (void *) (R + 1); } int xcb_get_property_value_length (const xcb_get_property_reply_t *R) { return (R->value_len * (R->format / 8)); } Fixes: QTBUG-74067 Change-Id: Iabbc81e6079d96c7314d16dd78783de07f9ad629 Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* xcb: lock-free event processingGatis Paeglis2018-10-141-5/+5
| | | | | | | | | | | | | | | | | For details how this works refer to the documentation in the patch. The follow-up patches will switch to calling processXcbEvents() on every event loop iteration. With the existing code that would mean frequent locking of shared data (event queue). Acquiring a lock is fast, but lock contention isn't. To avoid potential problems, reimplement xcb event processing to be lock-free. Besides theoretical performance benefits, this definitally improves code readability in qxcbconnection.cpp. Thanks to Mikhail Svetkin for questioning the design of the existing code. Done-with: Mikhail Svetkin <mikhail.svetkin@qt.io> Change-Id: I935f2b6ca802580f5c80205aef7b2f9afc172d26 Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* xcb: avoid unnecessary InternAtom requestsGatis Paeglis2018-08-171-1/+1
| | | | | | | | | | | | | QXcbConnection::internAtom() creates the atom if it does not exist. The lifetime of an atom is not tied to the interning client. Atoms remain defined until server reset (lost connection, restart). So create the atom once via QXcbConnection::initializeAllAtoms(), and later fetch the atom value from local array, instead of repeating InternAtom requests. Change-Id: I3cae21895febad6e5daf8c32e72612202baaad64 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* xcb: cleanup QXcbConnection::handleXcbEvent()Gatis Paeglis2018-08-161-2/+1
| | | | | | | | | | | | | | | - the usage of 'handled' variable was a mess. - remove "generic" from API names. The naming was probably influenced too much from underlying C API (xcb_generic_event_t): - handleGenericEvent() -> handleNativeEvent() to be consistent with QWindow::nativeEvent(). - dropped unnecessary 'long *result' from signature. It is useful only on MS Windows. - genericEventFilterType() -> nativeEventType(), it *is* an event type, not a filter type. - XCB_CLIENT_MESSAGE was not passed to QWindow::nativeEvent(), which is done via HANDLE_PLATFORM_WINDOW_EVENT. - minor: added some 'auto's where it makes sense and improved some variable names. Change-Id: Id1c9896054e2dbd9a79bacd88394149c8cf2cdea Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* xcb: Remove unused QXcbNativeInterface::locateSystemTray()Alexander Volkov2018-07-101-19/+0
| | | | | | | It was forgotten to be removed in 8f9a72c39df46e94b38dd804b7cdffaed9f340b9. Change-Id: I028bea448a2c99cdbdfa0db07de2b1fcd50c93b2 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* QSystemTrayIcon/X11: Move platform-specific calls to the xcb pluginAlexander Volkov2018-07-101-38/+0
| | | | | | | | | | | | | | | | | | | | | - Detect the tray icon window in the platform plugin by the object name. This way we don't need QXcbWindowFunctions::requestSystemTrayWindowDockIdentifier(). - Get rid of unused calls QXcbIntegrationFunctions::xEmbedSystemTrayVisualHasAlphaChannel() and QXcbWindowFunctions::setParentRelativeBackPixmap(). - Mark the tray icon window as embedded to be able to get the correct result from QWindow::mapToGlobal(). It allows to drop QXcbWindowFunctions::systemTrayWindowGlobalGeometry(). This change allows to remove the intermediate level between the QSystemTrayIconSys widget and the xcb plugin. The code looks clearer. Change-Id: I7d067131287a6dec162b36f0bddc8cb518aaa38c Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* 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>
* XCB: Implement native window dump for diaglibFriedemann Kleint2018-01-241-0/+56
| | | | | | | | | Extract a helper function to determine the window title from QXcbConnection and add an invokable function to the native interface that dumps the window tree similar to existing functionality on Windows. Change-Id: I5544d69ea2b801eb16d3b5b8d64021b3e567b0d8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-27/+27
| | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* xcb: add support for peeking into the XCB event queueGatis Paeglis2017-08-111-1/+30
| | | | | | | | This will be used by the Qt X11 Extras module. Task-number: QTBUG-50358 Change-Id: Ie095cd211c393ea6d78660b4d53cac28b435a3b2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-041-8/+4
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
| * xcb: Use QT_CONFIG macro to check for xcb-xlibAlexander Volkov2017-06-281-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and remove the XCB_USE_XLIB define. This patch also removes the unnecessary checks for xcb-xlib in: - qxcbglxintegration.cpp as this files is build _only_ when xcb-xlib is present. From gl_integrations.pro: qtConfig(xcb-xlib):qtConfig(opengl):!qtConfig(opengles2) { SUBDIRS += xcb_glx } This also would have been the right place where to define XCB_USE_XLIB, instead of unconditional line in xcb_glx.pro: DEFINES += XCB_USE_GLX XCB_USE_XLIB - qxcbnativeinterface.cpp as this cpp file does not use any Xlib APIs directly, there is no need to include Xlib.h. Change-Id: I531b5f1e79606fcfd1c63810cf51b7d5e9dc58a7 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Basic Vulkan enablersLaszlo Agocs2017-03-171-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | xcb: Wrap xcb callings in macrosAlexander Volkov2017-02-231-27/+10
|/ | | | | | | | | | | | | | | | | ... to improve readability and reliability. This change introduces macros Q_XCB_REPLY and Q_XCB_REPLY_UNCHECKED that allow to replace couples of xcb cookie/reply callings by a single "calling" of a macro. The macros wrap the reply in std::unique_ptr thus preventing the need to free it manually. The following C++11 features are used: - variadic macros - std::unique_ptr - auto type deduction Change-Id: Icf9b93353404a39bf5f4a4562b9234db18cac696 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* XCB: Use member initializationFriedemann Kleint2017-01-271-2/+1
| | | | | | | Shorten or remove constructors accordingly. Change-Id: I9c8bcf512c922c3c72be8a965d9557589bc9874f Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* remove stray dbus/-menu dependency from xcb pluginOswald Buddenhagen2016-10-041-4/+0
| | | | | | | amends 26a05fc09 (which in turn was a cleanup of 38abd6537). Change-Id: I6159a3cfe468db048faf1c396143dd3869f7e72b Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* xcb: Remove unused NoFontHinting hintAlexander Volkov2016-09-121-4/+0
| | | | | | | | It is unused since 0f7bc885aa7ae8cc3c448cc751aba4eba8c1c8b8 (Turn off font hinting when active highdpi scaling). Change-Id: I901407bedf24ae301acbe6afa94bc0a4cadb0620 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-221-0/+3
|\ | | | | | | Change-Id: I4f4ab05b2de67cd4b1d29b294b96a8c9ffb964b2
| * Fix QWidget::setWindowRole()Alexander Volkov2016-08-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | Introduce QXcbWindowFunctions::setWmWindowRole() and call it either from the implementation of QWidget::setWindowRole() or after the creation of the corresponding QWidgetWindow. Change-Id: I143450f4673dd707bb491c1d0f0e8b61d564283d Task-number: QTBUG-45484 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Ivan Čukić <ivan.cukic@kde.org>
* | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-03-131-1/+6
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-111-1/+6
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define and undef in src/corelib/tools/qsimd_p.h. This change is also squashed with "Fall back to c++11 standard compiler flag for host builds" which is done by Peter Seiderer. Conflicts: mkspecs/features/default_post.prf src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch src/3rdparty/sqlite/sqlite3.c src/corelib/tools/qsimd_p.h src/gui/kernel/qevent.cpp src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface_p.h src/plugins/bearer/blackberry/blackberry.pro src/plugins/platforms/cocoa/qcocoasystemsettings.mm src/plugins/platformthemes/gtk2/gtk2.pro src/plugins/styles/bb10style/bb10style.pro src/sql/drivers/sqlite2/qsql_sqlite2.cpp tools/configure/configureapp.cpp Task-number: QTBUG-51644 Done-with: Peter Seiderer <ps.report@gmx.net> Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
| | * Expose the number of X screen through the QXcbScreenFunctionsAlexander Volkov2016-03-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | X screen corresponds to Qt virtual desktop, and RandR output corresponds to QScreen. There can be more than one X screen, so we need a way to get the number of X screen for QScreen, in particular for the right implementation of some methods in QX11Info. Change-Id: Ib5e38703bf11ae08bb283f26a7b7b15f1a5e8671 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| | * xcb: resourceType names must have only small lettersBłażej Szczygieł2016-03-041-1/+1
| | | | | | | | | | | | | | | Change-Id: I563ae26c9e7e6111399fd0b9af7bfb3ff750b34a Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | | QtBase (remainder): use printf-style qWarning/qDebug where possible (I)Marc Mutz2016-03-121-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this first part, replace qWarning() << "" with qWarning("..."). Had to fix broken qImDebug() definition. Instead of defining it as a nullary macro in the QT_NO_DEBUG case and as a variadic macro in the other, define it in both cases, as is customary, as a non-function macro so that overload selection works without requiring variadic macro support of the compiler. Saves e.g. ~250b in text size in QtPrintSupport on optimized GCC 5.3 AMD64 builds. Change-Id: Ie30fe2f7942115d5dbf99fff1750ae0d477c379f Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | QXcbNativeIntegration: Add query for compositing enabledGabriel de Dietrich2016-03-041-1/+6
| | | | | | | | | | | | | | Task-number: QTBUG-41195 Change-Id: I4f37c82f6757283ed58b38c7fd47849fb4810bce Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | iOS: Implement support for QApplication::beep()Tor Arne Vestbø2015-12-171-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Vibrates the device or plays an alert sound on devices that do not support vibration. The other implementations of beep() have been moved to QPlatformIntegration as a proper API instead of having them as invokables in QPlatformNativeInterface. Change-Id: Ic597dbef04b46d49862b070e78ddfc0d763829a2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
* | Make native cursor handles accessible.Friedemann Kleint2015-12-141-0/+15
| | | | | | | | | | | | | | | | | | | | Add QWindowsNativeInterface::nativeResourceForCursor() and implement for Windows (returning the HCURSOR) and XCB (returning the xcb_cursor). Task-number: QTBUG-49386 Change-Id: I963869f6e8741449822ecbe6489f9c42a786c7a6 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Xcb: Fix debugging codeUlf Hermann2015-12-101-5/+9
|/ | | | | | | | | | We need to pass the correct connection and we need a specialization for reply pointers. Also, there is not much of a point in first creating a QString from a QByteArray, only to retrieve a QByteArray again. Change-Id: Ia1bb5655f6229638e3bd2339acadeffc80561b9e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* xcb: Export RootWindow to QXcbNativeInterface::nativeResourceForScreen()Alexander Volkov2015-04-301-0/+3
| | | | | Change-Id: I0ad74de8aef7d8a3cb707b61438096c67cd7626e Reviewed-by: David Faure <david.faure@kdab.com>
* Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-221-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/gui/painting/qdrawhelper.cpp src/plugins/platforms/xcb/qxcbnativeinterface.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/plugins/platforms/xcb/qxcbwindow.h src/testlib/qtestblacklist.cpp src/tools/qdoc/node.cpp src/tools/qdoc/node.h tests/auto/gui/painting/qcolor/tst_qcolor.cpp Change-Id: I6c78b7b162001712d5774293f501b06b4ff32684
| * Make it possible to use the -visual argumentJørgen Lind2015-04-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | for xcb applications to use a specific visual id when creating windows. Also make it possible to retrieve the visual id of a specific window with QXcbWindowFunctions::visualId(QWindow *window). UINT_MAX is used as an invalid visualId. Change-Id: If62ada119ce8f9174cc211f53bbf1ce1bb7d021a Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-03-161-12/+44
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbnativeinterface.cpp src/plugins/platforms/xcb/qxcbnativeinterface.h Change-Id: I31b38ba439b9341d51a01c0fd54bea33f7410076
| * xcb: Add support for obtaining default xcb connectionJan Kundrát2015-03-121-0/+9
| | | | | | | | | | | | | | This is needed by qtx11extras now that we can meet a nullptr QScreen. Change-Id: I755523cbbbbe188f454bd518d2d86a981542458f Reviewed-by: Richard J. Moore <rich@kde.org>
| * Fix bunch of other segfaults due to null screensJan Kundrát2015-03-121-12/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was motivated by a real segfault: #0 QScreen::handle (this=0x0) at qtgui-5.5.9999/work/qtgui-5.5.9999/src/gui/kernel/qscreen.cpp:112 #1 0x00007faaf5d5e85e in QXcbNativeInterface::connectionForWindow (this=this@entry=0x7fab04d684f0, window=window@entry=0x0) at qtgui-5.5.9999/src/plugins/platforms/xcb/qxcbnativeinterface.cpp:483 #2 0x00007faaf5d5fa53 in QXcbNativeInterface::nativeResourceForWindow (this=this@entry=0x7fab04d684f0, resourceString=..., window=window@entry=0x0) at qtgui-5.5.9999/work/qtgui-5.5.9999/src/plugins/platforms/xcb/qxcbnativeinterface.cpp:304 #3 0x00007fab048b8b57 in QX11Info::connection () at /var/tmp/portage/dev-qt/qtx11extras-5.5.9999/work/qtx11extras-5.5.9999/src/x11extras/qx11info_x11.cpp:358 #4 0x00007fab02ce14c6 in NETEventFilter::nativeEventFilter (this=0x7fab04ea5e70, ev=0x7faaec003a60) at kwindowsystem-5.7.0/work/kwindowsystem-5.7.0/src/kwindowsystem_x11.cpp:229 ...at which point I tried to stop playing the get-backtrace-patch-rebuild-repeat cycle and looked at the stuff which looked fishy to my untrained eye. So this is speculative in nature, but I think that each of these cases can be hit and dereference a nullptr. Change-Id: I046debaa1b49fa55e876247fc62f3eb924496fe8 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | A11y: query a11y bus address from X displayFrederik Gladhorn2015-03-091-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempt to get the accessibility bus address from the X display, to match libatspi's behavior. This allows the accessibility bus to be found when an application is running as root. [ChangeLog][QtGui] Linux accessibility (using XCB) will now works for applications launched as root Done-with: Mike Gorse Change-Id: I49a263571b328cbd1fd90cb7f5cb40919d2a4951 Task-number: QTBUG-43674 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | xcb: implement and deprecate QWidget::setWindowIconText()Shawn Rutledge2015-03-061-0/+3
| | | | | | | | | | | | | | | | | | | | This is a little-used feature which only affects how minimized icons are displayed on certain older window managers, and is not necessary even then. It has not been implemented in Qt 5 until now. Task-number: QTBUG-44659 Change-Id: Ie6ead7a6f922878b349a096d905bf7f675dc2f31 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devOswald Buddenhagen2015-03-031-5/+5
|\| | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbscreen.cpp Change-Id: Ie42931791a849b34b63d814d2eb5ac653986d868
| * Have XCB/Windows platform integration classes keep their own instance pointerSandro Mani2015-02-251-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Through the chain of code called by QPlatformIntegrationFactory::create, there are cases where QGuiApplicationPrivate::platform_integration is accessed (typically through QGuiApplicationPrivate::platformIntegration()) before the call to QPlatformIntegrationFactory::create has returned. Change-Id: I7805b72be5b56aed5cb8ce30cb908743c9b1f91b Task-number: QTBUG-44388 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Move the systemTrayVisualHasAlphaChannel to the QXcbSystemTrayTrackerJørgen Lind2015-02-251-38/+8
| | | | | | | | | | | | | | | | also expose it through the QXcbScreenFunctions platform header and use it in the qsystemtrayicon_x11.cpp. This gives us static typechecking. Change-Id: Ia9e2e2563ed5994be0b19d7bcf5a6aca92b1b760 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | xcb: Expose the systemtray functions through platformheadersJørgen Lind2015-02-231-24/+16
|/ | | | | Change-Id: I3504141d8130bbfe3246d81b61c8cbb010e255d6 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* xcb: remove stray QDBusMenuConnection in QXcbNativeInterfaceShawn Rutledge2015-02-201-2/+1
| | | | | | | | | It was unintentionally left in from an earlier version of 38abd653774aa0b3c5cdfd9a8b78619605230726 Change-Id: I7b0b19ed313493562874642cae8865bb0783e366 Reviewed-by: Daniel Molkentin <daniel@molkentin.de> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Fix xcb plugin compilation without D-BusAlex Trotsenko2015-02-131-0/+3
| | | | | Change-Id: I84afaa5668ac0f2c3954af50d123cfe469cbf255 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* xcb: QSystemTrayIcon: grab background pixmap for compositing only onceShawn Rutledge2015-02-121-10/+0
| | | | | | | | | | | | | | | Followup to 2203d9d93e24e00d6e9bc9bda0e65a0c7f9923cc: clearRegion takes a little time, so doing grabWindow() too soon afterwards can result in grabbing a pixmap with undesired leftovers. And doing it every time we render the icon causes flicker. So, do clearRegion() ASAP when showing the icon, wait for it to happen, then grabWindow() only the first time we render, and reuse the resulting pixmap for all future calls to paintEvent(). (The downside is, if there is any corruption during the first grabWindow(), it's going to stay there as long as the app is running.) Task-number: QTBUG-35658 Change-Id: If881ab192dba43758dcbb0d080663ff42057fa4f Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Handle gracefully the removal and re-attachment of all QScreensShawn Rutledge2015-02-071-1/+6
| | | | | | | | | | | | | | Don't crash; restore windows when all screens are removed and re-added. xcb: on configure notify, check for screen change: it may be that a window belonging to a screen which was removed has now gotten mapped to the new screen. On screen change, send a synthetic expose event, because the real expose events already happened. Task-number: QTBUG-38326 Task-number: QTBUG-32973 Task-number: QTBUG-42985 Change-Id: If334f55c248468ad3c95e7066bb14eca377d2050 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* QSystemTrayIcon uses D-Bus StatusNotifier on Linux when possibleShawn Rutledge2015-01-221-3/+4
| | | | | | | | | | | | | | | | | | | | | Implementing org.kde.StatusNotifier DBus interface http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/ as well as org.canonical.dbusmenu for the limited purpose of showing the tray icon's context menu. If a desktop environment (such as KDE or Unity) has a StatusNotifierWatcher listening, then tray icon information is sent to be displayed by the tray implementation instead of being rendered directly in an XEmbed window. This is necessary because some modern tray implementations no longer provide XEmbed "hosting". [ChangeLog][QPA][Xcb] QSystemTrayIcon uses StatusNotifier D-Bus protocol when the desktop environment supports it Task-number: QTBUG-31762 Done-with: Marco Martin <mart@kde.org> Change-Id: I3b1f744d621eefc7e9c61d1469460ebfcc77fc54 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-211-1/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * Turn off font hinting when we do high DPI scalingPaul Olav Tvete2015-01-161-1/+5
| | | | | | | | | | | | | | | | | | Font hinting depends on the specific pixel size, and ends up very wrong when the painter is scaled. Change-Id: I2007ec7e7ad8d52358d76e88e030ea4df7e91455 Task-number: QTBUG-43809 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Add some missing nativeResourceForIntegration imlementationsJørgen Lind2014-12-221-0/+14
| | | | | | | | | | | | | | | | The EglDisplay and the Display is normally a PlatformIntegration wide resource Change-Id: Ie5382a2a0b34fbe1c506b5134bf581afbd7f5d99 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>