summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
...
* Android: Fix deleting of new lines when using backspaceAndy Shaw2019-05-031-4/+22
| | | | | | | | | | | | With some keyboards (ASOP, SwiftKey) it was not deleting any new lines when using backspace. So this ensures that it is correctly deleting at these points. Tested with the Samsung, Gboard and SwiftKey keyboards. Fixes: QTBUG-74824 Fixes: QTBUG-57798 Change-Id: Id2e4f96c18c3fec0e7f444b55dd3db2653625fd0 Done-with: Vova Mshanetskiy <vovams163@gmail.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Windows QPA: Fix blank Cursor on secondary displaySimeon Kuran2019-04-271-10/+12
| | | | | | | | | CreateCursor only works with standard sizes (32, ...) depending on the display hardware. No longer apply the scale factor for the blank cursor, because it might lead to unsupported cursor sizes resulting in random pixels. Change-Id: I48d84bd913d2dd8f62129126c9a41e58ee2cbcae Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* macOS: Gracefully handle devicePixelRatio mismatch in QCALayerBackingStoreTor Arne Vestbø2019-04-192-3/+21
| | | | | | | | | | | | If the client of the backingstore fails to pick up dpr changes, and tries to flush the backingstore without a repaint, we will end up flushing a back-buffer with a stale dpr. Detect when this happens, warn the user, and smooth out the situation by adjusting the layer accordingly. Change-Id: If4596a8976a3902252c81d8e28c7aeb9fdd908bf Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Windows QPA: fix media keys losing autorepeat/keycode informationAndre de la Rocha2019-04-181-12/+8
| | | | | | | | | | | For WM_APPCOMMAND messages that also trigger WM_KEYDOWN/WM_KEYUP, let the latter messages be handled, instead of stripping them and synthesizing a press/release from the command code, in order to get the correct scan codes and autorepeat info. Fixes: QTBUG-73879 Change-Id: I936cd76be87a76dc6b6223eeb246e4e7aee3a4ac Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.12.3' into 5.12Qt Forward Merge Bot2019-04-171-8/+27
|\ | | | | | | Change-Id: I2816cb8a3cbc4a2cf5ca5f333a1fddc245b3c06a
| * Fix QTabletEvent::uniqueId() when Qt uses WinInkv5.12.3Dmitry Kazakov2019-04-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new 'pointerId' is assigned to the stylus every time it enters tablet's proximity. But applications expect this ID be constant, at least during one application run. Therefore, it needs to use 'sourceDevice' instead. Basically, WinInk doesn't have an ability to distinguich two different styluses connected to the same tablet. We cannot do anything about it, it is supported only in WinTab. Task-number: QTBUG-74700 Change-Id: I8328f1e5102b037b370082e69e965ab68b487882 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
| * Windows QPA: Fix mouse button reported in non-client eventsAndre de la Rocha2019-04-081-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | The current mouse buttons state was being retrieved from WPARAM for all mouse messages. However, for non-client messages this parameter contains unrelated information, which resulted in non-client events reporting incorrect button state. Changing it to retrieve state using GetAsyncKeyState() for non-client messages, like in the legacy mouse handler implementation. Fixes: QTBUG-74649 Change-Id: Ia246164208707072e584dd521697e9d31d3e65ad Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows QPA: Fix custom drop formats being ignoredAndre de la Rocha2019-04-161-6/+16
| | | | | | | | | | | | | | | | | | | | | | Changes QWindowsDropDataObject to only ignore non-CF_HDROP formats when the drop contains only "text/uri-list" mime data, and the URIs are for local files, to avoid messing with custom formats set by the developer, while still fixing the case reported in QTBUG-62662. Fixes: QTBUG-74232 Change-Id: I946ced222377716876d0aea54b3eb05d40e7fa44 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Fix setting Qt::WA_ShowWithoutActivating on eglfs windowMichal Klocek2019-04-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | WebEngine HTML based popups depends on setting Qt::WA_ShowWithoutActivating, to keep forwarding events to chromium event handling. This works well with xcb, windows or coca windows backends, however was not respected on eglfs. Add check before activating the window. Task-number: QTBUG-69533 Change-Id: I66b249ec497af890c8a2228eee3bac3c806e77ed Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Fix threaded QOpenGL when robustness is requestedAllan Sandfeld Jensen2019-04-161-1/+3
| | | | | | | | | | | | | | | | | | If the shared context had robustness set then all child contexts must as well, otherwise we will fallback to a non-shared context breaking threaded rendering. Change-Id: Ie5526e632ad21289b6164c1ca06e54ec714187c7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | eglfs: Call destroy() from dtors of concrete windowsUlf Hermann2019-04-164-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | Calling destroy from the QEglFSWindow dtor() triggers the virtual invalidateSurface() to be called on a partly destroyed object. As the child windows deregister themselves from their screens on invalidateSurface() this is dangerous: It leaves a dangling pointer in the screen. Fixes: QTBUG-75075 Change-Id: Idd3fea18562d41973f364340df875a50dbd5691e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Windows QPA: Fix QComboBox accessibility with screen readersAndre de la Rocha2019-04-123-2/+39
| | | | | | | | | | | | | | | | | | | | | | | | Screen readers like NVDA and Narrator were not reading the contents of a QComboBox when changing its value using the keyboard, without expanding it, due to missing UI Automation notifications in this case. This change should also help in other cases where updated string values were not notified to screen readers. Fixes: QTBUG-75066 Change-Id: Id7f488380aec5ad27fd11b3cf854d44ab1b28688 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | macOS: set layer.delegate when setting a layerMorten Johan Sørvig2019-04-101-0/+1
| | | | | | | | | | | | | | Fixes flicker with Qt 5.12.2 on macOS 10.14.4. Change-Id: Ibb866d4339ecafae5fb573a653a2fb0f6238d704 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Windows QPA: Fix Drag and Drop of images onto MS PowerPointFriedemann Kleint2019-04-091-1/+4
| | | | | | | | | | | | | | | | Use the PNG format only for transparent images. Fixes: QTBUG-64322 Change-Id: I5e02132ca446876e20fcf46f2ef8daa599e85e71 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
* | Windows QPA/File dialog: Pass up http[s] URLsFriedemann Kleint2019-04-081-12/+27
| | | | | | | | | | | | | | | | | | | | The native Windows allows for typing in http[s] URLs directly (without checking existence). Pass these up. Fixes: QTBUG-71785 Change-Id: I60237bab596ca3f52e6f513f17544ff94e9080da Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Windows QPA/File dialog: Refactor code copying non-file shell itemsFriedemann Kleint2019-04-051-25/+63
| | | | | | | | | | | | | | | | | | | | | | Remove the canCopy() check which is not required and pass up the error message. Remove special characters and use the base name of the display name which can be an URL. Task-number: QTBUG-71785 Change-Id: I22966cb8d1f5bca0bbca71cf3ebe66e4ede1a747 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
* | Windows QPA/File dialog: Avoid UI hangs caused by empty resultsFriedemann Kleint2019-04-041-1/+3
| | | | | | | | | | | | | | | | | | Typing in invalid URLs results in empty result lists. Emit rejected() in this case. Task-number: QTBUG-71785 Change-Id: Ia257b85a5c4370227f753752f6a473bbb3a054be Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | macOS: Disable explicit layerContentsPlacementTor Arne Vestbø2019-04-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was needed to allow lazy resize of the backingstore IOSurfaces, but that feature hasn't been enabled yet, and explicitly setting the layer's contents placement to NSViewLayerContentsPlacementTopLeft resulted in the layer animating when the window was moved from screens of different scale factors. We need to investigate this further, but in the meantime fix the visual regression by disabling the explicit layer contents placement. Change-Id: I63ea1eab9cf3fa6480e88844918ed98e6aa72620 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Fix tablet jitter on X11Dmitry Kazakov2019-04-011-0/+30
|/ | | | | | | | | | | | | | | | | | We should get the correct stylus position from the valuators, not from the X11-provided global position. Global position is rounded to the nearest FP16 values, which is not enough for smooth painting. [ChangeLog][Platform Specific Changes][X11 / XCB] QTabletEvent coordinates now come from AbsX/AbsY valuators in the X11 event, in more precise 32.32 fixed-point format, scaled to fit the virtual desktop. It's possible to revert to using the legacy 16.16-format event_x/event_y coordinates as in previous releases by setting the QT_XCB_TABLET_LEGACY_COORDINATES environment variable. Task-number: QTBUG-45375 Fixes: QTBUG-48151 Change-Id: Ie701446b3586296bcb8fb09158f387ba6a7cbf07 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* macOS: Use the correct text color for QPalette::ButtonText color roleYan Shapochnik2019-03-251-0/+3
| | | | | | | | Fixes the text color displayed in the QToolBar on macOS Mojave dark mode Change-Id: Ic4415295e314a8fc1c4fbb58964386e0563b8d44 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Cocoa: Clear the shortcut used when hiding a native menu entryAndy Shaw2019-03-211-0/+3
| | | | | | | | | | The shortcut needs to be cleared if the native menu entry is being hidden due to the fact it was changed. Otherwise it will not show the shortcut anymore as it sees it as in-use. Change-Id: Ifb10db855766e4de71db06ea006f6d63497f3193 Fixes: QTBUG-74113 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Windows: Fix tooltip flicker on GL surfacesFriedemann Kleint2019-03-211-1/+2
| | | | | | | | | | | | | | | | QPlatformWindow::initialGeometry() would assign a default height to the initial geometry of the QRollEffectClassWindow since it has height of 0. This causes the obtained geometry to not match and subsequently a geometry change being sent synchronously. Introduce a new flag QWindowPrivate::resizeAutomatic similar to the existing QWindowPrivate::positionAutomatic to prevent assigning a default size and pass through the geometry as is where required. Fixes: QTBUG-74176 Change-Id: I70c66490838a2c4dfe200ec86094d28bd984dd03 Reviewed-by: Kati Kankaanpaa <kati.kankaanpaa@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix aliased font rendering in native xcb modeEirik Aavitsland2019-03-211-0/+7
| | | | | | | | | Freetype creates 1bpp bitmaps in msb order, while XRender expects lsb order. Change-Id: If8dd8e07c424df2d135f56f1ce105ef94963f536 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* X11PaintEngine: Don't use system clip for non-system paintingEskil Abrahamsen Blomfeldt2019-03-204-4/+29
| | | | | | | | | | | | | | | | | When painting into a pixmap, we would apply the system clip, which is a rectangle that starts at the position of the current widget relative to the window. If the widget was not positioned at (0,0), we would therefore clip the top left part of the drawing when drawing into a pixmap, which is obviously not intentional. The solution is in accordance with how it is done in e.g. the OpenGL paint engine, where useSystemClip is set to true only if we are drawing to a widget. The system clip should otherwise be ignored, so we do that in the X11 paint engine as well. Task-number: QTBUG-70387 Change-Id: I9cad26019970280a8a452dc6f1015d229120cac5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Move screen maintenance functions from QPlatformIntegration to QWSITor Arne Vestbø2019-03-1932-93/+69
| | | | | | | | | | | | | | | QWindowSystemInterface is the de facto API for any plumbing going from the platform plugin to QtGui. Having the functions as protected members of QPlatformIntegration was idiosyncratic, and resulted in awkward workarounds to be able to call the functions from outside of the QPlatformIntegration subclass. The functions in QPlatformIntegration have been left in, but deprecated so that platform plugins outside of qtbase have a chance to move over to the new QWSI API before they are removed. Change-Id: I327fec460db6b0faaf0ae2a151c20aa30dbe7182 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Windows QPA: Make the expected screen be in sync with the geometry changesAndy Shaw2019-03-191-5/+5
| | | | | | | | | | | | When the window moves to a new screen then we should ensure the screen is updated at that point with the new size so it can account for any scaling changes. This reverts f1ec81b543fe1d5090acff298e24faf10a7bac63. Change-Id: I2be3aab677c4677841a07beaaf373f498483b320 Fixes: QTBUG-72504 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Avoid warning about the deprecation of QString::QString(const char*)Jesus Fernandez2019-03-181-1/+1
| | | | | | | | | | Fixes the warning: ‘QString::QString(const char*)’ is deprecated: Use fromUtf8, QStringLiteral, or QLatin1String [-Wdeprecated-declarations] return new QEglFSKmsEglDevice(this, screenConfig(), deviceName); ^ Change-Id: I36654f40219bf0f487e70cf2900d3f30335d4fc1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Merge remote-tracking branch 'origin/5.12.2' into 5.12Qt Forward Merge Bot2019-03-152-2/+23
|\ | | | | | | Change-Id: I5f9d8090a07056411fb65d7de60eb679d00e99a3
| * 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>
| * Blacklist nouveau and llvmpipe for multithreadingAllan Sandfeld Jensen2019-02-261-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | After removing Mesa drivers from being blank blacklisted, we still need to blacklist nouveau specifically due to their lack of proper locking: https://bugs.freedesktop.org/show_bug.cgi?id=91632 llvmpipe is similarly blacklisted for now, as we lack enough information to know if the underlying issue behind QTCREATORBUG-10666 has been solved. Fixes: QTBUG-73715 Change-Id: I1a60b562cd9db94fa8462b922d6bfeebf0088dc5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Fix link error on linuxBogDan Vatra2019-03-151-1/+2
| | | | | | | | | | | | | | | | | | On debian buster (using gcc 8.2) I'm getting link error: ...86_64-linux-gnu/libdl.so /usr/lib/x86_64-linux-gnu/libEGL.so /usr/bin/ld: .obj/qxcbeglintegration.o:(.data.rel+0x8b8): undefined reference to `typeinfo for QXcbBasicConnection' Change-Id: I4c2b5aad8eac44737982d68f46fbc80e3b830668 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | macOS: Add IOSurface based backingstore for layer-backed viewsTor Arne Vestbø2019-03-147-113/+769
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The naïve approach used for layer-backing in the past caused a detach of the backingstore QImage on each beginPaint, since the image was assigned to the layer via a CGImageRef that participated in the QImage implicit sharing (and had to, so we couldn't get around that). We now use IOSurfaces, wrapped in a QPlatformGraphicsBuffer abstraction. The surfaces can be assigned to the layer's content the same way images could, but allows us to reason more closely about whether or a buffer is in use, and increases the chance that we will have a zero-copy path to the screen. Unless the window has requested a surface format with single buffering we use a dynamic swap chain of buffers. In most situations there will be two buffers in play, one assigned to the layer and one ready to paint to, but during resize and some other situations the buffers will grow temporarily to accommodate the increased back-pressure. Since QBackingStore is documented as having single-buffer behavior, we take care to persist content between the buffers before every swap. By doing this before swapping, instead of before each paint, we can avoid preserving areas that will be painted to anyways, and will in many situations (such as blinking cursors e.g.) end up not persisting anything. The RasterGL surface case is handled by reading out the buffer data and doing a manual texture upload. In the future we can support direct texture access via CGLTexImageIOSurface2D, but this requires QPlatformBackingStore::composeAndFlush to learn how to support other targets than GL_TEXTURE_2D, as CGLTexImageIOSurface2D only works with GL_TEXTURE_RECTANGLE_ARB targets. Fixes: QTBUG-48763 Fixes: QTBUG-72360 Fixes: QTBUG-71162 Change-Id: Ica12f69b244e54d0fd31c929730d15657c286af8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Windows QPA: only calculate invisible margins when window has a frameChristian Andersen2019-03-142-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit ec97be5585 an invisible frame calculation was added for Windows 10 that fixes QWidget::move(0,0) for main windows and dialogs. But because e.g. Qt::ToolTip windows do not have a window frame, the invisible margin calculation causes them to pop-up in the wrong position (off by a few pixels). [ChangeLog][Windows] Fixed QToolTip pop-ups and QComboBox animation pop-ups being off by a few pixels on Windows 10. Fixes: QTBUG-74062 Change-Id: I218e8409a250a8b81ecd1d409b597ebd01fb255f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows QPA: Output all adapters in diagnostics used by qtdiagFriedemann Kleint2019-03-144-41/+104
| | | | | | | | | | | | | | | | | | | | | | | | Split up the code detecting the GPUs into small helpers. Add a QDirect3D9Handle class providing Direct3D9 functionality, add GpuDescription::detectAll() and add a QVariantList "gpuList" property to the native interface. Task-number: QTBUG-50371 Task-number: QTBUG-65882 Change-Id: I8673542d327837babc2ad8f507da76e8ff5524ea Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | XCB: Fix clipboard breaking when timer wraps after 50 daysLukáš Turek2019-03-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xcb_timestamp_t is a 32-bit unsigned value in miliseconds, so it wraps after 49.7 days. When it happens, QXcbConnection::m_time stops updating and copy & paste in an application would not work until the application is restarted. This patch detects the timer wrap and allows m_time to wrap too. The fix was verified in KDE desktop with applications running for 51 days. Fixes: QTBUG-65145 Change-Id: I328c4179c1b1f71914adda6f9a0ca3991a7e808e Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | QNX QPA: Add support for Qt Virtual KeyboardKarim Pinter2019-03-142-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | If the QT_IM_MODULE environment variable is set, then it loads the IM module accordingly, otherwise it is using the PPS one, if it is available. Task-number: QTBUG-54576 Change-Id: Icb8b474805053d8297029096365783c2cabc2cbc Reviewed-by: Samuli Piippo <samuli.piippo@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com> (cherry picked from commit 8a7c373f8e745427d5fe7afc08d698837b7b8f2b) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | iOS: Fix broken application background trackingTor Arne Vestbø2019-03-091-1/+2
| | | | | | | | | | | | | | | | | | | | e0e1c7ec2da12 amazingly both removed and inverted key parts of the logic for tracking the background state of the application. Fixes: QTBUG-74272 Change-Id: I9a9e8720f32e8228d27ee6b6a1fb35e5f7b7cedc Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | macOS: Improve mouse loggingTor Arne Vestbø2019-03-053-10/+35
| | | | | | | | | | Change-Id: Icc81f73e728d9b3669afc37b0c1ef73588f24749 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | macOS: Modernize qnsview_dragging.mmTor Arne Vestbø2019-03-051-55/+45
| | | | | | | | | | | | | | Style fixes, modern Objective-C usage, and use of convenience APIs. Change-Id: I04801b0b5f0d2213b4bcf1b0158fc32e57432d28 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | macOS: Initialize QNSView mouse related members with other mouse logicTor Arne Vestbø2019-03-022-9/+13
| | | | | | | | | | | | Change-Id: I4ff67028823d62ed67bf4303a58bee127bd76501 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Terminate Qt gracefullyBogDan Vatra2019-02-282-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the application is closed via the task manager on Android then we need to ensure that that the application can close down any running event loops. So we wake up all the event loops and then call quit() directly on the application object to start a graceful termination of the application. In order to aid the graceful termination of Qt then a check is added to ensure that it does not try to create a new surface when the application is suspended. This prevents it from locking while trying to create a new surface when this is not possible. Fixes: QTBUG-70772 Change-Id: I6795b3d280e178d7f1207004a1b965a31a0cc9e9 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Segfault when the exiting the application under platform eglfsElena Zaretskaya2019-02-273-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you run an application under eglfs, it falls with segfault on the exit. For example, examples/gui/analogclock, examples/widgets/widgets/analogclock, examples/opengl/cube, examples/opengl/qopenglwidget, etc. (I have added the function keyPressEvent to exit by qApp->quit(), if needed). It isn't appear in applications using QQuickView or QGLWindow. This is because QCoreApplication destructor, where the variable self = 0 (therefore, qGuiApp = 0), is called before than QOpenGLVertexArrayObject::destroy(), where qGuiApp is accessed (qGuiApp->thread()). Task-number: QTBUG-73824 Change-Id: I1dc55d5e811bfe8a8ea2178752e8771f8644d356 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Windows QPA: Fix override cursor when modal window is presentFriedemann Kleint2019-02-271-0/+6
| | | | | | | | | | | | | | | | | | | | Handle WM_SETCURSOR to apply override cursors to window that do not have mouse capture (as is done in Qt 4). Fixes: QTBUG-58590 Change-Id: I7ff6f799da1b8d4b4396c0a6137778a11a192617 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
* | Haiku: Fix mis-spelled module in .proFriedemann Kleint2019-02-261-1/+1
| | | | | | | | | | | | | | | | Fix warning: Project ERROR: Unknown module(s) in QT: eventdistpatcher_support-private Change-Id: Ic74481621c541fc0a13640c5e5cae2df44ffb091 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Windows QPA: Generate proper event when dragging item outside windowAndre de la Rocha2019-02-251-7/+18
| | | | | | | | | | | | | | | | | | | | | | When an item was dragged outside the window, the mouse release event was not being properly delivered and the item would stick to mouse cursor after moving it back into the window. Fixes: QTBUG-72994 Change-Id: Ibce990390c866e16d58f7d969673dd05e862d97e Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | macOS: Decouple screen property updates from application delegateTor Arne Vestbø2019-02-203-12/+4
|/ | | | | | | Change-Id: I489c37131bf715d45f147964de4a8cd8c02adbcb Fixes: QTBUG-72966 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Remove special handling for hiding tool windows on application hideTor Arne Vestbø2019-02-202-36/+5
| | | | | | | | | | | | | | The code was needed when we had QCocoaWindow::hide(), that guarded the ordering out by checking the visible state of the NSWindow. We no longer have that method, and setVisible doesn't have the same guard. Added a comment in setVisible to prevent future travelers from adding logic that introduces the same situation. Change-Id: I0514619a303daceb1cd7d334f0de4bfce6c3e96f Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Android: Add support for getting the UiLanguagesAndy Shaw2019-02-191-0/+18
| | | | | | | | | | | From API 24 it is possible to get the UiLanguages correctly from Android so if API 24 or later is available we should use this. If it is not available, then it will fallback to the original behavior of using the system language. Fixes: QTBUG-68019 Change-Id: I4cfbc2b807b361c08da56a74100ba59abf5f2d0f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* macOS: Set up platform window reference before initializing QNSWindow/PanelTor Arne Vestbø2019-02-184-25/+39
| | | | | | | | | Initializing the window will end up in [NSWindow _commonAwake], which calls many of the getters. We need to set up the platform window reference first, so we can properly reflect the window's state during initialization. Change-Id: I5349273b1930ee8a57dc518db74be90d2426f61c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Implement QNSWindow/QNSPanel mixin using preprocessor includesTor Arne Vestbø2019-02-182-103/+75
| | | | | | | | | | | | | | We want to share the implementation between the two classes, but Objective-C doesn't natively have a mixin-feature. Instead of using dynamic super-calls at runtime (which worked fine, but added complexity), we now do the mixin at compile time using the preprocessor. The dynamic-super feature is left in, in case we need it in other areas in the future. Change-Id: I95dfa7f18cba86cc518e963dd018944ef113ac06 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>