summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
* Fix broken QIOSContext setup due to missing 0-initialization of EAGLContextTor Arne Vestbø2015-12-101-3/+4
| | | | | | Change-Id: Ia4dbb2e3b055a7899c4a3e02698c5776ea7f73ea Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* xcb: compare to previous state when sending geometry and expose eventsTor Arne Vestbø2015-12-101-6/+27
| | | | | | | | | | | | | | | | | | | By calculating the previous geometry and passing it on when calling handleGeometryChange we can detect cases where setGeometry() on a QWindow didn't result in the expected geometry. The new (actual) geometry is delivered as a resize event. This also allows us to only send expose events when the size of the window has actually changed (instead of also sending when the window has just moved). Due to the async delivery of geometry changes on the xcb platform we need to avoid using QWindowPrivate's cached state of the geometry, as that will result in duplicate resize events when events are not flushed in between two system resize events coming in with the same size. Change-Id: I3d4abe4a1095dd96e6e354288d5b646c623c30dd Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* XCB: prevent a fp division by zeroGiuseppe D'Angelo2015-12-101-4/+7
| | | | | | | | | | | For certain devices vci->resolution is zero, which causes a SIGFPE if FE_INVALID exceptions are enabled. Try to prevent that. Task-number: QTBUG-42717 Change-Id: I388735f5dfb6218496787dbb74cf0c0f43cc928f Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru> Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* iOS: filter edit menu actions depending on selection stateRichard Moe Gustavsen2015-12-091-0/+26
| | | | | | | | | | | | When showing an edit menu on iOS, UIKit will always populate the menu with actions according to what the current first responder supports. But it doesn't make sense to show all the actions every time the menu opens, so introduce some filtering depending on selection state. Change-Id: I943a09928233a3a10de003fe15ed8fd8b6fc1e18 Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: support edit action 'select'Richard Moe Gustavsen2015-12-091-0/+7
| | | | | | | | | Now that we don't populate the edit menu from qtquickcontrols anymore (because of shortcut issues), report to UIKit that we support select so that the action shows in the menu. Change-Id: I92508da4e1789c361d778cc6c1c77c86308f4c73 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Favor OpenGLES 3 on iOS if availableMike Krus2015-12-091-3/+5
| | | | | | | | | | | | First tries OpenGLES 3 context since it’s strictly compatible with OpenGLES 2. If it fails, then try 2. This is required to use QOpenGLFramebufferObject::blitFramebuffer without having to look at using an Apple-specific extension. Change-Id: I01f8f058fa82e7f2c90d1b894ad36f3d3939c994 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* QWinRTFontDatabase: Add "Arial" as alias for "Helvetica".Friedemann Kleint2015-12-092-0/+16
| | | | | | | | | Otherwise, the first font from the list is used ("Algerian" or similar), making the widgets/richtext/textedit example look bad. Change-Id: Ia5bb8879f167fef7ad7e81611760ee042abf8da3 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* WinRT: Prepend '.' to default file suffix.Friedemann Kleint2015-12-071-2/+4
| | | | | | | | IFileSavePicker::put_DefaultFileExtension() fails when the '.' is missing, causing the QtWidgets-based dialog to show up (Windows 10). Change-Id: Ifcb870431b792ffa8e4a608dec999225e8383fa9 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Android: Implement QInputMethod::keyboardRectangleOlivier Goffart2015-12-073-3/+33
| | | | | | | | | | | | | | | | | We can use getWindowVisibleDisplayFrame to know the height on the keyboard, and we can use getLocationOnScreen to find out how much the view is scrolled. Since onPreDraw is always called when the view is scrolled or when the keyboard appears or disapear, we can call the native functions from there. This is not working for floating keyboards. [ChangeLog][Android] Implemented QInputMethod::keyboardRectangle Task-number: QTBUG-40731 Change-Id: I7848eb34fece410b29a06bf0bbb2313112fffa68 Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Respond with a sound for certain message boxes on windowsJan Arve Saether2015-12-043-1/+5
| | | | | | | | | | | | | | | This was a regression (it worked in 4.8) that was probably introduced by the refactoring of the accessibility framework in Qt 5. Now, QPlatformAccessibility::notifyAccessibilityUpdate() is called regardless of isActive(), so its the responsibility of each implementation of notifyAccessibilityUpdate() to check for isActive() where it matters. Task-number: QTBUG-33303 Change-Id: I0d18f8c1890ef679460408b05e704712b886bf7c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* WinRT/QMessageBox: Default to QtWidgets-based dialog for rich text.Friedemann Kleint2015-12-041-0/+5
| | | | | | Change-Id: I071810cc5bc2773df9f6202c4547379d3ecd8b5c Reviewed-by: Andrew Knight <andrew.knight@intopalo.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* windows: enable drop for embedded windowsTim Blechmann2015-12-041-1/+11
| | | | | | | | | | | | | when embedding a QWindow into a native win32 window hierarchy, dragndrop is not working, as RegisterDragDrop is not called. the parent HWND is wrapped via QWindow::fromWinId(), which is topLevel, but a Qt::ForeignWindow. it's children are not topLevel. we therefore add a conditon to call RegisterDragDrop on non-topLevel windows whose parent is a Qt::ForeignWindow Change-Id: Id2bfa1130857c21566feae9cb10b62b648d86a72 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* eglfs: Fix the logical dpi calculation for some devicesLaszlo Agocs2015-12-023-8/+23
| | | | | | | | | | | | | | KMS and backends using the default logicalDpi() implementation (EGLDevice for instance) did not correctly check if the physical width and height are greater than zero. The result is a NaN dpi on systems where the drivers report a zero size. This in turn breaks font rendering and various other things. isValid() is changed to !isEmpty(). This way we check for width and height > 0 instead of >= 0. Change-Id: I8cdcf93a116379ae33c65599ad792a3b712518a3 Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
* Differ between vertical and no hinting on WindowsEskil Abrahamsen Blomfeldt2015-12-023-5/+15
| | | | | | | | | | | | | | | | | Symmetric text rendering seems to be the equivalent to no hinting at all since it does subpixel antialiasing in both horizontal and vertical directions. Let people select non-symmetric, natural rendering as well, by setting vertical hinting on the font. This is the mode used for many UI elements in newer versions of Windows (like the title bar of windows etc.) [ChangeLog][Windows] Added differentiation between vertical hinting and no hinting in DirectWrite font engine. Task-number: QTBUG-48546 Change-Id: I2f75ae2d16fdf26706587d92da43daf29afbbcf2 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* DirectWrite: Inherit synthesized properties for fallback fontsEskil Abrahamsen Blomfeldt2015-12-021-1/+12
| | | | | | | | | | | | | When a fallback font is selected, we need to copy out the properties from the main font which can be synthesized by the font engine. In particular, this is weight > normal, and oblique style. This is the DirectWrite equivalent of a856c4a902816a7d691ca50e6f556521287be441. Change-Id: I5d1215c66a433c8a8029c06e7a3dcee287f3f76f Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Windows: Load DirectWrite dynamically.Friedemann Kleint2015-12-022-16/+37
| | | | | | | | DirectWrite is not supported on Windows XP. Task-number: QTBUG-49711 Change-Id: Ie1df6250814226d53fe4fb3a1c6bd024f6018796 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Windows QPA: Fix window state transition from minimized to normal.Friedemann Kleint2015-12-011-1/+1
| | | | | | | | | | Use SW_SHOWNORMAL instead SW_SHOWNOACTIVATE as a parameter to ShowWindow() to enforce the window to be restored to normal state, even if the state before minimized was maximized. Task-number: QTBUG-48449 Change-Id: I9436623b1495f574a72050e50e8b31bfc83ced5c Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* Avoid dynamic switching between backingstore composition pathsLaszlo Agocs2015-12-012-0/+3
| | | | | | | | | | | | | | | | | | Make it opt-in because doing a normal backingstore flush does not seem to work on Cocoa once we use OpenGL on the window. Windows and Linux should be able to cope with this. This means that platforms outside Windows and Linux will continue to have the problem of having GL-based compositing enabled for ever after having a QOpenGL/QuickWidget shown in the window once, but the issue is most prevalent on Windows anyway, OS X machines can deal with OpenGL better in general. Task-number: QTBUG-49172 Change-Id: I30fd2efa95cc4f6eed9cf7f7613d0750355c775c Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Rename ANGLE libs in order to not conflict with other ANGLE libsJan Arve Saether2015-12-012-8/+12
| | | | | | | | | | | | | | | | This is needed to be able to use Qt (with dynamic ANGLE) in a plugin while the host runs a different version of Qt (and ANGLE). In addition to changing the LIBEGL_NAME and LIBGLESV2_NAME variables you also need to update the value of the LIBRARY definition in the .def files for ANGLE: qtbase/src/3rdparty/angle/src/libGLESv2/libGLESv2[d?].def qtbase/src/3rdparty/angle/src/libGLESv2/libEGL[d?].def Task-number: QTBUG-48431 Change-Id: Idd00d039ba3e20cc0ec7496bee36ed1c90383b0d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Don't use QT_AUTO_SCREEN_SCALE_FACTORMorten Johan Sørvig2015-11-301-1/+2
| | | | | | | | | | | | With the addition of Qt::AA_EnableHighDpiScaling testing of the env. variable only is no longer sufficient. Use QHighDpiScaling::isActive() instead, which is available at the time loadAndroidStyle is called. Change-Id: Iaa6bbb5a04a71fa3bd68f3bdc8c8bcdfb5d1778f Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* QtBase: combine adjacent qDebug()/qCritical() linesMarc Mutz2015-11-281-2/+2
| | | | | | | | | For qDebug() and qWarning(), this is just an optimization. For qCritical(), which can be fatal, the old code was just wrong. Change-Id: I6d8ab1d7531d766cd41b49569dc0fd4420ecab8b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QtBase: remove explicit function info from qWarning() etcMarc Mutz2015-11-2831-253/+253
| | | | | | | | | | | This information is already registered by the QMessageLogger ctor. Where, by dropping the << Q_FUNC_INFO in ostream-style qDebug(), only a string literal remained, converted to printf-style qDebug() on the go. Change-Id: I3f261c98fd7bcfa1fead381a75a82713bb75e6f3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Windows: Open GL blacklist - Disable rotation for Intel HD Graphics 4000 / 5500.Friedemann Kleint2015-11-271-0/+12
| | | | | | | | The driver causes crashes when switching orientation in full screen mode. Task-number: QTBUG-49541 Change-Id: I8293d4b2f2981fa627654d06894a74c922304ac3 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Windows Open GL blacklist: Introduce keyword "disable_rotation".Friedemann Kleint2015-11-273-5/+21
| | | | | | | | | | | Add a flag to disable rotation to the Renderers enumeration of QWindowsOpenGLTester triggered by the keyword "disable_rotation". Specifying this keyword forces the application to landscape mode for Desktop GL. It is intended for drivers that have issues with rotation. Task-number: QTBUG-49541 Change-Id: I0f0bb7415c59e98648be09b34a59dd201d52b211 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Windows QPA: Add API for setting the application orientation preference.Friedemann Kleint2015-11-274-1/+81
| | | | | | | | | | Dynamically load the Win32 API functions for setting the rotation preference and map this to static functions taking a Qt::ScreenOrientation in QWindowsScreen. Task-number: QTBUG-49541 Change-Id: I1c81cf6274d79a023a2ee755dd7c085ffd7cc015 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-11-271-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_p.h src/network/ssl/qsslsocket_mac.cpp src/network/ssl/qsslsocket_mac_p.h src/widgets/kernel/qwidget.cpp Change-Id: I39592cb37d710dfaf8640769ba3c1b637927d7f4
| * iOS: always flush spontaneous key press eventsRichard Moe Gustavsen2015-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we changed sending key events through QPA instead of directly to the focus object, we only flushed from deleteBackward (06be9f026). The reason was to avoid unnecessary flushes, as this in general can be a source to recursion problems. It turns out that this is also needed when sending Qt::Key_Return. The reason is that we sometimes resign first responder when the return key is pressed, which will also change the focus object in Qt. And without flushing the key event first, it will be processed after the change and therefore end up at the wrong object. It seems like the most sensible thing is to always flush upon receiving spontaneous key/text events from iOS, which is also how it was before. Task-number: QTBUG-49021 Change-Id: I44885a11275dee5039ef6a8abbcbdadc092695e7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Avoid pulling in X11 headers in brcm backendLaszlo Agocs2015-11-261-0/+3
| | | | | | | | | | | | | | | | | | | | In some configurations we may end up using Mesa's EGL headers instead of the Broadcom ones. Make this work by setting the usual define to prevent including Xlib headers that then conflict with all sorts of things in QtCore. Change-Id: I4970553428e5b0e81bd76694980f3b6b194ae4c2 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* | Fix potential division by zero.Nicolas Capens2015-11-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | In a Chrome Remote Desktop session the htotal and/or vtotal timings can be zero and lead to a SIGFPE exception. Task-number: QTBUG-49322 Change-Id: Id530335cc760d1938ed888ad095427fcf32c651d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Nicolas Capens <nicolas.capens@gmail.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
* | iOS: Add support for delivering touch pressure on iPhone 6s/6s+ devicesTor Arne Vestbø2015-11-262-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As 3D touch can be disabled/enabled at runtime on those devices, we need to watch for changes to the relevant settings and update the touch device capabilities that we report to the user. Note that iOS will deliver touchesBegan with a touch force of 0, which we will reflect/propagate as a 0 pressure, but there is no clear alternative, as we don't want to wait for a touchedMoved before sending a touch press event to Qt, just to have a valid pressure. Change-Id: I47fb8a9f98ab3244e16a337bbfcf1fe24e4c7aa2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | xcb: Don't assume creating a window will result in ConfigureNotify eventTor Arne Vestbø2015-11-242-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We assumed that creating a window would always result in a configure notify event, so we delayed sending the initial expose event until receiving the configure notify. That strategy fails in cases where the window does not need a reconfigure after being created, such as when not running a window manager, or when creating child windows. In those cases the window is just mapped, and we ended up never sending an expose event. The problem was masked by sometimes receiving an explicit expose event from X, just after the mapped notification, which we then sent without waiting for configure. Unfortunately we can't rely on this behavior and need to remove the deferred expose event logic, so that we always ensure that at least one expose event is sent to Qt. Change-Id: I702be7f24de2a1e89c085fb6bd95bb8ff7792a27 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | winrt: Fix text renderingMaurice Kalinowski2015-11-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial revert of aecf3006bddb959795d03dd72d9c520e49713913. The DPI needs to be set inside the constructor to have the text rendering initialize properly. Landscape orientation fix is still valid and the dpi change was unrelated to resolve QTBUG-49470. Task-number: QTBUG-49610 Task-number: QTBUG-49470 Change-Id: I928b8d291b65cd744731c009917804b96253c276 Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | QPI/Cocoa: QNSView - guard removeFromSuperview by autorelease poolTim Blechmann2015-11-232-0/+7
| | | | | | | | | | | | | | | | | | | | removeFromSuperview could be called from outside the Qt domain (e.g from a native cocoa gui). we need to guard it by an autorelease pool to make sure that potential release/dealloc methods are not postponed to a point when we do not have a qapplication anymore Change-Id: If65cce4c524a16ffee125694c534f900c7d08fa8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Windows: Fix the size of drag cursors in multi-screen setups.Friedemann Kleint2015-11-234-105/+111
| | | | | | | | | | | | | | | | | | | | Move QWindowsDrag::defaultCursor() to the per-screen instance of QWindowsCursor so that the cached default drag cursor pixmaps are created with the correct size per screen. Task-number: QTBUG-49511 Change-Id: I02f75ac3b1e5e064325b066ee03e1d5c8a7c7ee8 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Windows: Scale cursors from resource pixmaps according to screen.Friedemann Kleint2015-11-232-15/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindowsCursor::customCursor() uses a best match algorithm to find the most suitable pixmap for the cursor size obtained from GetSystemMetrics(). This size is correct for the primary screen only; in High DPI + normal monitor multiscreen-environments, the cursors will be too large on the secondary monitor. Pass the platform screen to apply a correction factor based on logical DPI to obtain the correct size. Task-number: QTBUG-49511 Change-Id: I8a64a969e3ade7ab5029e3ae904a0bcbb4704f90 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Windows: Scale pixmap/bitmap cursors when High DPI scaling is active.Friedemann Kleint2015-11-232-7/+23
| | | | | | | | | | | | | | | | | | Apply a per screen scale factor, also taking the device pixel ratios of the pixmaps into account. Task-number: QTBUG-49511 Change-Id: If46b6eeb37635c2c4046992c1ba06711ccf54eae Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Windows: Create one QPlatformCursor per screen.Friedemann Kleint2015-11-234-17/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The pixmap-based cursors and some of the standard cursors we create from resource pixmaps need to be separated per screen. Use a QScopedPointer containing the per-screen cursor instead of the previously used QSharedPointer containing the cursor shared by all screens. Task-number: QTBUG-49511 Change-Id: I5203fcc4ecf5a7ff3fea833a4eaeb5300a6e6d54 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | xcb: Fix windows opened from keyboard are not active on Marco or Xfwm4Błażej Szczygieł2015-11-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | Windows opened from keyboard (e.g. keyboard shortcut) are not active on Marco or Xfwm4. These windows are under the window which received the key event. This patch fixes the problem by updating XCB timestamp on every key press like Qt4 does. Task-number: QTBUG-49567 Change-Id: I9ea483784ac361d0b645d0f11f643868b367ac2c Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Mirclient: Avoid hardcoding the platform api choiceEirik Aavitsland2015-11-231-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When built in by the debian scripts, a symbol PLATFORM_API_TOUCH would be defined for relevant target platforms. Here in Qt, this does not apply. On a correctly installed system, the UBUNTU_PLATFORM_API_BACKEND variable is not required at runtime, since the system's value will be read from a settings file under /etc. Also, the previous hardcoding would mean that it could not be overridden at runtime. Change-Id: I24ddfaa254005b4113f3328b66edb1c6bbc509e2 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Windows: Implement QPlatformTheme::WheelScrollLines.Friedemann Kleint2015-11-201-0/+2
| | | | | | | | | | | | | | | | | | Obtain the system setting via SystemParametersInfo(), amending fac71528cce279282d66b0a96ddd8570d567955f. Task-number: QTBUG-49561 Change-Id: Ie7a956fdc6b175ad09356949645c1e8937053abd Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Windows: Fix calculation of frame offset for layered windows.Friedemann Kleint2015-11-201-1/+2
| | | | | | | | | | | | | | | | | | Pass 0 window to High DPI scaling function to prevent it from trying to find a screen and applying a screen offset. Task-number: QTBUG-49516 Change-Id: Ib3e1919985f2c6df1dd8369f6e28b3ee1fdb7afe Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Windows: Refactor cursor handling.Friedemann Kleint2015-11-205-177/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applying scaling to the pixmaps used in pixmap cursors requires applying a scale factor in a code path now in a constructor of QWindowsWindowCursorData (nested into QWindowsWindowCursor). This needs to be split and the code paths for cursors created from a Qt::CursorShape value and pixmap cursors need to be further separated. Replace the QSharedDataPointer-based QWindowsWindowCursor class by a simple, non-copyable class CursorHandle managing the HCURSOR handle and pass it around using a QSharedPointer. Split the cache in QWindowsCursor into one based on Qt::CursorShape and one based on the cache key aggregated from the pixmap cache keys (using QWindowsPixmapCursorCacheKey renamed from QWindowsCursorCacheKey), simplifying the standard case based on Qt::CursorShape. Reuse class CursorHandle in QWindowsOleDropSource::CursorEntryCursorEntry, which used a similar class. Remove QWindowsCursor::createSystemCursor(). Avoid the construction of temporary QCursor objects for the standard cursors constructed from using resource pixmaps by introducing a struct PixmapCursor containing pixmap and hotspot. Task-number: QTBUG-49511 Change-Id: I5393d64bd70f7dab68c0a8c2255c7685ac367b2f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | xcb: Fix slow widget resizingBłażej Szczygieł2015-11-192-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can speed up window resizing using on XCB platform (like in Qt4 or GTK). It doesn't affect QRasterWindow, but it affects all QWidget-based windows and OpenGL windows. This code uses XCB Sync Protocol on all windows when it is supported. In previous code the XCB Sync Protocol was used only when window doesn't support OpenGL (on QRasterWindow),but QWidget can use OpenGL, so it doesn't use the XCB Sync Protocol. With XCB Sync Protocol which is implemented in Qt XCB plugin, windows can be resized smoother/faster. You can see bigger difference when you use non-composited window manager to test it: - Kwin without compositing and fast style, - Marco, - Xfwm4, - Openbox. Task-number: QTBUG-46641 Change-Id: Ia18dee94616e64ba7e11bd4b062d2326ec530748 Reviewed-by: Martin Gräßlin <mgraesslin@kde.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | winrt: Use handleExtendedKeyEvent when handling back button.Samuel Nevala2015-11-191-2/+4
| | | | | | | | | | | | | | | | | | | | | | QWindowSystemInterface::handleKeyEvent runs the shortcut override unconditionally; use QWindowSystemInterface::handleExtendedKeyEvent instead, because it allows bypassing the override (as the back button press is not a valid shortcut). This also prevents an unnecessary mutex lock. Change-Id: I8d8bb957e1556ac47e031cfe6fca6481f7c3220d Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* | Direct2D: Fix build.Friedemann Kleint2015-11-191-1/+1
| | | | | | | | | | | | | | | | Fix the include path of the event dispatcher which changed after 08a4b7f74507be7aa9dc09a9234d3bc83d4ed908. Change-Id: Ie679b189bd65dc3388ba0d28d01036e3d05683e7 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Windows: Open GL blacklist - Disable Mobile Intel 945GMFriedemann Kleint2015-11-191-2/+2
| | | | | | | | | | | | | | | | Like GMA 3150, the card cannot handle Desktop GL nor ANGLE. Task-number: QTBUG-47435 Change-Id: I88c14ac5d642eb931779f689799295b9a169cd3b Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | iOS: Update pixel density (PPI) logic to detect new iOS devicesTor Arne Vestbø2015-11-192-11/+16
| | | | | | | | | | | | | | | | | | | | | | Since the iPhone 6(S) Plus devices have a PPI of 401, we change the logic from storing the unscaled PPI to storing the scaled PPI, and applying that to a scaled geometry when computing the physical size. Task-number: QTBUG-49467 Change-Id: I1741ff075749a301d2434cd35f642fcc9ea4b581 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | eglfs: Enable use of Qt::AA_EnableHighDpiScalingMorten Johan Sørvig2015-11-184-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support use of Qt::AA_EnableHighDpiScaling and QT_AUTO_SCREEN_SCALE_FACTOR. This makes the high-dpi scaling system use the screen configuration set with QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT. Implement QEglFSScreen::pixelDensity() and make it return the scale factor for the display. The scale factor is computed as the ratio of the logical DPI to the base DPI. Change-Id: I14ed5da058024128479cb5508e056c39bd2f7563 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | winrt: Fix startup orientation handlingSamuel Nevala2015-11-181-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | Calling QWinRTScreen::onOrientationChanged in the class constructor can lead to situation where QWinRTScreen is expected to be fully constructed. Moving the onOrientationChanged call to QWinRTScreen::initialize ensures that QWinRTScreen is fully constructed when it is called. Task-Id: QTBUG-49470 Change-Id: I52748f33a9011dec3a172c1a74023cad15aae38a Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
* | xcb: Process _NET_WORKAREA and screen geometry changes separatelyAlexander Volkov2015-11-174-25/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit allows to avoid superfluous calls to the X server. We don't request _NET_WORKAREA values when the screen geometry changes, and we avoid RandR calls on each _NET_WORKAREA change. Besides, update the available geometry of all screens with the same root window, rather than only that one which corresponds to Qt::Desktop window. Change-Id: I5ec624717f5f261c986cd9aaf2425f22985e11c0 Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>