summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* macOS: Deliver screen change on window creation instead of on first exposeTor Arne Vestbø2017-07-111-10/+5
| | | | | | | | We know the resulting screen based on the geometry mappings we now do, so no need to wait until expose to deliver the screen change. Change-Id: Ibb84948ab091d8f74d31cdd2d300b381e2e1e7cc Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Rename NSWindow variable in QCocoaWindow::createNSWindowTor Arne Vestbø2017-07-111-11/+11
| | | | | | | To distinguish it from window(). Change-Id: I90eb5207c6d9f178f009ecf755e2be8d29149a6b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Don't special-case QTestLib when reacting to occlusion eventsTor Arne Vestbø2017-07-111-12/+4
| | | | | | | | The tests (and Qt) should be able to handle occlusion of windows. Change-Id: I5e93e032f6a5282f19a20d0e230863d2a165f4e3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QMacStyle: Simplify logic for SC_GroupBoxLabel rectangleGabriel de Dietrich2017-07-102-29/+18
| | | | | | | | | | | This removes the single occurrence of HIThemeGetTextDimensions. Since we have access to the actual platform font through QPlatformTheme::font(), it's possible to use QFontMetricsF instead. We also cache small and mini system fonts to be reused in other places. Change-Id: I799c61eef0a2a6880a1c51aa7d3105c7e5b0ed4f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMacStyle: Simplify rendering SC_GroupBoxLabelGabriel de Dietrich2017-07-101-27/+12
| | | | | | | Removes the last occurrence of HITHemeDrawTextBox. Change-Id: I13804a16672c692a4405d8b2f9d5fb6a132a6b7b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMacStyle: Simplify CE_PushButtonLabel, CE_TabBarTabLabelGabriel de Dietrich2017-07-102-140/+57
| | | | | | | | | | We don't need the calls to HIThemeDrawTextBox after all. These render simple text nowadays, so we can do this with Qt APIs. Also fixes TabBarPalette in QCocoaTheme. Change-Id: Ib9436be83f03bd62fca40feb110a86602794c5b7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Use same naming for QPA event forwarding functionsTor Arne Vestbø2017-07-092-22/+26
| | | | | | | Expose events and others will follow. Change-Id: I8e11a133381a678517b54ad1872fe302515d4104 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Simplify QCocoaWindow::handleGeometryChangeMorten Johan Sørvig2017-07-093-11/+20
| | | | | | | | | | | | | | There are really only two cases here, where the difference is the coordinate system of the window position. 1) Child QWindow and embedded QWindow: The position is relative to parent view/window origin. 2) Top-level QWindow: The position is relative to screen origin. Change-Id: I867133a5adbbf3a690f574aec06b70c2bc64ad95 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Move geometry reporting from QNSView to QCocoaWindowTor Arne Vestbø2017-07-084-55/+61
| | | | | | | | | | | There's no longer any reason to call out from QCocoaWindow to QNView for this, as the geometry events from AppKit are delivered directly to the QCocoaWindow. Most of the data used in the implementation are coming from QCocoaWindow anyways, and this enables geometry events for foreign windows in the future. Change-Id: Idd724d078e9981304dcbe6742b9ddc71640a2350 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Allow QImage with more than 2GByte of image dataAllan Sandfeld Jensen2017-07-083-4/+4
| | | | | | | | | | | | Changes internal data-size and pointer calculations to qssize_t. Adds new sizeInBytes() accessor to read byte size, and marks the old one deprecated. Task-number: QTBUG-50912 Change-Id: Idf0c2010542b0ec1c9abef8afd02d6db07f43e6d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAbstractFileEngine: make setFileTime not a pure virtualThiago Macieira2017-07-075-24/+0
| | | | | | | | Most engines just had to override the virtual to return false. So do it in the base class. Change-Id: I8d96dea9955d4c749b99fffd14cd738a48aa818c Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Ensure all platforms send geometry events if request was not fulfilledTor Arne Vestbø2017-07-073-27/+15
| | | | | | | | | | | | | | | | | | The logic of deciding whether or not to send resize and move events has been centralized in QGuiApplication. This ensures that if a window with geometry 100,100+200x200 is moved and resized to e.g. 0,0+100x100, but the window manager denies the request (because the window would e.g. overlap with system UI), and issues a geometry update with the original geometry, 100,100+200x200, we will still treat that as warrant of a move/resize event to the application, so the application knows that its position and size is as before. [ChangeLog][Qt Gui][QPA] QWindowSystemInterfacePrivate::handleGeometryChange no longer takes the old geometry as an argument. Task-number: QTBUG-57608 Change-Id: I1d471cc7a257fef958bdb1e56184fa95489403a3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix an egregious misnaming, s/deg([XY])/rad$1/gEdward Welbourne2017-07-071-4/+4
| | | | | | | | The angles in question were in radians, not degrees; we get them from std::atan(). Change-Id: Ifd60efbd975997ffca02e45ae884fb75e59806b4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QMacStyle: De-Carbonize QScrollBarGabriel de Dietrich2017-07-071-472/+385
| | | | | | | | | | | | | | | | | | | | Addresses drawing, hit testing, subcontrol rects and one metric. Also fixes the knob width on hovered transient scrollbars. Since Cocoa won't help for this (and never will), we do it manually. For non-transient scrollbars, no more HITheme. That's why we're doing this after all. It also comes with its own small hack; see how we darken the knob when hovered. We had to de-intertwine the logic with QSlider in drawComplexControl(), which now gets its own full case CC_Slider statements. QSlider will be addressed next. Task-number: QTBUG-49585 Change-Id: Iced58d52fff0c11866bdf6eb562dbab36c8f3ef2 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Relieve platform plugins of having to persist geometry on WM callbacksTor Arne Vestbø2017-07-079-28/+2
| | | | | | | | | We can offload this to QGuiApplication, just like the geometry of the QWindow is set. This ensures that all platforms behave the same, and that the documentation of QPlatformWindow::setGeometry is adhered. Change-Id: I19dbc32cb4fb146d716ec289c28030a547d3afaa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* macOS: Deliver native events to windows, as well as to event filtersTor Arne Vestbø2017-07-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | Qt has two APIs to intercept native events today: - QAbstractEventDispatcher::installNativeEventFilter() - Q{Window|Widget}::nativeEvent() On macOS we only implemented one of them, the native event filter code path, by calling filterNativeEvent from the Cocoa event dispatcher. We now also propagate the native event to the corresponding QWindow, and QWidget if applicable. It would be nice if there was only one Qt API for this, or at least only one codepath for platform plugins to care about, but since the event filter might catch more event types than gets delivered to the window, we probably need both code paths going forward. Task-number: QTBUG-40116 Change-Id: I0796bd62a2b7c08b2eaaf6f15db8088e9703af02 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Don't deliver events via NSWindow for deleted QCococaWindowsTor Arne Vestbø2017-07-061-0/+8
| | | | | | Change-Id: Icb3794f37c929019de1e997e15f7d975492224c2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-0616-101/+95
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I43531e087bb810889d5c1fbfcdffb29b78804839
| * Windows QPA: Correctly check for fixed sized windows in WM_DPICHANGEDFriedemann Kleint2017-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Use Qt's flags instead of WS_DLGFRAME which matches WS_CAPTION as well (WS_BORDER | WS_DLGFRAME). Amends 886ce572d628e7cd98cc39edcc930ffae951e95e. Task-number: QTBUG-58959 Change-Id: Ifdc106667d67cc6f5d3611806aae1035742fb882 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * Android: Replace QMutex with QBasicMutex in androidjnimainChristian Strømme2017-07-031-1/+1
| | | | | | | | | | | | | | QBasicMutex is sufficient and provides reduced initialization cost. Change-Id: I79ae61daaed4f5edd9b21d913f78e78e7ba14c94 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * Android: Add lock to protect access to the platform interfaceChristian Stromme2017-07-035-31/+32
| | | | | | | | | | | | | | | | | | | | Fixes dubious lock protecting the platform interface handle, and makes sure that we lock and hold a valid reference to the platform interface before accessing it. Since the platform interface is exposed we also need to expose the mutex protecting it. Change-Id: I1ec1219a75c589bc793676369b11fb403de20102 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * xcb: Use QT_CONFIG macro to check for xcb-sm, xcb-render, and xcb-glxAlexander Volkov2017-07-038-66/+43
| | | | | | | | | | | | | | | | | | | | | | And remove the corresponding defines. Note that XCB_USE_GLX and XCB_HAS_XCB_GLX were used as synonyms because QGLXBufferSwapComplete was wrapped in #if defined(XCB_USE_GLX) and at the same time it was used only when XCB_HAS_XCB_GLX was defined. Change-Id: I6c04b0ccfd5369b78b3e8af2ec39d38ae5c311dc Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * Cocoa: Reset the target + action for a menuitem after showing a dialogAndy Shaw2017-07-031-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | To make it more reliable and efficient we now do the reverse of what we are doing when redirecting the items. This will ensure that the actions are correctly reset to the original target and action. The original approach of updateMenubarImmediately() was not always doing this and it also does other unnecessary things as a result when all we need is to just reset the things we changed. Change-Id: Icefa38d47ec9434894f05caeed75fbf8bdfecb93 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Remove remains of wince in .pro filesFriedemann Kleint2017-07-031-1/+1
| | | | | | | | | | | | | | | | Task-number: QTBUG-52590 Change-Id: I444fc9eedc8a8e4ad2ede224d66e7c410bedbb48 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Use qRadiansToDegrees() and qDegreesToRadians() more widelyEdward Welbourne2017-07-053-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Especially in examples, where we should show off our convenience functions, prefer calling these functions over doing arithmetic with M_PI (or approximations thereto) and 180 (give or take simple factors). This incidentally documents what's going on, just by the name of the function used (and reveals at least one place where variables were misnamed; the return from atan is in radians, *not* degrees). Task-number: QTBUG-58083 Change-Id: I6e5d66721cafab423378f970af525400423e971e Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/devLiang Qi2017-07-0536-156/+163
|\ \
| * | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-0436-156/+163
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Convert features.colordialog to QT_[REQUIRE_]CONFIGStephan Binner2017-07-024-8/+11
| | | | | | | | | | | | | | | Change-Id: If2ac57a10f38002db5a49be3882dfc507a84a3df Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * xcb: Replace XCB_USE_XINPUT define by QT_CONFIG macroAlexander Volkov2017-06-296-33/+19
| | | | | | | | | | | | | | | | | | | | | | | | .. and remove it from qxcbconnection_xi2.cpp as this file is build _only_ when xinput2 is available. Change-Id: I66d6a299c120fc034f8519cd188e1b845d5bd1bc Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| | * Convert features.filedialog to QT_[REQUIRE_]CONFIGStephan Binner2017-06-295-9/+25
| | | | | | | | | | | | | | | Change-Id: I9bc229b0d1430b81eeb2cfca2b24474736d5d561 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * Windows code: Add Q_FALLTHROUGH or break to unmarked fallthroughs seen by GCC 7Friedemann Kleint2017-06-282-1/+2
| | | | | | | | | | | | | | | | | | | | | Rearrange code handling QtWindows::DisplayChangedEvent. Change-Id: If9f32516108fb64c4a252c84392f2fd7f1872bf1 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * Fix GCC 8 warnings about ignored const on cast result typesMarc Mutz2017-06-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qdrawhelper.cpp:1365:25: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers] for (; i < count && (const uintptr_t)buffer & 0xF; ++i) { ^~~~~~~~~~~~~~~~~~~~~~~ etc... Change-Id: I702f9aada24ad49ebc7ede0a04e5afc1b0164e30 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Convert features.tabletevent to QT_CONFIGStephan Binner2017-06-287-34/+33
| | | | | | | | | | | | | | | Change-Id: Ibd7ed7f269a64afddadee70979b20f1c58398378 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * Convert features.wheelevent to QT_CONFIGStephan Binner2017-06-281-3/+3
| | | | | | | | | | | | | | | Change-Id: I46083a9115c199d1ebe024ed5f64b160a27462f1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * xcb: Use QT_CONFIG macro to check for xcb-xlibAlexander Volkov2017-06-2815-42/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... 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>
| | * xcb: rename arg in QXcbBackingStore ctorGatis Paeglis2017-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | ... as it is a window, not widget. This matches the name from cpp file: QXcbBackingStore::QXcbBackingStore(QWindow *window). Change-Id: Ib9f69cbe80ea645bbce0e4f5ef24a8df8808b823 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * xcb: Increment iterator inside bgr888 region loopBłażej Szczygieł2017-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Amends 9c1d3bc253abd4418f3050d19ec5f05bef3ada97. Change-Id: I912096794d274617e5b290dfb42685088cd49b23 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * macOS: Send text input and key events to focus object of window, not appTor Arne Vestbø2017-06-261-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The key events and input method callbacks coming from Cocoa are targeted at our specific NSView, so we should deliver them to the focus object of the corresponding QWindow, not the global application focus object. This means that we'll deliver key events to windows also when they are not key (active), but this is intentional, as we would otherwise fail to deliver input method events coming from e.g. the emoji/symbol picker, which steals the key window when active. Task-number: QTBUG-61359 Change-Id: I61326c08ad8bbd0c535b3cc8a67d0ceeec7ee910 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * macOS: Work around buildup of NSDisplayCycle objects during rapid paintingTor Arne Vestbø2017-06-261-0/+8
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-60012 Change-Id: Id5291f768a4b9d8d9c77804cb697e0c9fb151012 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Forward Service.onBind notification to QtBogDan Vatra2017-07-041-2/+15
|/ / | | | | | | | | | | | | It is needed to implement Android Binder in Qt. Change-Id: I8f6f8ef778f97a444a1b16d6f62e211e188b65cc Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | macOS: Remove workaround for crash when closing window from title barTor Arne Vestbø2017-06-292-15/+0
| | | | | | | | | | | | | | | | | | The platform window is now protected by a QPointer, so we don't need to juggle the NSWindow retain count. Task-number: QTBUG-37287 Change-Id: Id55ea311f0793370e248aa58cc8e383b574fbb40 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | macOS: Remove unneeded Objective-C instance variable declarationsTor Arne Vestbø2017-06-292-9/+0
| | | | | | | | | | | | | | | | And their corresponding synthesizations. The compiler will take care of it for us. Change-Id: Ifa42e0732059008af6f3f65151bf203a1a19079d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | macOS: Remove workaround for queued input events to stale windowsTor Arne Vestbø2017-06-293-26/+1
| | | | | | | | | | | | | | | | | | | | | | | | We now track the platform window with a QPointer, so the event callbacks can (and do) check the validity of the platform window before passing them on. The window property of the NSView is also nil at the point of even delivery, if we need another way to check if the event is still valid. Task-number: QTBUG-39211 Change-Id: I6179bdb3af9606cd0abf981c0fe6cacb9a2d98ab Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | macOS: Remove workaround for grabbing child NSWindowsTor Arne Vestbø2017-06-282-24/+2
| | | | | | | | | | | | | | | | The code was introduced in 28c9c2ea50, but child NSWindows are no longer supported, so we can simplify the code by removing it. Change-Id: Ic98b8b0e0a84d5f2adba1840bd8318de2be031b6 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Remove requirement to call QWindow::setMask after creating windowTor Arne Vestbø2017-06-283-1/+10
| | | | | | | | | | | | | | | | | | | | | | Like other QWindow properties we can just store it, and the platform window should pick it up on creation like other properties. [ChangeLog][QtGui][QWindow] setMask() no longer requires the window to be created to have an effect; it can be set at any time. Change-Id: I55b616363801b770bd61bda5325b443013b99866 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Clean-up in QXcbScreen::getOutputProperty()Gatis Paeglis2017-06-281-6/+3
| | | | | | | | | | | | | | | | | | Use the Q_XCB_REPLY() macro and let its unique_ptr<> take care of free()ing the reply. Change-Id: I32eb9c56ea0ba5632bf6ab39c77567d10f442995 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Fix sporadic crash in QXcbScreen::getOutputProperty()Edward Welbourne2017-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Although [0] claims "This request does never generate any errors", it seems I sometimes get back a NULL pointer from xcb_randr_get_output_property_reply(), leading to a segfault (in the qdatetimeedit auto-test). So check reply isn't NULL before dereferencing it. [0] https://www.systutorials.com/docs/linux/man/3-xcb_randr_get_output_property_reply/ Change-Id: Iadae835bb3017bf9bb40f180b75b0c391384f99b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | macOS: Allow maximizing utility windowsTor Arne Vestbø2017-06-271-3/+3
| | | | | | | | | | | | | | | | | | They have a native maximize/zoom button in their titlebar, so there's no reason for us to prevent the same action via the API. The only states that are prevented are minimized and fullscreen. Change-Id: I84fa48b31b243fa838c90ecdeee92a2f3448ee14 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | macOS: Make QCocoaNSWindow header file slightly more readableTor Arne Vestbø2017-06-271-18/+14
| | | | | | | | | | Change-Id: I09ac42af476feb1d561a77f68999a2754a2e252e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | xcb: remove DISPLAY_FROM_XCB macroGatis Paeglis2017-06-277-21/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... as it does not add much value and is not widely used. and cleanup code: - where we repeatedly (for no good reason) call DISPLAY_FROM_XCB, instead of storing display as a (member) variable. - inconsistency where we (in the same function) alternatingly use DISPLAY_FROM_XCB and variable holding pointer to Display (when both refer to the same display). In other places this patch replaces macros with code they would translate to (or with minor adjustments to keep sensible line length). Change-Id: Ieb2a3e055892dcf31f132891f83ed4a665e3fa6e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>