summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Ensure null pointers are not added to QXcbConnection::m_touchDevicesSandro Mani2015-02-041-3/+5
| | | | | | | | | | | | | QXcbConnection::touchDeviceForId attempts to retrieve an existing XInput2TouchDeviceData from m_touchDevices via QHash::operator[]. If m_touchDevices does not contain the specified XInput2TouchDeviceData, QHash::operator[] adds a default constructed value (i.e. a null pointer) for the specified id. This null pointer is not removed from m_touchDevices if the condition "nrDevices <= 0" is true below. This causes a null pointer dereference later on in QXcbConnection::finalizeXInput2. Change-Id: Icd3352417047c4b35d56db2d9f51e3fa1d859e9d Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QXcbClipboard: don't hold on to the screen pointerSandro Mani2015-02-042-9/+14
| | | | | | | | | | | | Remove the QXcbClipboard::m_screen member variable and make it use connection()->primaryScreen() instead. The clipboard is created in the QXcbConnection constructor, and QXcbClipboard::m_screen was set to the primary screen at the time of construction. If the primary screen later gets disconnected, m_screen ends up pointing to a non-existing screen. Change-Id: I2d23106673d0ba013056d4dbb7078acdf6f9bc7c Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* QXcbWindow: use an accessor to get the screen instead of storing itSandro Mani2015-02-043-43/+50
| | | | | | | | | | | | | | | Applications which construct a window with one screen configuration and show the window later on after a screen configuration change crash because the QXcbWindow::m_screen still pointed to the screen present at the time of window construction. In QXcbWindow::handleConfigureNotifyEvent the m_screen should get updated with the new screen, but I didn't see that method called in the scenario outlined. Looking at the other platform backends, I however see that they take the screen directly from the QPlatformWindow instead of storing the instance, hence this patch which makes QXcbWindow do the same. Change-Id: I13759a5939315c3aac36ec6e2c25bd0a6d7b1c35 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Cocoa plugin - showMaximized/showMinimized and Qt::FramelessWindowHintTimur Pocheptsov2015-02-041-2/+5
| | | | | | | | | | | | | | 1. Qt::FramelessWindowHint imlplies NSBorderlessWindowMask, but should _not_ exclude NSResizableWindowMask - we still have API (showMaximized) to resize this window. Without NSResizableWindowMask showMaximized (calling NSWindow's '-zoom' under the hood) has no effect. 2. -performMiniaturize does not work with a borderless window, since such a window does not have a minimize button - use miniaturize for such window instead. Change-Id: I691182ad7c1d230e670bfb70ef758483acbf0792 Task-number: QTBUG-44195 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* WGL: support reset notifications via GL_ARB_robustnessLaszlo Agocs2015-02-032-2/+51
| | | | | | | | | | | | | Handling context losses is unavoidable with ANGLE. Introduce some level of support for desktop GL too by making it possible to opt in via a new flag. Support is added for Windows (WGL, opengl32) only for now. In case of Windows with ANGLE setting the flag is not necessary, context losses will be reported regardless. Change-Id: Ic354c1382e876566538c52a4381f7ff328b7477e Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Make it more obvious that Q_WS_ is dead code, and should perhaps be portedTor Arne Vestbø2015-02-032-3/+3
| | | | | | | | | | | | We still have a bunch of Q_WS_ ifdefs in our code, which are easy to mistake for Q_OS_ ifdefs when quickly scanning the code. By renaming the ifdefs we make it clear that the code in question is dead. In incremental follow-ups, we can then selectively either remove, or port, the pieces that are dead code. Change-Id: Ib5ef3e9e0662d321f179f3e25122cacafff0f41f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Cocoa plugin - fix obscured/mapped/unmapped logicTimur Pocheptsov2015-02-032-3/+7
| | | | | | | | | | | | | | NSWindow setStyleMask can call viewDidMoveToWindow, while setting the mask, view can have window == nil and we call 'obscure' on this view's platform window/QWindow == 'unmapping' it. As a result, it can happen that a child view (for example, QGLWidget's view) never gets mapped back. This patch tries to limit this special obscure/expose logic by the exact views it was introduced for (c7bd85e97df1b188bcbd4a2a511313d221c5bb83, QTBUG-19840). Change-Id: I4cc7a6b1bd3e34741ad50c2e0d2a2add242b28e4 Task-number: QTBUG-41701 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Don't remember if passed HFONT was a stock objectKonstantin Ritt2015-02-023-23/+9
| | | | | | | | | | According to GetStockObject() function docs at MSDN: > It is not necessary (but it is not harmful) to delete > stock objects by calling DeleteObject. Change-Id: I755dc84c8b86ba2806e97ae41b3025aa3e633ae7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [QWindowsFontDatabase] Drop some dead codeKonstantin Ritt2015-02-024-16/+11
| | | | | | Change-Id: I95b6c95bf0be875b3fcb66150a13bd3b5df9830a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [QWindowsFontDatabase] Drop some dead codeKonstantin Ritt2015-02-023-31/+6
| | | | | | Change-Id: I56b867508a9d597462c2e71c71c3aea0b8ea9aca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* iOS: Track QIOSViewController -> QIOSScreen using QPointerTor Arne Vestbø2015-02-021-3/+4
| | | | | | | | | We may receive viewWillLayoutSubviews calls for the view controller even if QIOSScreen has released the UIWindow that retains the view controller. Change-Id: I0cc7c50dbb5ee00224aec46d070b04efe069e85a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Guard QIOSScreen against notifying Qt about changes to deleted QScreensTor Arne Vestbø2015-02-021-6/+14
| | | | | | | | | | | Now that we can rely on screen() returning 0 when the QScreen is not available we can return early from updateProperties(). We still compute the member variables as they may be accessed directly for the still alive QPlatformScreen. Change-Id: Ia7d0d29a6b50a9c932b565dc53b23d66331c275e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Disconnect focusWindowChanged connection on QIOSViewController deallocTor Arne Vestbø2015-02-021-1/+8
| | | | | | Change-Id: I6acac4c926fcf5459364133b6cc58baff0519074 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Keep size and device pixel ratio of QIOSBackingStore in sync with windowTor Arne Vestbø2015-02-022-10/+10
| | | | | | | | | | We were only doing this for the size, which caused problems when moving a window from one screen to another where the two screens had different device pixel ratios. Change-Id: If56df34677417369639ee8e4df05820fddd9198d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* OS X: Fix QWindowSystemInterface::handleExtendedKeyEventFrederik Gladhorn2015-01-281-1/+1
| | | | | | | | | | | | | In d7ca800a87a2291c94c6580f0cfe068bb2280caf another parameter was introduced to unify ShortcutOverride. The call to it in qnsview.mm accidentally passed false as last parameter which would go to count instead of tryShortcutOverride. The patch wasn't released yet, so this regression doesn't need a change log entry. Thanks to Felipe Seoane for spotting this! Change-Id: Ide2211806caf742d649e0d5dadcc47fd032d2cdf Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Android: Don't open assets files in read/write modeEskil Abrahamsen Blomfeldt2015-01-281-3/+1
| | | | | | | | | | | | | | | | | We would return true when opening assets in read/write mode despite the fact that the files are not writable. The logic now matches that of the qrc file engine. This also adds a unit test for Android-specific issues. [ChangeLog][Android][Important Behavior Changes] Opening assets with QIODevice::ReadWrite now returns false to correctly indicate that the files are not writable. Change-Id: I019cc27861fc9b000dc13c5e0a38c0fc09a08671 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
* iOS: Limit auto-rotation to device screen (excludes external screens)Tor Arne Vestbø2015-01-242-21/+23
| | | | | | | | | | | An external screen should always stay in the native orientation of the screen, and not be affected by rotations of the device. If the user requires the external content to follow the device rotation, this can be done explicitly by listening to orientation changes of the main screen, or using QSensors. Change-Id: I3a98655d11915f0db107930e7d97a24417656bc9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Track QPlatformScreen -> QScreen using QPointerTor Arne Vestbø2015-01-241-0/+3
| | | | | | | | | | Allows the QPlatformScreen to verify that the QScreen is alive before sending events to QPA for the given screen (which will assert if the screen is being destroyed). Change-Id: Ie77674fead3e0a4d4f6fedbf1f7f3c98364c7485 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Fix build on [older] MinGWKonstantin Ritt2015-01-231-0/+30
| | | | | | | Add some macros missed in older MinGW. Change-Id: Ia61ff270d012022c4e9ec0d4dd2ea050860f4fcd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* iOS: Associate UIScreen and show UIWindow on initial QWindow mappingTor Arne Vestbø2015-01-232-13/+43
| | | | | | | | | | | | We delay showing the UIWindow until the first QWindow is created and mapped to the screen. This allows external screens to stay in mirror mode until a QWindow has been explicitly created on that screen. We also remove the screen-association when the last QWindow on that screen has been removed, which will return the external screen to mirror mode. Change-Id: Iccecb297281d0c4f397f69f2494debff051ade01 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Base [QIOSViewController shouldAutorotate] on the locked orientationTor Arne Vestbø2015-01-233-16/+14
| | | | | | | | | Instead of keeping a separate property for the auto-rotation. Allows us to override shouldAutorotate later on to make the decision even more fine grained. Change-Id: I9a3cd6c1316f2a5485a94ef8d9b633df87f46f5f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Ignore statusbar changes for windows on external screensTor Arne Vestbø2015-01-231-0/+5
| | | | | Change-Id: Ib7919abb2da324f6ffa058e8b215bf566ff43e40 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Android: Fix crash in QCompleter testEskil Abrahamsen Blomfeldt2015-01-232-4/+8
| | | | | | | | | | | | | | | | | | | | | | The call to QPlatformWindow::setVisible() will trigger flushing of the window system events. Depending on the events, this could lead to the window being hidden. Since platformScreen()->addWindow() and removeWindow() was done *after* this flush, you could get the remove for a window before it had been added, whereas the logic in these functions were written under the assumption that there is exactly one remove per add, and that add always precedes the remove. This has only been seen when running the QCompleter test so far. This patch reorders the statements to make sure the events are flushed after the window stack has been updated. In addition, it adds asserts for the assumptions in the addWindow/removeWindow code to catch bugs there earlier. Change-Id: Ic67b03afbf7acbcb78be86bffa4c26360dc5832f Task-number: QTBUG-43836 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Don't build WinCE specific code on other platformsKonstantin Ritt2015-01-231-1/+123
| | | | | | | Change-Id: I7ade08e57ea0c9c496e316ff0f856b8951eab61e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* iOS: Decouple screen geometry calculations from UIWindow geometryTor Arne Vestbø2015-01-231-11/+20
| | | | | | | | | | | | | At startup or when a new UIWindow has been created but not associated with a UIScreen yet, its geometry will be invalid, and cause the wrong geometry for its corresponding QScreen when we use it to map geometry. Instead we explicitly use the status bar orientation to map to the correct geometry. Change-Id: If37b3ab2ad5db65e20a7e3af5c3854b3e3ddff0d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Don't re-apply window state during QIOSWindow constructionTor Arne Vestbø2015-01-231-1/+5
| | | | | | | | | | | We set the parent of the window as part of constructing it, which will cause a layout of the QIOSDesktopManagerView's subviews, but in this case we don't need to re-set the window state as that's taken care of later on in the QIOSWindow constructor. Change-Id: Ic197c9a50394908c8aa2155abdc97bc322937a85 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Simplify QIOSWindow::setParent()Tor Arne Vestbø2015-01-231-11/+4
| | | | | | Change-Id: I78c47c6ccdb53045f3fa412b1489e08691d3e195 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Only use [UIDevice orientation] for the main/device screenTor Arne Vestbø2015-01-231-0/+4
| | | | | | | | Auxiliary screens are always in their primaryOrientation. Change-Id: I078151ccbdb8a78eb095a05672f7804ab608ff24 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* update bundled sqlite to 3.8.8.1Mark Brand2015-01-221-2/+0
| | | | | | | | | | | | The "Fixed CE build of sqlite3" patch is preserved in this change, which causes sqlite's own localtime implementation to be used for wince. This is extended by #undef HAVE_LOCALTIME_S to override the new assumption that localtime_s is available on wince and should be used. Also, removed HAVE_LOCALTIME_S=0 since this must now be undefined instead of 0. Change-Id: I418e138ddc47d1bfbb80de0f4e4205a79c425f10 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* Expose context lossLaszlo Agocs2015-01-223-1/+20
| | | | | | | | | | | | | | | | | On platforms like Windows (and presumably on mobile devices too) the loss of the context (e.g. the underlying D3D device in case of ANGLE) is an event that can happen randomly and needs sufficient handling. Enhance QOpenGLContext::isValid() with the purpose of indicating context loss. Currently only the Windows EGL backend (ANGLE) has support for it. Other platforms may be added later. Task-number: QTBUG-43263 Change-Id: I8177694c1ee7cebbd5d330e34757fd94c563e6d6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* QSystemTrayIcon uses D-Bus StatusNotifier on Linux when possibleShawn Rutledge2015-01-222-4/+7
| | | | | | | | | | | | | | | | | | | | | Implementing org.kde.StatusNotifier DBus interface http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/ as well as org.canonical.dbusmenu for the limited purpose of showing the tray icon's context menu. If a desktop environment (such as KDE or Unity) has a StatusNotifierWatcher listening, then tray icon information is sent to be displayed by the tray implementation instead of being rendered directly in an XEmbed window. This is necessary because some modern tray implementations no longer provide XEmbed "hosting". [ChangeLog][QPA][Xcb] QSystemTrayIcon uses StatusNotifier D-Bus protocol when the desktop environment supports it Task-number: QTBUG-31762 Done-with: Marco Martin <mart@kde.org> Change-Id: I3b1f744d621eefc7e9c61d1469460ebfcc77fc54 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
* iOS: Make screen orientation reporting more consistentTor Arne Vestbø2015-01-222-12/+19
| | | | | Change-Id: Ic21efb939639711c4071161e3c742525a55d41be Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Fall back to statusbar orientation for initial QScreen::orientation()Tor Arne Vestbø2015-01-211-3/+13
| | | | | | | | | | | | | | At startup, iOS will report UIDeviceOrientationUnknown for the device orientation, which toQtScreenOrientation() maps to portrait. We can be smarter than that, by falling back to the orientation of the statusbar, which in most cases match the physical orientation of the screen at startup, unless the Info.plist file has been modified to limit the possible orientations. See also: https://gist.github.com/torarnv/40c1931205e33d2b1ed3 Change-Id: I5c78fbe5c670ed2909a51b478bd4814e2433554f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Use QPlatformIntegration::destroyScreen() instead of manual deleteTor Arne Vestbø2015-01-212-1/+4
| | | | | Change-Id: I8128fa1a4b7d6d202d15c03d51f6360a74d75d8c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Unify input device hotplugging support for embeddedLaszlo Agocs2015-01-212-26/+2
| | | | | | | | | | | | | | | | | | | | | | On embedded the mouse cursor will now appear and reappear regardless of how the input handling code is loaded (via a generic plugin or compiled-in to the platform plugin). Instead of passing around QDeviceDiscovery instances that only works when compiling-in the code into the platform plugin, introduce a new internal central QInputDeviceManager. The single instance of this provides a place to store any future input device related signals and properties. Also introduce mouse hotplugging support to linuxfb. [ChangeLog][QtGui] The mouse cursor on Embedded Linux is now handling hotplugging correctly with eglfs and linuxfb regardless of how the input handling code is loaded (via a generic plugin or built in to the platform plugin). Change-Id: I147c1b04a193baf216598015264f2c06e1b20f84 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Added new private API for Android and onNewIntentPeter Rustler2015-01-211-1/+7
| | | | | | | | | | | | | On Android the foreground activity can get intents with onNewIntent. Those intents can not be received in any other way. This is especially true in Android nfc. This patch adds a way to receive those intents in Qt. This patch heavily leans on the implementation of onActivityResult. Change-Id: Ic4dca301f34afe9a528149c3653e545ed3265a3c Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-2130-607/+508
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * Respect the hotspot passed in for the cursorAndy Shaw2015-01-191-3/+5
| | | | | | | | | | | | | | | | | | | | | | When the hotspot is set to be QPoint(0,0) then QPoint will see this as being a null QPoint. However, it is a valid position as far as the hot spot for the cursor is concerned, so we default to QPoint(-1,-1) instead and check for that. Task-number: QTBUG-43787 Change-Id: Ibf6253033016c4b556b8a2a79c89819a4d5825cb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * Only call ShowWindow() once when going from FullScreen to MaximizedAndy Shaw2015-01-191-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since going from FullScreen to Maximized is taken care of inside the FullScreen block then we don't want to call ShowWindow() again in the Maximized block. Therefore the Maximized block is moved so it is only invoked if it is not coming or going to fullscreen. As the minimized case is not accounted for in FullScreen that is left as is in its own if block. Task-number: QTBUG-43849 Change-Id: I3141347e072c50b2a4475098d7b8ee0b207578a7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * Turn off font hinting when we do high DPI scalingPaul Olav Tvete2015-01-164-2/+16
| | | | | | | | | | | | | | | | | | Font hinting depends on the specific pixel size, and ends up very wrong when the painter is scaled. Change-Id: I2007ec7e7ad8d52358d76e88e030ea4df7e91455 Task-number: QTBUG-43809 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * Fix constantly growing window bug with devicePixelRatioPaul Olav Tvete2015-01-161-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | Rectangles need to be mapped differently depending on what they are used for. Expose events need to cover the entire geometry, so they must be rounded up, potentially increasing the size. If we use the same conversion for window geometries, it is possible to end up with a feedback loop if the window reacts to the new size. Task-number: QTBUG-43743 Change-Id: I7881cc77bf2148fed2ae743c4226617a61197434 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Windows: Use DND effect chosen in DragEnter/Move for Drop.Friedemann Kleint2015-01-161-1/+1
| | | | | | | | | | | | | | | | | | The value of pdwEffect passed to IOleDropTarget::Drop() is always the one with which the drag was initiated. Task-number: QTBUG-43466 Change-Id: I045fef634b55d4f113b393aa0ad4aa15d37db372 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * Fix namespacing of QNSViewMouseMoveHelperFrederik Gladhorn2015-01-162-5/+5
| | | | | | | | | | | | Task-number: QTBUG-43061 Change-Id: Ied8cdf49c34ef155b0f0bbc7e547b7c01bcd1d11 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
| * iOS: guard text responder from clearing selectionRichard Moe Gustavsen2015-01-152-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When programatically setting a text selection on iOS, we call [UITextInputDelegate selectionWillChange] to report the change. If auto correction is enabled, UIKit will then reset the current tracking, and for some reason tell us to clear the selection. This is contradictory to us saying the the selection is about to change, and will cause an unwanted recursion back to Qt. Since there seems to be no way to stop UIKit from doing this, this patch will instead add a guard that refuses to change the selection recursively while processing a selection change from Qt. Task-number: QTBUG-43716 Change-Id: Id487a57cdda55d7e2d09c3efc14c7f03f566f15a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * Multi-screen DPI support for X11Paul Olav Tvete2015-01-121-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calculate the logical DPI independently per screen, but only when auto dpr is enabled. Using a constant DPI value for all screens, based on the combined geometry is arguably incorrect, but changing this now will cause pixel-size fonts to behave visibly different from point-size fonts when moving the window to a different screen. However, with QT_DEVICE_PIXEL_RATIO=auto, the pixel size fonts are already changing when the devicePixelRatio changes. Without this change, the point-size fonts will *not* adapt, which is a clear bug. Task-number: QTBUG-43713 Change-Id: I3e71618f9d55b7828ccd70b69a7b7ce656c69d65 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * X11 devicePixelRatio screen mapping fixPaul Olav Tvete2015-01-124-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix screen detection and window geometry when screens have different displayPixelRatios. We must use the native coordinate system to figure out which screen a window belongs to. Also, when a window moves to a screen with a different devicePixelRatio, we must recalculate the Qt geometry. Task-number: QTBUG-43713 Change-Id: I93063e37354ff88f3c8a13320b76dfb272e43a9c Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * xcb: build fix when XCB_USE_XLIB is not defined.Tomasz Olszak2015-01-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | When XCB_USE_XLIB was not defined QXcbXSettings still used XIproto.h. This change removes XIProto.h dependency and leaves QXcbXSettings uninitialized when XCB_USE_XLIB is not defined. QXcbXSettings::initialize() is already used in other parts of code e.g. qxcbcursor.cpp. Change-Id: I48eb82e39c5c091b41e8ec19e742a21d41de2610 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * Fixes for surface creation/destructionBogDan Vatra2015-01-105-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - After reset a surface we must call makeCurrent before we are usign swapBuffers. - No need to set the surface in QPA when surfaceCreated are called in QtSurface.java, some time the OpenGL surface is not fully initialized at this stage. Is better to wait for surfaceChanged which is always fired at least once. - DO NOT reset m_surfaceId to 1 when there is no surface. The problem is that if we have one surface and when we distory it we don't (need to) wait for its surfaceChanged/surfaceDestroyed notifications, and if we create another one quicly it will have the same id (1). Task-number: QTBUG-39712 Change-Id: I2aa31e5b59d81ef3b03624d4636a4381eea6d543 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * iOS: Prevent recursion when updating/syncing QIOSViewController propertiesTor Arne Vestbø2015-01-091-0/+12
| | | | | | | | | | | | Change-Id: I22f1eaa892cba23c498ae210a9a483e468268581 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * iOS: Fix QWindow::reportContentOrientationChange on iOS6+Tor Arne Vestbø2015-01-094-17/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | On iOS 6 and above, [UIViewController supportedInterfaceOrientations] needs to return 0 for [UIApplication setStatusBarOrientation] to work. This means once you report a content orientation other than the primary orientation, you'll disable auto-rotation. Reporting the orientation as Qt::PrimaryOrientation restores the auto-rotation behavior. Change-Id: I1b8c765c507728fdbc5b828e0b4215324014e221 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>