summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
...
| * | wasm: fix wheel scroll logicLorn Potter2018-10-201-2/+5
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-71180 Fixes: QTBUG-71180 Change-Id: If442da096b847fdf69f3b24615e99c2ca988fb79 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | QMacStyle: fix group box for macOS MojaveTimur Pocheptsov2018-10-192-7/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is based on a patch started by Gabriel. It works around the apparently noop (on macOS Mojave, light theme) -drawRect: call on NSBox, replacing it with -displayRectIgnoringOpacity:inContext:. Unfortunately, this turns out to be extremely slow with dark theme, so we have to resort to a custom version of NSBox/-drawRect: which calls its super's -drawRect: and look more or less correct. Task-number: QTBUG-69650 Change-Id: I5a614d7cd8002b378c6c3804663b6559e227f628 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | Fix a regression in qmacstyleTimur Pocheptsov2018-10-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | square/flat button had an erroneous size adjustment, resulting in a wrong highlighted area. This button is anyway nothing like a real control on macOS - they don't have 'flat' button which highlights when pressed. Anyway, now our flat button looks more like AppKit's 'square' button when pressed. Task-number: QTBUG-69533 Change-Id: I9643c1d4a25329c3f3c2148cc1821922655d9a8b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | QCocoaMenuItem: ignore font hintsTimur Pocheptsov2018-10-192-17/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Native applications do not use custom fonts in menus, so we should avoid it - our own example app 'menus' demonstrates the problem. To quote Gabriel: Although the Mac HIG don't say that you shouldn't, and there's even a API to do it (which we're obviously not using properly), the truth is that nobody does it. Simply put, it looks wrong on Mac (although it's arguable whether it looks good or bad regardless of the platform). Task-number: QTBUG-29654 Change-Id: Iffd08ad63d419164102b2e738cdf1ebda1967a05 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | macOS: Use correct text background colorMorten Johan Sørvig2018-10-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 582d221b29bbf introduced a regression where the default Base color is no longer white in light mode, for some use cases like querying QApplication::palette() and when using style sheets. [NSColor windowBackgroundColor] is not the correct color for QPalette:Base, [NSColor textBackgroundColor] is, except for the Disabled state which uses windowBackgroundColor to get a grayed-out look. This also changes the dark mode Base color slightly, from RGB(0.196, 0.196, 0.196) to RGB(0.118, 0.118, 0.118). Task-number: QTBUG-70966 Change-Id: I1ff494a09980ff2d04b2e2c43ee0bcc8e26ba9e7 Fixes: QTBUG-70966 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Windows QPA: Fix Drag&Drop from touchscreen/penAndre de la Rocha2018-10-183-10/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Drag&Drop functionality had stopped working with touchscreen/pen after the WM_POINTER-based input handling was added. The Drag&Drop functionality internally uses the DoDragDrop() WIN32 call which, according to Microsoft docs, is not supported for invocation inside handlers for touch/pen messages, and should be invoked in handlers for mouse messages that are synthesized by the OS afterwards. The result was that when DoDragDrop (which is a blocking function with its own event loop) was called it would hang ignoring all touch/pen messages until a mouse/touchpad message arrived. This change implements a workaround for this issue by enqueuing Qt touch/pen events that would be generated inside the pointer message handler, and that could start a Drag&Drop operation, and only producing them after the OS sends the associated mouse messages. Task-number: QTBUG-70887 Change-Id: Id45e0ecc70358ba250de9b3268856781ed21c9dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Restore "Do not create instance of QPlatformIntegration for invalid displays"Gatis Paeglis2018-10-183-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is amended version of 67cc8fea106c35c7ca75bf476667d07b3bbf3257, which was temporary reverted to simplify integration of conflicting patches. What was amended: - Dropped the factory interface. It is sufficiently clean to check for QXcbConnection::isConnected(). Task-number: QTBUG-68859 Change-Id: I810897b3ea20e356fc4d62e6f01231fd287962dc Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Windows QPA: Fix maximizing windows without title barFriedemann Kleint2018-10-181-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extends the code from qtbase/0d6612af65161f6e659af6985bb2c0b76accb856 to cover the case of windows without title bar, too. Fixes: QTBUG-4362 Task-number: QTBUG-8361 Change-Id: I5cff8814174069922936f3fcfbb3aef154c7a7e7 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | Windows QPA: Add helper function to obtain DPI-dependent metrics on Windows 10Friedemann Kleint2018-10-173-3/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use newly introduced SystemParametersInfoForDpi() API with some convenience overloads. Task-number: QTBUG-4362 Change-Id: I4c41c700007bf7cc4fd5868356e3145c136704c0 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | xcb: use 128 as a reference DPI for small screensMathieu Velten2018-10-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a better version of 23b139038a1dc9a769a358ab112453abcdd39290 which was reverted. Task-number: QTBUG-68620 Task-number: QTBUG-53022 Task-number: QTBUG-57211 Change-Id: I0b37fc261945c542bbfb30cecfe4b0a97c655e3c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | xcb: cleanup _MOTIF_WM_HINTS handlingGatis Paeglis2018-10-174-139/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing code was difficult to follow, it contained some code duplication, inconsistencies and legacy code (mwm/dtwm support). Most of this code was copied over from Qt 4 as is, with some unexplainable (accidental?) modifications. Most of Motif code was never ported over to Qt5. In addition to the properties and protocols described in ICCCM, Motif uses properties and protocols of its own. In Qt4 we had an implementation of Motif DnD protocol. This was never ported over and mentions of this support was removed on Oct 2012, 4c41cb48d0356a28190c300fd4cc5e03f824b870. Nobody has complained for all these years, so it is safe to remove the remaining leftovers. Motif style support also was removed around the same time 4c41cb48d0356a28190c300fd4cc5e03f824b870. Keeping only those Motif hints that do not have any replacement in modern window manager specifications - decorations hints. MWM_INPUT_*MODEL* in modern specs was replaced by _NET_WM_STATE_MODAL The existing code was setting _MOTIF_WM_HINTS from 2 places - from QWindow setter (::setWindowFlags) and again before mapping the window (::show). We don't need the logic from updateMotifWmHintsBeforeMap(). That function read the current value of _MOTIF_WM_HINTS and merged in few additional hints, hints that are not relevant based on all the reasons from above. Change-Id: I9cb10bcad9bfac8762e3909895c2e9de613e622c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | xcb: qxcbconnection_screensGatis Paeglis2018-10-174-382/+426
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved all screen handling method implementations into qxcbconnection_screens, the same way we are doing with xinput2 code in qxcbconnection_xi.cpp. The goal was to reduce the size of qxcbconnection.h/cpp. Change-Id: I9bad55ca4b0874171b7313d923b13c66034c3b3e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | xcb: qxcbconnection_basicGatis Paeglis2018-10-1714-1027/+1317
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A basic base class that creates a connection and initializes extensions. The goal was to reduce the size of qxcbconnection.h/cpp. Made QXcbAtom into a class that handles atom initialization and exposes the relevant APIs. Before this patch, all of that logic was inside of qxcbconnection.h/cpp. Change-Id: Ia893c3b31e2343dfbe62fe2aa6bfd0017abf46ea Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * | Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-1710-11/+43
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platformthemes/platformthemes.pro src/printsupport/kernel/qplatformprintdevice.cpp Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
| | * Modernize the "mimetype" featureLiang Qi2018-10-125-3/+9
| | | | | | | | | | | | | | | | | | Change-Id: I9b67c2cbc0891a38ece18d521c86fbc7344dce7a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| | * Only use a translucent background if there is support for alphaAndy Shaw2018-10-121-2/+4
| | | | | | | | | | | | | | | | | | Change-Id: Ia8d9e543fac4b6e790fa38cf04c5a782d72d72df Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| | * Use native visual ID when creating GBM surfaces for KMSPaul Olav Tvete2018-10-123-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the Khronos documentation, gbm_surface_create() will give a BAD_MATCH error if the format does not match the EGL_NATIVE_VISUAL_ID. Newer drivers have started to enforce this. Change-Id: I61360b0f52965ad8057e7de8f824ffca64fea904 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
| | * [macOS] Fix position of sheets when using unifiedTitleAndToolBarOnMacAlexandru Croitor2018-10-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modal sheets are supposed to appear below the toolbar if a toolbar exists, or below the title bar if a toolbar doesn't exist. In the unified title and toolbar mode, sheets should to appear directly below the toolbar, if the toolbar is positioned at the top of the window. Code-wise we achieve that by calling setUnifiedTitleAndToolBarOnMac on a QMainWindow, which results in adjusting the top content border of the NSWindow via [NSWindow setContentBorderThickness:forEdge], which Cocoa uses to position a modal sheet (the sheet top edge is aligned with the top edge of the content view + the Y border thickness value). The issue is that because NSWindow.titlebarAppearsTransparent is set to YES, for sheet presentation purposes, Cocoa considers the content view to begin at the position of the top left corner of the frame (where the title bar is), and thus sheets appear somewhere in the middle of the unified toolbar. To fix that we need to account for the title bar height in the border thickness value. Compute the title bar height from the window frame height - window content view height, and add it to the top border thickness value. Amends 8ac9addd946637401e4685c6e91d1a3cd5b2d768 Change-Id: Icf85c513035cc3710b438e60eb14dc04c5bbaced Fixes: QTBUG-65451 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | QWindowsContext: proper check resolved functionAnton Kudryavtsev2018-10-161-1/+1
| | | | | | | | | | | | | | | Change-Id: I9a223dc2efa2205dc3ae8d300cf06b12e06ed0f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | xcb: respect QEventLoop::ExcludeUserInputEvents in native event handlersGatis Paeglis2018-10-166-11/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a regression from Qt 4. Before this patch, we supported filtering events only at QWindowSystemInterface level, but to properly support filtering in QAbstractEventDispatcher::filterNativeEvent, we have to filter the events earlier. Now it is possible to enable/disable this feature for platforms that support native event filtering. The mapping of which events are user input events were taken from QWindowSystemInterfacePrivate::EventType. Task-number: QTBUG-69687 Change-Id: I9a5fb9f999451c47abcdc83fdcc129b5eeb55447 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | xcb: rework connection error handlingGatis Paeglis2018-10-162-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reworks 0b1ce5db9e04b4c28713e87306fcea020c3e428b. Just by looking at the source code it was unclear why is this signal-and-slot connection necessary. It doesn't do anything on normal exit - at the time we call dtor of this class, QCoreApplication::instance() already is nullptr, which means that no further event processing happens and we never get this signal. Without digging into git history it may appear that the goal was to process the remaining events on application exit, which would be a questionable code by itself. Change-Id: I202d11584901e3b52254d8e3c347aece17844b72 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | Windows QPA: Add WM_INPUT to the list of input messages for event filteringFriedemann Kleint2018-10-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Amends a0a22037cdacbf51a2db560ff902a5a341561b15. Task-number: QTBUG-67095 Change-Id: I32d2e78f9d9525d56c1d4477d69cf7b9d7f8e7a3 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
| * | xcb: cleanup WM_HINTS handlingGatis Paeglis2018-10-151-23/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The only place where window flag Qt::WindowDoesNotAcceptFocus changes is inside QXcbWindow::setWindowFlags and from there we call updateDoesNotAcceptFocus(). The current code was redundantly calling xcb_wm_hints_set_input in various places. - Similar as above: call xcb_wm_hints_set_normal/iconic only where it can change. This hint depends on window state, so update it only from setWindowState(). Removed unnecessary call to setTransparentForMouseEvents(), which is already called few lines above from setWindowFlags(). Change-Id: I8da919b135a4dfda0c8c1dad51d85d3e706153ab Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | xcb: utilize thread-safety of QAbstractEventDispatcher::wakeUpGatis Paeglis2018-10-153-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QAbstractEventDispatcher::wakeUp is a thread-safe method, using a queued connection to invoke it is wasteful. This type of connection involves allocating temporary QMetaCallEvent on a heap and locking of destination thread's post-event queue. In most use cases this is ok, and really convenient when target method is not thread-safe. But in this case the existing solution was suboptimal, especially because the events we are reading can be high frequency. The solution that we use here is lock-free. There can be only one time when it might need to wait for the lock, which is upon exiting the application. If we have entered the critical section in QXcbEventReader::run(), then the registered post routine (qAddPostRoutine) will block the QCoreApplication's dtor (this is where dispatcher is set to 0) until we exit the critical section. We also know when not to enter the critical section, in case dtor is already running. With this approach we might need to compete for the lock at most once, instead of whole application lifetime, which was the case with the existing code. Change-Id: If6737329c972347b0050d67658e28dbaa6f552e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | xcb: call processXcbEvents() on every event loop iterationGatis Paeglis2018-10-157-11/+289
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is necessary for QTBUG-69687. The original code processes the xcb event queue only when new events have arrived, but if we want to do an event filtering that buffers some events and processes them later based on set/unset flags (e.g. QEventLoop::ExcludeUserInputEvents), we need to call processXcbEvents() on every event loop iteration, not only when new events have arrived from X server. The required functionality is implemented by having custom event dispatchers, instead of using the generic ones from QtGenericUnixDispatcher:: createUnixEventDispatcher() / eventdispatcher_support-private. This also enables for further customizations, as might be necessary by QTBUG-70095. Task-number: QTBUG-69687 Change-Id: I1f8b2400d26cccf17279d57bb4b678e40c615f33 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * | Doc: Move literal code block to a separate fileCristian Maureira-Fredes2018-10-152-12/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to override this snippet for the documentation we generate for Qt for Python, and it is easier to have it on a separate file. Task-number: PYSIDE-801 Task-number: PYSIDE-691 Change-Id: Ideb5b6af25024279f167137d3b65660bb9c96a7e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * | xcb: localize handling of Qt::AA_Compress* flagsGatis Paeglis2018-10-141-2/+4
| | | | | | | | | | | | | | | | | | | | | Handle both of them inside the QXcbConnection::compressEvent(). Change-Id: Ibe7184ba5c5b636013145e887c817dca701345ad Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | xcb: lock-free event processingGatis Paeglis2018-10-1412-359/+589
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Revert "XCB: Do not create instance of QPlatformIntegration for invalid ↵Gatis Paeglis2018-10-145-73/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | displays" This reverts commit 67cc8fea106c35c7ca75bf476667d07b3bbf3257. I forgot about this patch and now it makes rebasing the local changes too time-consuming. Besides, 67cc8fea10 broke a build for -no-xcb-xlib. I will restore this patch, with adaptations to the new QXcb*Connection hierarchy. Task-number: QTBUG-68859 Change-Id: I938f32b5da22ce18f95d761f9b34e77fff923e24 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * | qt_mac_createRolePalettes: fix the highlight color for ItemViewPalette roleTimur Pocheptsov2018-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | While this requires from us calling a deprecated method, a (non-deprecated) method we were using gives a wrong color which is too bright/saturated. Task-number: QTBUG-70676 Change-Id: Icebeb53e351caa646c533595ca1a886e5eb6b5b8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | qnsview_keys - fix a typoTimur Pocheptsov2018-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | that resulted in 'Cmd' reported as combo of Qt::Meta/Qt::Control and Qt::KeypadModifier. Task-number: QTBUG-71006 Change-Id: I3dddc56f4d404a1ceefb21d57ac120b6273456ec Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-135-59/+12
|\| | | | | | | | | | | Change-Id: I2715ee7c694e5579bcedc7bab0ae68e79d5fd0b6
| * | WinRT QPA: Fix crash in QWinRTBackingStore::flush()Andre de la Rocha2018-10-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWinRTBackingStore::flush() was not considering the possibility that the supplied region may fall partially outside the bounds of the paint device. This resulted in possible accesses to invalid memory addresses, causing a crash. This bug was exposed by an update in ANGLE that was causing a crash when running tst_QTableView::bigMode with a small screen size. With this fix the function will use the intersection of the supplied region with the paint device bounds. Change-Id: I2f0f0f7f5510688bfa1459320a0c146df6be65d1 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
| * | windows: Disable shader disk cache for all Intel GPUsLaszlo Agocs2018-10-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Follow up to dff9bb2f9b981e263d8d3d5b1ef67054297e731c Task-number: QTBUG-64697 Change-Id: I73a114dd3c75f3ed1272fa73dad378ecfdc0db09 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * | xcb: remove runtime check for xcb_poll_for_queued_eventGatis Paeglis2018-10-123-56/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xcb_poll_for_queued_event() was introduced in libxcb 1.8. The minimal required libxcb version was bumped up to 1.9 in 1f5d791708d5d256a76872f254251dac66e82cdb. Before this version bump we needed the runtime check to support older versions of libxcb. Updated connections in the event reader to use the new signal and slot syntax. Removed threadedEventHandling() method because now it is always 'true'. Change-Id: I0bce61fd478a871d35e676239ee5280c4f40be8a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-091-1/+0
|\| | | | | | | | | | | Change-Id: I5cbfd39cf728036bbdfdeec8e8739568e0a3025b
| * | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-10-081-1/+0
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qtimezoneprivate.cpp Change-Id: Icbb5999d378711ce3786a4fe0aba176a45ac702c
| | * Windows QPA: Fix WM_NCHITTEST not being sent to QAbstractNativeEventFilterFriedemann Kleint2018-10-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The message is not sent to the QAbstractEventDispatcher, so it needs to be excluded from the list of input messages not sent to QAbstractNativeEventFilter. Amends a0a22037cdacbf51a2db560ff902a5a341561b15. Fixes: QTBUG-70873 Change-Id: Id84d73b46e8954867c06a4ddf5dc9e536ecd897e Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-10-0818-50/+131
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qstylesheetstyle.cpp Change-Id: I3a503b44ae413fbc0a90f4af70b8f84daffd86ad
| * | Cleanup in eglfs device integration .pro filesSimon Hausmann2018-10-0511-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to apply QMAKE_LFLAGS_NOUNDEF in a .pro file that loads qt_module.prf or qt_plugin.prf, both of which do the same. Change-Id: I1ec86cddb4d0991becc136f8bd50d6652c885a6b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | Cocoa integration: fix incorrect keyboard mappingTimur Pocheptsov2018-10-041-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | When switching between different input sources, we have to update layouts. Task-number: QTBUG-50865 Change-Id: I0c23c19b79a2102dcc533822b0f861c387582c6c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | QCocoaKeyMapper: Properly initialize all members and reset on updateUlf Hermann2018-10-042-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously some of the members would have random initial values. Also, on updateKeyboard() if we don't find usable uchrData, we should just reset keyboard_layout_format and keyboard_mode, rather than keep the previous values. Task-number: QTBUG-50865 Change-Id: I1297fa55bb1593dd549d0bc122713d5d98f7b1fc Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | macOS: Don't call [NSOpenGLContext update] for every frameTor Arne Vestbø2018-10-032-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling update has a cost, and should only be done when the drawable object changes size or location. Instead of calling update each time makeCurrent is called, we listen for the appropriate notifications, limiting the number of update calls significantly. We still call update on the thread owning the QOpenGLContext, which is not ideal, as [NSOpenGLContext update] should only be called on the main thread, but in practice this works. Getting out of this situation is tricky, and setView has in theory the same problems. Until those problems have been solved we keep the behavior as is. Task-number: QTBUG-63572 Change-Id: Ibac9f8be7843f2aa006af6f7ee670bf027122440 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | macOS: Ensure QFontDialog picks up changes in NSFontPanelTor Arne Vestbø2018-10-031-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the font changes in NSFontPanel, it notifies NSFontManager via -[NSFontManager modifyFontViaPanel:], which in turn sends the font manager's action (by default changeFont:) to its target (nil, unless set). Sending the action in -[NSApplication(NSResponder) sendAction:to:from:] will sanitize the 'to' argument via _NSTargetForSendAction. If the argument is non-nill (if we've set the NSFontManager target explicitly), and we're running in an app-modal session (which we are), the target is checked for worksWhenModal -- a property which is defined on NSWindow, and only supposed to be set for subclasses of NSPanel. Since our QNSFontPanelDelegate class doesn't implement this method, the _NSTargetForSendAction function will return nil, and the action is never sent. If we don't set the NSFontManager target (leaving it as nil), the function will skip the worksWhenModal check, and fall back to resolving the target via the responder chain, which includes taking the NSPanel's delegate into account: #0 -[NSWindow delegate] () #1 -[NSWindow(NSEventRouting) supplementalTargetForAction:sender:] () #2 _objectFromResponderChainWhichRespondsToAction () #3 _NSTargetForSendAction () #4 -[NSApplication(NSResponder) sendAction:to:from:] () #5 -[NSFontManager sendAction] () ... Since we want to end up in the QNSFontPanelDelegate, we can rely on the default logic to resolve the target based on the responder chain. But in case _NSTargetForSendAction will at some point also check the resolved target for worksWhenModal, we also implement the worksWhenModal method, to be on the safe side. Fixes: QTBUG-69878 Change-Id: Ie739d016fe0efd17b3d8a99cc1fb1ace81807aff Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Windows QPA: Fix multiple mouse button presses detectionAndre de la Rocha2018-10-021-16/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The detection of multiple mouse button presses was broken in the new WM_POINTER-based implementation. The bug was due to the incorrect assumption that the press/release of a second mouse button (while another one is held) would also send WM_POINTERDOWN/WM_POINTERUP, while in fact it sends a WM_POINTERUPDATE with the actual event type given by pointerInfo->ButtonChangeType. Task-number: QTBUG-70787 Change-Id: Ib6776ab7f3d0b8eb5e832a0c863a15bde456e0dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | wasm: use config for natural scroll on safariLorn Potter2018-10-011-0/+29
| | | | | | | | | | | | | | | Change-Id: Idc2ee096144194e3f0d9ca165a578ff9745ef13d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | QCocoaWindow - close the underlying NSWindow before releasing itTimur Pocheptsov2018-10-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally, when deleting a widget, setVisible(false) calls -orderOut: and then ~QCocoaWindow will call -release, as a result the window will disappear from the screen and will be deallocated. But -orderOut: has no effect on minimized/iconified window. As a result, a 'zombie' window still can be seen on screen, while all Qt-thingies already deleted/dead. The similar behavior can be reproduced with a native NSWindow where we do not call -orderOut:/-close and only call -release. To fix this - we call -close. Task-number: QTBUG-70794 Change-Id: Iee8e1fc98018885f1f6e9628d966843d21ac7d38 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Add support for showWithoutActivating windowsJames McDonnell2018-10-023-7/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Includes pop-up windows which are implicitly showWithoutActivating windows. The QNX platform code was allowing screen to activate these windows when they were shown. Add code to activate showWithoutActivating windows when they are first touched or clicked on. From there, screen handles activation as it does for any other window. Change-Id: If443676e497a97724e16037b34d3db1d7c335790 Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-019-42/+78
|\| | | | | | | | | | | Change-Id: Ic8cdb1c2b7c0a786b1313b6c3a3bf7e9ec288712
| * | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-302-3/+5
| |\| | | | | | | | | | Change-Id: Iaa438d14357be1bf75bb645cb8d3245947c055b8