summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* QMacStyle - make focus ring less transparentTimur Pocheptsov2019-03-221-2/+8
| | | | | | | | | | But only for the 'Light' theme. For "Dark" the system color fits well (without our rather strange and random 0.5 we set for some reason). Change-Id: Ic5c8372913515611a567090f82852ffc7ca14eb7 Fixes: QTBUG-74095 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@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>
* | qtlite: Fix build the source code with -no-feature-shortcutMikhail Svetkin2019-02-252-0/+4
| | | | | | | | | | Change-Id: If47149466a5da901e3eb6e6f2dcfb0a7816bc60b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Properly convert filename to bytearray when sending over portalJan Grulich2019-02-211-2/+3
| | | | | | | | | | | | | | | | We should be using QFile::encodeName() to properly convert filenames from string to bytearray. This takes user's locale into account. Change-Id: I090f73f21feb73af166e88baa0e7f4a595cdb25b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | 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>
* macOS: Remove redundant tracking of modal sessions in QCocoaWindowTor Arne Vestbø2019-02-184-7/+9
| | | | | Change-Id: I43a40889b0731e4b480155256fc51eaa836e62a3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Modernize worksWhenModal handlingTor Arne Vestbø2019-02-185-59/+27
| | | | | | | The code in QCocoaEventDispatcher was dead and could be removed. Change-Id: I0c57e64791045d65033376c096220983059028ba Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Simplify QCocoaWindow::setVisibleTor Arne Vestbø2019-02-181-32/+18
| | | | | | | | | We don't need all the checks for the event dispatcher, it should always be there. Change-Id: Ib89a9c1c5524b49c2d85fae12425d19ced960597 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Remove dead code in window activation handlingTor Arne Vestbø2019-02-181-24/+0
| | | | | | Change-Id: I321ab68b51c4ba63204c0e15fec74164e2c93d34 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* winrt: Handle WaitForWindowExposedOliver Wolff2019-02-133-2/+24
| | | | | | | | | | | | | | | | | | | As winrt does not have native windows, exposure check was just done by checking, whether the window is the active window. If a window is shown fullscreen though, winrtscreen will be resized. This resize triggers a resize of every maximized or fullscreen window that is shown. If we enter or leave full screen mode, we have to wait until the screen resize and the subsequent window resizes are done and only then we can consider the windows properly exposed. This patch reverts 54bcb9d42f5ceaafcca426dc2a5cc25d299d5a3d and thus unblacklists tst_QGraphicsItem::cursor on WinRT. Fixes: QTBUG-73545 Change-Id: If469fce319ed6b3a5d56b7bf3cbc11929b72bb11 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* macOS: Add auto-release pool during QCocoaScreen::deliverUpdateRequests()Tor Arne Vestbø2019-02-121-0/+2
| | | | | | | | | Checking the application's keyWindow will autorelease the window, and there's no root pool in place when called from the display-link thread. Change-Id: Ic43164ad6397c92b858fb549f7a00e28b6110849 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows QPA: Handle mouse input using legacy messagesAndre de la Rocha2019-02-123-344/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change reverts to using legacy mouse messages when handling mouse and touchpad input, while using pointer messages to handle touchscreen and pen input. The use of pointer messages to handle everything, added in 5.12.0, caused issues in some particular cases, due mainly to differences in behavior or bugs in the pointer messages, which required workarounds in the Windows QPA, which didn't work well in all cases and led to additional issues. For instance, DoDragDrop() does not work when called by pointer (or touch/pen) handlers, but only after OS-synthesized legacy mouse messages are generated. Also, in some cases pointer messages for mouse movement are generated as non-client for client area events. Modal loops like the ones in window resize/move and menu handling caused some issues with pointer messages, as well. Also, we have to handle the OS-synthesized legacy mouse message generated for touch and pen. Ignoring them while letting the gui layer synthesize mouse events for touch/pen may break Drag and Drop by triggering DoDragDrop() before legacy messages, which can result in a hang inside the DoDragDrop() modal loop. This change should fix most regressions related to pointer messages, while keeping the enhancements in pen and touch input. Fixes: QTBUG-73389 Fixes: QTBUG-72624 Fixes: QTBUG-72801 Fixes: QTBUG-73290 Fixes: QTBUG-72458 Fixes: QTBUG-73358 Fixes: QTBUG-72992 Change-Id: I919f78930d3965270ef2094401e827ab87174979 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* macOS: Remove screen-update disable during resizeTor Arne Vestbø2019-02-121-34/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was needed as a workaround for the window border and window content becoming out of sync when we were drawing and flushing to the layer from another thread using OpenGL. Since we've disabled ThreadedOpenGL we can remove this workaround for now. The workaround also had other problems, as windowWillResize: did not turn out to be a reliable signal to know when a window was about to resize. Since we override windowWillUseStandardFrame:, we would not get the callback when zooming windows. Conversely, if we removed the windowWillUseStandardFrame: override, we would get a single callback for windowWillResize:, and then multiple callbacks that the window had resized. In addition, windowWillResize: is not only used as a callback, but also as a way to let the window delegate restrict the size, so it's called when e.g. AppKit determines the standard frame of the window -- an operation that doesn't involve an actual resize operation. If we re-introduce a workaround using screen-update disabling we need a better hook than windowWillResize:, and we need to track when we disable screen updates so that we can pair them up with corresponding screen update enables, otherwise we'll get log messages in the console about "SLSReenableUpdate: unbalanced enable/disable update". Change-Id: Ifca8892083c8666976391a4ada8f8d1471493943 Fixes: QTBUG-73726 Task-number: QTBUG-69321 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Don't rely on QGuiApplication::instance() during CVDisplayLink callbackTor Arne Vestbø2019-02-121-4/+1
| | | | | | | | | The display-link callback comes in on a secondary thread, so there's a possible race in using QGuiApplication::instance() to check whether or not we're on the main thread. Change-Id: Ic26bca8f5f54847a1e1b11dc92e786693c86e9de Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* macOS: Add explicit auto-release pool for requestActivateWindowTor Arne Vestbø2019-02-121-3/+3
| | | | | | | | | | The API is often called from main before entering the event loop, and the making the window first responder and key will autorelease both the window and view. Change-Id: Ie2a7dc14652015cbe802b57696e4a82d564e2dc0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* eglfs: avoid breaking builds without EGL_EXT_platform_baseLaszlo Agocs2019-02-122-1/+4
| | | | | | Change-Id: I9183e17b42c00435f20c00a414e1f20aa3972351 Fixes: QTBUG-72559 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* macOS: Don't send redundant geometry change events for top level windowsTor Arne Vestbø2019-02-111-0/+3
| | | | | | | | Top level windows already get their geometry changes via windowDidMove and windowDidResize. Change-Id: Ie6370aa290ef48c8b3ac770e77adb57ce43cbb47 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Treat default swapInterval (-1) as vsync-enabled display-linkTor Arne Vestbø2019-02-113-6/+12
| | | | | Change-Id: I6d3d241d3813bfac36155ad219d4a338cb1ef6f7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Simplify mouse trackingTor Arne Vestbø2019-02-112-33/+25
| | | | | | | | | | We don't need to react to updateTrackingAreas, as we only have a single tracking area that we can add once and forget. By asking AppKit to track all events in the visible rect, we can also pass a zero-rect for the tracking area. Change-Id: I2545712adc49b51904d5adc11f1faca36901b49d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Explain QNSViewMouseMoveHelper for future generationsTor Arne Vestbø2019-02-111-0/+16
| | | | | Change-Id: I61f38ee38d5afb657cd8b76b2b9dba1dac7167b4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* winrt qpa: Remove last windows phone leftoversOliver Wolff2019-02-084-40/+0
| | | | | | | | WINAPI_PARTITION_PHONE_APP is defined for all our winrt mkspecs nowadays so the code can be used unconditionally. Change-Id: I4f2b60a0b9bba5b407ebbc213c44a0e5b4057855 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Warn if OpenGL ES version is set to a value > 3.0Oliver Wolff2019-02-081-0/+4
| | | | | | | | | Our bundled ANGLE library only partially supports OpenGL ES > 3.0 so warn users that there might be dragons. Change-Id: I16711fe9f449e85dd8b2369e1fcec6c9f81d5ae0 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Miguel Costa <miguel.costa@qt.io>