summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | Make GLX and EGL dynamic dependencies for xcbJørgen Lind2014-12-201-98/+174
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QPA][Xcb] GLX and EGL code paths are now dynamically resolved, making it possible for one build of a plugin to use both code paths. Default is to use the GLX code path if available. This can be overwritten by specifying QT_XCB_GL_INTEGRATION=xcb_egl as an evnironment variable. Enable qt.xcb.glintegration.debug to get debug log output of what integration is used Change-Id: Ia9fa95fcca3d901b91dadb8c98a695fea0ae3b1e Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | xcb: Fix transparent tray backgrounds with 24bpp tray visualsUli Schlachter2014-12-091-0/+12
|/ | | | | | | | | | | | | | | | | | | Commit 0eefa785a0d8 ported Qt4's method of indirectly drawing the tray icon's background to Qt5. This commit makes it work a bit better. When drawing the tray's background, we use a ClearArea request to make the X11 server fill the tray icon with its background. Then we grab that background from the server and paint the icon on top of it. So this is pretty much pseudo-transparency at work. One small ingredient that was missing before is the BackgroundPixmap of the tray icon. If this attribute is set to ParentRelative, then our tray icon inherits the background of its parent window. That way the ClearArea will actually produce the expected background. Task-number: QTBUG-35832 Change-Id: I63fc4609064d8f858ca9e5cc290409a298b918b7 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* xcb: Fix getting the primary screen from QXcbConnection::screens()Alexander Volkov2014-10-291-1/+1
| | | | | | | | | | | | | | | | Currently getting QXcbScreen* for primary screen is too messy and it wrongly uses QXcbConnection::primaryScreen() as an index in QXcbConnection::screens() although QXcbConnection::screens() returns the primary screen as the first item in the list since 3c8eb404877df9c967d81fa9df7d718c538fb407. So to clear the API rename primaryScreen() to primaryScreenNumber(), add QXcbConnection::primaryScreen() that returns correct QXcbScreen* and use it directly. Change-Id: Icb7391aa3e82b32ca48f2bda764dcf7ffd89cc47 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Support antialias and rgba Xft settings as used by GNOME and UNITYAllan Sandfeld Jensen2014-08-181-1/+8
| | | | | | | | | We only parsed the hintstyle from the Xft settings. This patch adds parsing for also subpixel style and disabling antialiasing. Task-number: QTBUG-27106 Change-Id: Icdb88ccc10e50d76eb30a5b126bee7590e257022 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Add support for querying "eglconfig" through the xcb native interfaceAndras Becsi2014-07-101-0/+16
| | | | | | | | We already support this for eglfs but for a desktop Qt configured with -opengl es2 we need to expose it through xcb as well. Change-Id: I36d0e255d8c86cc1cec56015f33470f61d7df466 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add support for querying "glxconfig" from native interfaceAndras Becsi2014-07-071-0/+17
| | | | | | | | | This makes it possible to retrieve the GLXFBConfig used by Qt to create the GLXContext. QtWebEngine on desktop needs this so that Chromium can use the same config as Qt to eliminate BadMatch errors. Change-Id: If18c0937b5af3e457ddbfda035e5d652230211c6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Support transparency in qt5 system tray icons, regardless of tray visualLeo Franchi2014-07-041-1/+79
| | | | | | | | | | | | | | | | This ports the Qt4 method of supporting the system tray window visual that has an alpha channel as well as ones that do not. We detect whether or not we have a 32-bit format and either use a Qt::transparent background, or call xcb_clear_region before painting the icon. [ChangeLog][Linux/XCB] Fix transparency of tray icons in cases where there is no alpha channel or system tray visual. Task-number: QTBUG-35832 Change-Id: I43d500c39846d2916dd39f8c47c8d85e59b49cae Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Use QtPlatformHeaders to set platform specific functionalityJorgen Lind2014-05-091-0/+10
| | | | | | | | | | | This involves exposing a new function in the QPlatformNativeInterface which gets a public function for QGuiApplication Proof of concept is done through implementing _NET_WM_WINDOW_TYPE setters for xcb Change-Id: Ic9544e775fb71cc9b30273595ec41b1cdb1c9d64 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add function for setting the startup ID for the next window that will be shown.David Faure2014-04-051-0/+17
| | | | | | | | | This is useful for applications being requested to show a second window (e.g. via DBus) Change-Id: I04add2aa82dce63e854ba0f1c020274ed586bf1f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Export rootWindow to the QXcbNativeInterfaceMartin Gräßlin2014-03-081-1/+14
| | | | | | | | | | | | | | | | This change exports the root window to the native interface as there is QX11Info::appRootWindow which so far goes over the QDesktopWidget to get the window id of the root window. Which is a rather hackish way considering that the root window is known to the QXcbConnection. But even more it's a very fragile way and can result in crashes on startup of applications if the application accesses the appRootWindow too early. Change-Id: Ibb09a7fa714cb355f579298fc6df33bf80f73f58 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
* Remove stale xcb_dri2 code in QXcbNativeInterfaceJorgen Lind2013-11-281-1/+1
| | | | | Change-Id: Ifc8dc8d84fc60b70f8a49282dfe32cd248bef9ba Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Return the xcb_screen_t and not the QPlatformScreenJorgen Lind2013-11-271-1/+1
| | | | | | | | | from QXcbNativeInterface. The QPlatformScreen is available from QScreen::handle() Change-Id: If81daf34c07f4a49c85c43d3755d1a9167626d6d Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Export x11 screen of the QXcbConnection to the native interfaceMartin Gräßlin2013-09-171-1/+13
| | | | | | | | | | | With XCB a client cannot retrieve the information on which X screen it is running. This information is only available when opening the xcb connection. As this is done by Qt no application is able to retrieve this information. By exporting the x11 screen we can provide this information again in QtX11Extras. Change-Id: I50f1d3e803dc7e3afac0e5c7f1648ccda4502e7c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Replace XCB native interface resource map by a lookup function.Friedemann Kleint2013-09-081-43/+23
| | | | | | | | | Remove global variable and duplicated lookup in the old code (map.contains() followed by map.value()). Change-Id: Id68c34bf38c6706db69dcb8422c3b1ea718aa064 Y# issue or contains a behavior change that is relevant to others, Reviewed-by: David Faure <david.faure@kdab.com>
* Export getTimestamp to the native interfaceMartin Gräßlin2013-08-071-0/+9
| | | | | | | | | | | | The functionality to get the current x11 timestamp is also needed by applications which need to interact with the X11 directly. With XCB it is not possible to inspect the event queue and by that an application is not able to retrieve the current timestamp using the property change pattern and waiting for the matching event. Change-Id: Ie7ba78ecbe509ed3a902c702266917f65bf5ad07 Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* Move the X11 system tray code from widgets into XCB-plugin.Friedemann Kleint2013-07-301-0/+38
| | | | | | | | | | | | | | | | | | - Add system tray tracker class to XCB plugin and provide functionality via invokable slots of the native interface. - Remove XLib-dependency of widgets/utils. - Reintroduce tracking of tray window destruction and recreation, which was removed in the XLib-code when porting it from Qt 4 to Qt 5. This paves the way for implementing the tray icon completely in terms of QPlatformSystemTrayIcon at some point later. Change-Id: Ia04268b0e2919c05874a3e9548930535332897c7 Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* xcb: 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>
* 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>