summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
...
| * Merge 5.4 into 5.4.1Oswald Buddenhagen2015-01-1621-56/+272
| |\ | | | | | | | | | Change-Id: I78d848c0bb396584a205a8066d253f2bcac8da56
| * | Fix regression with frameless dialogs on WindowsLaszlo Agocs2015-01-161-2/+6
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-41162 Change-Id: I6d4e6d0e8a262fead30d642d632f6b4021cc20ab Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * | Windows: Fix crash when focus window does not have a native window.Friedemann Kleint2015-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Check and warn in that case. Change-Id: Ic513334b5aa48e1c7e44685c30da3e9be52c3c52 Task-number: QTBUG-43833 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * | Windows: Add infrastructure to be able to a GL renderer based on GPU.Friedemann Kleint2015-01-156-42/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce flags for the renderer type and move code to qwindowsopengltester. Introduce QWindowsOpenGLTester::supportedGlesRenderers() where type-dependent checking can be added. Change-Id: I4bbffaf861cb0fdbea0919e081e3626fb5a872de Task-number: QTBUG-43263 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * | Windows: Add GPU detection.Friedemann Kleint2015-01-155-11/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compile qwindowsopengltester on all platforms and add struct GpuDescription with detection method based on IDirect3D9 (dynamically loaded). Expose as a QVariantMap-property to QWindowsNativeInterface to be able to access it from qtdiag. Task-number: QTBUG-43263 Change-Id: I3c6cd0bbbe36465e0e05f7064ecfc943d6ea4101 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Revert "Fix font enumeration, with the same family name, on Windows."Friedemann Kleint2015-01-232-68/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8456adf0eeb9df8dd5f0547d4ad5a81888295f03. The change introduces a massive slowdown of the application startup caused by the inner enumeration. Task-number: QTBUG-43774 Task-number: QTBUG-40828 Change-Id: I694938eab93ea409d97537b55e8a025bb7a0e393 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | | Implement Multitouch handling for WinCEAndreas Holzammer2015-01-226-3/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented handling of GID_DirectManipulation for WinCE. Derive touch information out of gesture event directmanipulation. Task-number: QTBUG-31216 Change-Id: I74e90f32d2384fc3550b47af0b72edf0292dea8f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | Android: Fix name of header in .pro fileEskil Abrahamsen Blomfeldt2015-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Gets rid of warning that the file is missing, but probably doesn't have any other effect since the file in question does not require moc-ing. Change-Id: I22085a55c212b6285341d61462dfaf548787e11c Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | | Android: Don't force-include android-9 headers in qpa pluginEskil Abrahamsen Blomfeldt2015-01-221-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we supported platforms < android-9, we needed to include some headers which were introduced in android-9 to compile the QPA plugin. This is no longer needed, and also creates problems when you pick e.g. android-21 as your platform, since some definitions (specifically fd_set) are different in the two sets of headers, giving us an undefined reference to QEventDispatcherUNIX::select(). Change-Id: Ifd28479b4bf3be0e9e62200a01fc4cf2cc855215 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | | Windows: Fix coordinate offset when positioning the taskbar on the left.Friedemann Kleint2015-01-203-5/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For windows that do not have WS_EX_TOOLWINDOW set, the WINDOWPLACEMENT API uses workspace/available aera coordinates. Introduce a helper function to return the offset and use that. Task-number: QTBUG-43872 Change-Id: I329c640f180524699b45b855b4583f447c4a0987 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | | Windows: avoid generating exposes on plain movesLaszlo Agocs2015-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fake expose generation for shrunk windows is causing side effects with desktop GL: it will generate expose events even when only moving the window. This is bad. So change the condition to look for shrinking and do nothing if the size is same as before. This is reported to cause perf issues with e.g. QOpenGLWindow or similar where an expose does an immediate repaint (potentially with block swap). Task-number: QTBUG-32121 Change-Id: I4687ea8210cee6691d608450c48b1dbef52d6df3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | Make -static -opengl dynamic builds succeedLaszlo Agocs2015-01-192-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now it breaks in qwindowseglcontext due to its ifdefs for static ANGLE-only builds. The checks for QT_STATIC should be extended with QT_OPENGL_DYNAMIC so that it continues to resolve functions dynamically in -opengl dynamic builds even when combined with -static. Task-number: QTBUG-43993 Change-Id: Iac6d0353ef16a32a22ab1db0a833fbb0165f328c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | Windows: make TranslucentBackground functional alwaysLaszlo Agocs2015-01-196-21/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QOpenGLWidget and QQuickWidget was not functional when WA_TranslucentBackground was set. This is due to the static "isGL" type of checks that are not suitable since 5.3 due to RasterGLSurface windows which may or may not be OpenGL windows, depending on their content. To handle this, we have to do some check on every makeCurrent and perform the necessary calls (most importantly SetLayeredWindowAttributes). Task-number: QTBUG-43854 Change-Id: If19c79482ec4f0a8b795ee710d52ed7e08b52563 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | 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>
* | iOS: Move implementation details of QIOSViewController to class extensionTor Arne Vestbø2015-01-082-6/+10
| | | | | | | | | | | | Change-Id: I602d8f1c9f20d3bfed4db3405460021146b546d8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Fix physical DPI and size for rotated screens on X11Paul Olav Tvete2015-01-082-1/+22
|/ | | | | | | | | | | | | | | Rotated screens would use the unrotated physical geometry, causing the calculated physical DPI to be completely wrong. In RandR, the output does not rotate, so the physical size is always for the unrotated display. The transformation is done on the crtc. http://www.x.org/releases/X11R7.6/doc/randrproto/randrproto.txt Task-number: QTBUG-43688 Change-Id: Ifde192fcc99a37d0bfd6d57b4cdeac124a054ca3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Uli Schlachter <psychon@znc.in>
* Fix use-after-free bugGatis Paeglis2015-01-081-2/+2
| | | | | | | | | | xcb_image_destroy() calls free on m_xcb_image and then few lines down we access member of m_xcb_image. Swap order of these two actions. Change-Id: I01fb43a066459cce462df6af22161c35cef524eb Task-number: QTBUG-43623 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* iOS: Raise window level instead of hiding statusbar during VKB scrollTor Arne Vestbø2015-01-072-8/+17
| | | | | | | | | | | | | | | | | | Hiding the statusbar using the normal iOS APIs result in QScreen reporting new availableGeometry, which is not what we want. The scroll of the screen is a purely visual effect, and shouldn't have any effect on observable Qt APIs besides the keyboard rect changing. Instead of actually hiding the statusbar, we achieve the same effect by raising the key window (and any other application windows, including the keyboard) to the level of the statusbar, effectively putting them above the statusbar. This still leaves popups and alert windows above the key window, as normal. Change-Id: Ib7694240ca86cfb9000de35bf0c49343ffb37e32 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Prevent buffer overrun when getting the glyph imagesAndy Shaw2015-01-072-2/+16
| | | | | | | | | | The change 35bc3dc45aacaf36a8bdfccc7627136cc2e5b185 moved some padding out of QTextureGlyphCache into the font engines directly, however this was not done for the DirectWrite font engine so it caused a buffer overrun. Task-number: QTBUG-41782 Change-Id: I4e643159036f06c5edd8a742dc6694d517a47826 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Windows: Remove check for minimum/maximum size constraints.Friedemann Kleint2015-01-071-14/+0
| | | | | | | | | | The warning was triggered when increasing the fixed size of a window. If there is a real violation of the size constraints, the below warning will show. Task-number: QTBUG-43420 Change-Id: I85d7d0a91d040aa3ddeff8c3d105351efd5e14a9 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Windows: Release mouse capture when window is blocked by modal window.Friedemann Kleint2015-01-071-0/+2
| | | | | | | | | The capture needs to be cleared when for example a modal dialog is opened from a timer slot or similar while moving the window. Task-number: QTBUG-43308 Change-Id: Id0c01080d67d1057004a7f85b037dce5e220de42 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* iOS: Remove QIOSKeyboardListener self-change assert/guardTor Arne Vestbø2015-01-061-2/+0
| | | | | | | | | We're fairly confident self won't change in that case, and the assert was causing warnings in release builds. Change-Id: I4a826579bb4cedef8423e8d43cb370e1f3b80407 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Revert "OS X: rename special menu items instead of duplicating"Timur Pocheptsov2014-12-222-14/+6
| | | | | | | | | | | | This reverts commit 8c538d10da618add00aba1acbc8d8dc2f24445b4. This patch, unfortunately, do not combine well with another problematic code producing, as a result, a serious regression. While the proper/better fix in Cocoa menu not found, I'm reverting this patch. Change-Id: I1ff03dbe12805da447cb3cfe3e2f231528bf1a16 Task-number: QTBUG-43471 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Remove direct linkage to dbus and qdbusSimon Hausmann2014-12-181-5/+0
| | | | | | | It appears that there is no code in the plugin that actually uses dbus. Change-Id: I654cf0b8f5ecc018f2c6ae8701220f7496915a60 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNX: Handle the case where screen returns a refresh rate of 0.Roger Maclean2014-12-181-1/+2
| | | | | | | | | | | Screen sometimes returns a refresh rate of 0. This has been observed on VMWare though it is unknown if this is always the case and whether it happens on other platforms as well. Returning a refresh rate of 0 causes animations to fail so we're better off returning a value that might be wrong than returning 0. Change-Id: I4846017bcb0d6bd52faad727df4ef6dac1a6250f Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* xcb: Don't return 0 from QXcbKeyboard::possibleKeysAlexander Volkov2014-12-181-1/+2
| | | | | | | | | | It's possible to get 0 for baseQtKey in case Caps Lock is used as a layout switcher. So don't include this value in the result. Similar fix was in commit d904533acba1267431ca2c5f0d3e85cc59a20a26. Task-number: QTCREATORBUG-9589 Change-Id: I46fc91f9faf6fd0699f062a72fd2ca3187232f5a Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Fix PDF when embedding fonts with large internal leadingEskil Abrahamsen Blomfeldt2014-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | Setting lfHeight to a positive value in LOGFONT requests the font with the given cell height, which is em square size + internal leading. When setting this to the em square size, it means we will get glyphs that are actually sized for an em square with sides that are (emSquareSize - internalLeading). For most fonts, this was not noticeable, but for some fonts with large internal leading, the resulting glyphs would be very small. When setting lfHeight to something < 0 instead, we are selecting the font with the given character height instead, which is not including the internal leading. [ChangeLog][PDF] Fix embedding glyphs from fonts with large internal leading. Task-number: QTBUG-43082 Change-Id: Id74cf2279df2062804e9431fe305d803cb0b19d2 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Windows: Return false from event processing of unhandled multimedia keys.Friedemann Kleint2014-12-181-1/+4
| | | | | | | | | | Otherwise, potentially active players no longer receive the keys when a Qt application is running. Task-number: QTBUG-43343 Change-Id: Iefa511a101734690305e3244fafec4a460a9212d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Fix crash when Android Style is set more than once.BogDan Vatra2014-12-153-7/+18
| | | | | | | | Load again JSON document is it was freed. Task-number: QTBUG-43111 Change-Id: I22f1de221371b49fec8b3d66ad5f0bd2af9656fe Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Fix xcb backend not grabbing the server as defaultJørgen Lind2014-12-121-1/+1
| | | | | | | | | | | The xcb backend relies on grabbing the x server in a few situations like popuphandling. For Qt 5.4.0 the logic enabling this code path was moved into the plugin. However it defaults to never grabbing the server Change-Id: I82489a0727affbce62587b3d7470085cf716a0cc Task-number: QTBUG-43049 Reviewed-by: Martin Gräßlin <mgraesslin@kde.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Windows: Do not register windows obtained by QWindow::fromWinId() for touch.Friedemann Kleint2014-12-111-1/+2
| | | | | | | | | Fixes a warning: RegisterTouchWindow() failed for window ''. (Access is denied.) Task-number: QTBUG-43252 Change-Id: I92a565f3a5e2e8815eb709b5c6d0ccdba7330e31 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Windows: Fix window geometry when using QWindow::fromWinId().Friedemann Kleint2014-12-111-3/+4
| | | | | | | | Take margins into account. Task-number: QTBUG-43252 Change-Id: I816115d2bbbcee3e8663f42bf07b1a140a049e69 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* iOS: let keyboard gesture work better with other gesturesRichard Moe Gustavsen2014-12-111-0/+12
| | | | | | | | | | | | | | | | | | | Let the keyboard gesture work better alongside other gestures by reporting that it should: 1. not prevent other gestures from triggering. This means that even if our gesture triggers (we close the keyboard), gestures attached to sub-views will still continue tracking. 2. not be prevented by other gestures. This means that if a gesture in a sub-view triggeres before our gesture, our gesture will still continue to track. In short it means that regardless of other gestures, we always close the keyboard if our text responder is first responder and the user flicks down. And we do so as "silently" as possible. Change-Id: I22386b5ef5dedbc498a2899929ddd07424e514d8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: only clear focus object if it supports IMRichard Moe Gustavsen2014-12-112-4/+9
| | | | | | | | | | | | | | | | | | | | We try to keep a on-to-one relationship between UI controls with text input and keyboard visibility. But if the control does not use text input, then there is no reason for us to clear focus when the keyboard hides. In fact, we should avoid doing so, since that will stop e.g buttons from working correctly. The typical flow is: - a touch release targeting a button is sendt to QApplication. - QApplication transfers focus to the button. - qiosinputcontext gets notified, we refuse, and clear focus again. - QApplication enters a propagation loop where it tried to find out the receiver of the event. Since the button is now unfocused, the event will propagate up to a grandparent instead. - the button will as such not trigger. Change-Id: I70baa38299f40defc4a77f62790502e2d6ebbba9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Only scroll to cursor on keyboard hide gesture reset if requestedTor Arne Vestbø2014-12-111-3/+12
| | | | | | Change-Id: I15b313b5f0d57358e405f16e941fc5061028c6a7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* iOS: Don't scroll screen on changes to input item transformTor Arne Vestbø2014-12-112-20/+3
| | | | | | | | | | | | | We auto-scroll the screen to reveal the cursor whenever the cursor rect changes or other properties of the input methods are updated, but the expected behavior when explicitly moving an item under the keyboard, such as when scrolling a view or moving an item using drag, is to not scroll the screen until typing commences. This matches how eg. Safari or the Notes app handles the same use-case. Change-Id: I6b6932d9bcbdccd8df26db982246c162f1574d86 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Handle SelectionClientClose in QXcbClipboardMartin Gräßlin2014-12-101-1/+2
| | | | | | | | | | | | | QXcbClipboard listens for subtype SelectionClientClose of Xfixes SelectionNotify event, but doesn't handle it. When the client holding the clipboard selection closes the Clipboard becomes empty and thus the change should be emitted. This fixes downstream KDE Bug #329174. Change-Id: I19fb8cfd7bd3b249c0bc6ca2a724a9aeeb05ac7e Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
* Windows: Limit cursor cache.Friedemann Kleint2014-12-091-1/+14
| | | | | | | | | Prevent the cursor cache from growing indefinitely hitting GDI resource limits if new pixmap cursors are created repetitively by purging out all-noncurrent pixmap cursors. Change-Id: I4a3bbd6235af13e306ca84ac6fea3fcd69d53279 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>