summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Listen to touch events on the master device instead of slave.Maarten Lankhorst2014-07-021-36/+13
| | | | | | | | | | | | | | | | | | | | Listening to touch events on the master prevents pointer emulation events from being generated, alleviating the need to grab. Grabbing on the slave device is buggy, and breaks pointer emulation on all current servers that support XInput 2.2 due to a bug in the server, and will also grab unwanted touch events. For reference, see https://bugs.freedesktop.org/show_bug.cgi?id=78345 Reverts 2c65b78b400ec27e6e559829b9a970dca2df6669. The idea of enabling each touchscreen separately was introduced in 4dbf574b7acb7ae8f852219700afa95f8d568f0e; that aspect is also reverted. Change-Id: I30d36397aa4ff2fb7a8ad2bbb94c2a13abd472b4 Task-number: QTBUG-38625 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Cocoa: Handle Qt::WA_ShowWithoutActivatingMorten Johan Sørvig2014-07-022-0/+12
| | | | | | | | | | | | Forward the flag to QWindow by setting the _q_showWithoutActivating property on the window in QWidgetPrivate::create_sys(). Implement by refusing to become the key window or first responder during QCocoaWindow::setVisible(). Task-number: QTBUG-19194 Change-Id: I8446927ec510d7226a5a7b51b7be49d2f9bfd098 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Handle Qt::WindowDoesNotAcceptFocusMorten Johan Sørvig2014-07-023-1/+19
| | | | | | | | | | | | | | Make windows with the Qt::WindowDoesNotAcceptFocus flag refuse to become the key window. This is in addition to the existing refusal to become the first responder in QNSView. Refactor the common test into a new function: bool shouldRefuseKeyWindowAndFirstResponder() Task-number: QTBUG-32385 Change-Id: I31021b5d8895a17c48f94f3691e6590c90b68627 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Fix Qt-in-namespace build.Tim Blechmann2014-07-023-11/+23
| | | | | | | | Wrap cocoa classes in namespace macros. Task-number: QTBUG-39382 Change-Id: Id840e666105afca21760fcb529b5765e0a534120 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Separate framestrut and normal button stateMorten Johan Sørvig2014-07-022-7/+10
| | | | | | | | | | | | | | | Frame strut button state can get out of sync due to missing calls to handleFrameStrutMouseEvent, typically when a mouse down is sent but the mouse up isn't. There is no reason this should interfere with normal button state: Add m_frameStrutButtons for tracking the frame strut button state. Change-Id: Ia21700af94fe000c73088b7657237372f3a04bf8 Task-number: QTBUG-39810 Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* OS X: when opening a URL via QFileOpenEvent, pass as QUrlShawn Rutledge2014-07-021-1/+1
| | | | | | | | | | Opening a file from Finder and opening a URL from the browser are two different operations, and the URL might not be a local file. Task-number: QTBUG-39972 Change-Id: I467dfef7efe8eb88c922410db16137e135bc8133 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNX: Override QPlatformScreen::topLevelAtBernd Weimer2014-07-022-15/+14
| | | | | | | | | | Implemented QQnxScreen::topLevelAt method, as base implementation returned wrong results. This fixes "tst_qwidget widgetAt" for instance. Removed related method, that is not used at all. Change-Id: I25c4f474cb0d661e5e5cdcdd0ab13d670fd4dc37 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* xcb: make sure to update window title when it is changedTasuku Suzuki2014-07-021-0/+1
| | | | | | | Task-number: QTBUG-33775 Change-Id: Ibe346c4304532d031bfa1c9b4d73cd02d1e5a64f Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* WINCE: Fix grabWindowAndreas Holzammer2014-07-021-1/+3
| | | | | | | | | | | | | | BitBlt does not support CAPTUREBLT under Windows Embedded compact. It was before defined to the value it would have for a desktop Windows, but as it looks if the bit gets set for Windows Embedded Compact he does not do the right thing anymore. So lets define it to 0 so that we dont do any harm. Change-Id: I447ebcd90eb9ae7c64f931aa8859b83794f201a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
* Empty icons and Cocoa menu items.Timur Pocheptsov2014-07-021-3/+4
| | | | | | | | Clear menu item's image if QImage is empty (isNull). Task-number: QTBUG-39557 Change-Id: I8145b67342b0361da2bb945070603cc182202b71 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Accessibility Windows: Do not assert on invalid indexInParentFrederik Gladhorn2014-07-011-5/+3
| | | | | | | | | | | | We try to but don't always guarantee a valid hierarchy, having applications crash because of this is not a good idea. The assert currently triggers when showing message boxes. Fix for the message box case is in progress but this may happen in other situations. Change-Id: I6f82b23c8abfcb7f91ecde0584f0e01bd8216ca1 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Android: Fix namespace usageChristian Strømme2014-06-3027-0/+112
| | | | | | | This change makes it possible to set a Qt namespace for Android builds. Change-Id: I79f4ae8200223f36f97e2849aae49e45b8850d23 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Translate Super/Hyper keys to MetaModifierGatis Paeglis2014-06-251-0/+9
| | | | | | | | | | | | This is how it was done in Qt4. If users are interested in an actual X11 keysym they can use QKeyEvent::nativeVirtualKey(). Change-Id: I710664e48c5db1633a357aa0a5d238f3453103ab Task-number: QTBUG-38428 Reviewed-by: Christian Stenger <christian.stenger@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sebastian Kügler <sebas@kde.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Cocoa: Do mouse move and cursor update handling separate from viewEike Ziller2014-06-242-12/+66
| | | | | | | | | | | | | | | | | | | | | We are using tracking areas for mouse move, enter/leave and cursor update events, so we should keep handling of that out of the "normal" event chain. If we handle mouse moved events in the views' mouseMoved method, we need to pass the event up the responder chain if we didn't handle it, or we would break for example hover behavior in native WebViews, because these do not handle mouse moved events directly in their mouseMoved:, but only if the event wasn't handled otherwise (arguably a bug in Web(HTML)View). But passing the event up the responder chain is not good either, because the QNSViews in the parent hierarchy get the event from their tracking areas already. Change-Id: I636a84ab1b7ef73070f81a8e33b5fa734ff4a42c Task-number: QTBUG-26593 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Cocoa: cleanup modal sessions for dialogs not run with .exec()Dyami Caliri2014-06-231-0/+3
| | | | | | | | | For modal dialogs not run through QDialog.exec(), the modal sessions were not cleaned up, causing the application's menus to be inaccessible. Task-number: QTBUG-37699 Change-Id: I2704c23fec8989aa2e8ddcc3d5e3f21bb6c5db73 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QIcon: Prefer high-quality images of Windows .ico files.Friedemann Kleint2014-06-221-1/+6
| | | | | | | | | | | Refactor the code QPixmapIconEngine::addFile() using a convenience class for reading all images. Special-case .ico-files: Read images into a list and replace by higher-quality ones. Task-number: QTBUG-39287 Change-Id: I32ab6c77a276dc5d4d9a8f7b216c81149b8772b8 Reviewed-by: aavit <eirik.aavitsland@digia.com>
* Cocoa: fix Option + any key in key eventLiang Qi2014-06-211-1/+1
| | | | | | | | Unmodified key code should be used. Task-number: QTBUG-33200 Change-Id: I9cf91030e80336772c05a40efae52f3b8734cbdb Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix compilation with /Zc:strictStringsThiago Macieira2014-06-201-1/+1
| | | | | | | You can't assign a wide-character literal to a non-const wchar_t*. Change-Id: I3ec8d4064f8e901bb1c6ff14cdf41550b04c593d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* QWindowsPrintDevice check for NULL pDevMode from PPRINTER_INFO_2Dyami Caliri2014-06-201-0/+3
| | | | | | | | | The MSDN documentation states that the pDevMode member of PPRINTER_INFO_2 may be NULL. Task-number: QTBUG-39764 Change-Id: I9c3a4bb565115415dbf45544f3d2391107356610 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* XCB: Fix leak with touch devicesJoni Poikelin2014-06-201-0/+6
| | | | | | Task-number: QTBUG-39596 Change-Id: I4225d5a1ab4939280640b35d30c283f056a56519 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Do not overwrite existing event mask of root windowMartin Gräßlin2014-06-201-0/+6
| | | | | | | | | | | | | | | | | QXcbScreen installs its own event mask on the screen's root window. This overwrites any existing event mask already set and by that breaks applications when a new screen is added. By first fetching the existing event mask and adding it to the newly installed event mask, Qt does no longer break applications also installing an event mask on the root window. Task-number: QTBUG-39648 Change-Id: I8686dd6ae49d0e807c6fe1ea4a231ff728bfcf25 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
* Remove unused define XCB_USE_IBUS.Jędrzej Nowacki2014-06-191-1/+0
| | | | | Change-Id: Ife95a822ed24b29e9bff0612cd0dc265192c49d8 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Windows: Mark only mouse events synthesized by touch as such.Friedemann Kleint2014-06-191-4/+5
| | | | | | | | | | Pass on mouse events from pen. Task-number: QTBUG-39353 Change-Id: I96c4e023ddb1c853d5228d00aa9604941556abb4 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fixes QFontDataBase addApplicationFont on WEC.Bjoern Breitmeyer2014-06-191-2/+7
| | | | | | | AddFontResourceExW was not implemented yet. Change-Id: Iffa3e49bdbb0176c10324ede6161fcf8b2a63902 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Merge remote-tracking branch 'origin/stable' into 5.3Sergio Ahumada2014-06-173-3/+4
|\ | | | | | | Change-Id: Ibf1b8a03c5153895ec03af5844c0b6addc4a0aa0
| * directfb: fix QThread destroyed while runningLucile Quirion2014-06-163-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit cf092abdfc888f19a607a43c9b4bac776b5c1f8e introduces a virtual "void initialize()" in QPlatformIntegration class. "void initialize()" was already implemented in QDirectFbIntegration since commit 6534898cc69e22115cf158f71a1e0edd7f13877b allowing initialization steps to be overridden by QDirectFbIntegrationEGL. Therefore the QScopePointer "m_input" handling a QThread is reset twice. The QThread firstly created is forcibly terminated. The application displays the error message "QThread: Destroyed while thread is still running" and sometimes crash with a SIGSEGV. This commit rename QDirectFbIntegration::initialize() into QDirectFbIntegration::connectToDirectFb() to fix this issue. Task-number: QTBUG-38710 Change-Id: I3ca07c373af7c47abf08da2b45bbcf7a6cf573ad Reviewed-by: Holger Freyther <holger+qt@freyther.de> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | xcb: touch device mode is either Dependent or Direct, not Rel or AbsShawn Rutledge2014-06-161-2/+2
| | | | | | | | | | Change-Id: Ic0091007c95c4c307485bc2d5d3e1e967b44323e Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Flush xcb connection before EventDispatcher is going to blockMartin Gräßlin2014-06-163-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-threaded QXcbEventReader invokes processXcbEvents when the EventDispatcher is about to block. This method ensures that the xcb connection is going to flush. Applications can use low level xcb code in that case without having to ensure to flush the connection before going to block again. With the threaded QXcbEventReader this didn't work and applications which for example changed a window property and waited for the matching property notify event were stalled. This change ensures that also in the threaded case the connection gets flushed when the EventDispatcher is going to block. Change-Id: If1dc5eb96e2f1bde10b7a40af550b0608c62f70c Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Android: REG: Fix crash.BogDan Vatra2014-06-151-3/+5
| | | | | | | | | | | | | | Test if the window has a handle before using it. Change-Id: I728a129722f8ecd021998d483530a8d1687e5fe3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Merge remote-tracking branch 'origin/stable' into 5.3Sergio Ahumada2014-06-142-3/+7
|\| | | | | | | Change-Id: Icd073d40ce10ab4733b997036815795dd3fbaac1
| * Windows: Fix maximizing frameless windows on secondary screens.Sérgio Martins2014-06-111-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They would either disappear or be positioned at bogus coordinates. The MINMAXINFO structure works with coords from the primary screen then uses an "interesting" algorithm to adjust to secondary screen: Say you have a primary screen with width=1000 and secondary screen with width=2000, here's what you get when you set ptMaxSize to: ptMaxSize.x | Size window gets in second screen -------------------------------------------------- 500 | 500 1000 | 2000 1001 | 2001 1100 | 2100 So basically you can't get any value between 1000 and 1999 How many people use the taskbar on a second display and maximimize a frameless window anyway ? Task-number: QTBUG-39537 Change-Id: Ic9b3120e7fb5a9a5d97828a2e44be02ae587b92e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Fix Android: use fbo read back workaround with specific GPUs.Coursar2014-06-111-0/+1
| | | | | | | | | | | | | | | | | | Namely, the Adreno 205. We used to enable this workaround for Huawei Honor (Adreno 205). Task-number: QTBUG-33951 Change-Id: Ic92a6913664f2f0954271c700d9ef83d27c238a7 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | Android: Report something sensible for screen geometryEskil Abrahamsen Blomfeldt2014-06-135-18/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't get the actual screen geometry on Android, but in Qt 5.3.0 we would always return the screen geometry minus the size of the status bar. After the available geometry was initialized to 0x0 instead of this arbitrary value, some applications that depended on this as a constant value would break if they collected the information before the window surface had been initialized and they forgot to listen to QScreen::geometryChanged(). To reduce the risk of regressions, this patch makes sure we return the same thing as before for the screen geometry and that this is not linked directly to the available screen geometry. Task-number: QTBUG-39464 Change-Id: Ie63337b3b10d2eb5130e4fece6c5b144e8230164 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* | Support hotplugging of input devices with XInput2Allan Sandfeld Jensen2014-06-122-105/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we only scan for XInput2 devices on application start, we will currently miss any devices plugged in while the application is running. This patch makes QXcbConnection listen for XInput2 hierachyChanged events and use them to trigger a rescan of XInput2 devices. This fixes a regression in Qt 5.3, where the scroll wheel on hot- plugged mice does not work until the Qt application is restarted. Change-Id: I2cdc7ca24d3ab00716cedc4b22355b6e4935b184 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into 5.3" into ↵Sergio Ahumada2014-06-1111-73/+145
|\| | | | | | | refs/staging/5.3
| * Make sure we run gracefully below API level 18Jan Arve Saether2014-06-102-18/+12
| | | | | | | | | | | | | | Task-number: QTBUG-39508 Change-Id: I023ba7c50de5c95a5514658797125e22016a6543 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
| * Cocoa: Don't send duplicate close events.Morten Johan Sørvig2014-06-101-1/+8
| | | | | | | | | | | | | | | | | | | | | | Don't send QCloseEvents to QWidgetWindows during cmd-q application shutdown, since widgets will will already have received close events from QApplication close event handling. Task-number: QTBUG-39398 Change-Id: I7f6e892b0042361bed7a3bc5fac8518eabfc8e4e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| * Cocoa: Re-implement QCocoaScreen::topLevelAt()Morten Johan Sørvig2014-06-061-11/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation used [NSApp orderedWindows] which does not return NSPanel subclasses, which is used by Qt dialogs and pops. Use [NSWidow windowNumberAtPoint:belowWindowWithWindowNumber] instead, which hit-tests on all window types. This can potentially include windows from other processes and non-Qt windows which needs to be filtered out. Add EXPECT_FAIL to tst_MacGui::nonModalOrder. The correct topLevelAt() implementation now exposes that this test is failing. Task-number: QTBUG-39322 Change-Id: I81afa3da964e08fe682802220d8fe81e9284205e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * Do not crash with IA2 AT clients.Jan Arve Saether2014-06-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | Make sure all members of the IA2Locale we return are properly initialized. Only accProbe provoked this bug, and I have no idea why this haven't crashed earlier. nvda probably does not query the locale, therefore it was unaffected. Change-Id: I5a9d98eed5af56fd2a75f6cb7035ed613fd802d5 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| * Windows: Added Comma to list of possible numpad keysOliver Wolff2014-06-061-0/+1
| | | | | | | | | | | | | | | | | | | | Some keyboard layouts (German and Czech for example) have comma instead of period on the numpad, so this key should also be considered when setting the Qt::KeypadModifer state. Task-number: QTBUG-38248 Change-Id: I06847a02a9334c21784790eae6fd7e1bc6de4099 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * iOS: delay callbacks to UITextInput to avoid recursionRichard Moe Gustavsen2014-06-063-39/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the application calls "reset" or "commit" on the input method (or forces active focus on some other item) from a text changed or key pressed handler, iOS will sometimes throw an exception. It does so because we try to change the state of UITextInput (by calling textDidChange) while processing a callback from the same place (insertText). Optimally this should not happen since we would normally post such events to Qt, not send them directly. But with text input we cannot do this since UITextInput expects us to update immediately upon receiving text input callbacks. If not, word completion and spell checking will stop working. This change will guard against recursive callbacks by delaying callbacks to UITextInput when text/selection/first responder changes. Change-Id: I099f30adf1c5aba241fc833a45b423016f4ed8d0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * Fix alpha in no-opengl configuration on xcbLaszlo Agocs2014-06-061-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Like the EGL + xcb configuration, the -no-opengl is broken too when it comes to translucent windows: Requesting an alpha channel is futile since the xcb_create_window call always uses the root's depth and visual. This is now corrected by picking a 32-bit visual. This will make translucent windows and drag pixmaps appear correctly again. Task-number: QTBUG-35126 Change-Id: I00e7d6e08b5fcc055ef3ea6d822561740a1f5457 Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
| * Avoid polluting the output with warnings on eglfsLaszlo Agocs2014-06-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | Many windowing functions are not supported (since they do not make sense) on the embedded platforms. Provide empty implementations for a few more to avoid showing useless warnings, in particular for widget apps. The user cannot do anything about it and these are not errors. Task-number: QTBUG-39081 Change-Id: I29afd981e037d1e6772bcdfc33497e6d0ae02008 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Compose key plugin: expand "%L" to full path.Gatis Paeglis2014-06-112-9/+15
|/ | | | | | | | | | | According to [1] "%L" should expand to a full path for the default (based on system's locale) Compose file. [1] http://www.x.org/archive/current/doc/man/man5/Compose.5.xhtml Task-number: QTBUG-35943 Change-Id: Ie803a89742d9c0aa3b2d759bea28ed403dc68c9c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Android: Repaint affected areas when window movesEskil Abrahamsen Blomfeldt2014-06-041-0/+2
| | | | | | | | | | | | | | There are no automatic updates of the window when it moves, since this is not required on most platforms. This broke drag and drop on Android, because drag and drop creates a temporary window containing a pixmap with a snapshot of its content. We need to make sure the old and new location of the window is repainted when it has moved. [ChangeLog][Android] Fixed repaint issues in drag and drop. Task-number: QTBUG-35975 Change-Id: I7b043d728551d9963fb5acec804fb90aec5b50ff Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: Support offscreen surfaces on pbuffersEskil Abrahamsen Blomfeldt2014-06-045-1/+30
| | | | | | | | This is pretty much the same thing that eglfs does. Task-number: QTBUG-38960 Change-Id: Ibf310ca8e3a4e31e5310ab3a3d3e851eae31a4ad Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Android: Fix flashing on startup/shutdownEskil Abrahamsen Blomfeldt2014-06-044-6/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were several issues on startup of the application which were caused by the fact that we would get the wrong available screen geometry on startup, set this as the initial surface size and then expose native windows with this size. This would cause first a flicker of white on the early expose and the window contents to jump around as the window was resized to the actual available space on screen. The fix for this is to postpone the first expose until we have actually got a proper screen size from the main layout. We use width,height = 0 as an indicator that the available geometry is not yet known, and we skip posting any expose events before this is set by the layout. In addition, since we removed the surface before we shut down the application, it was by a white rectangle before the shutdown transition happens, and this white rectangle will be animated instead of application contents. To rectify this, we make sure the last surface in the stack remains in the layout until it is either replaced by a different surface or until the application has shut down. This way, the shutdown animation will work on this surface instead. [ChangeLog][Android] Fixed regression where there would be flickering on startup and shutdown of the application. Task-number: QTBUG-38960 Change-Id: Ia1579ca8c522d8beeab066f78070ad49009d0238 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Cocoa: clear queued user input events when window is destroyedDyami Caliri2014-06-033-1/+26
| | | | | | | | | | QCocoaEventDispatcher stores user input events in a queue in certain cases. If the target of those events is destroyed, the events are later sent to the stale window, causing a crash. Task-number: QTBUG-39211 Change-Id: Ie55d2df5697c742bcb644ebf8c5028015a0b8148 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Adapt to Xcode 6 clang version sudden pickinessGabriel de Dietrich2014-06-033-3/+3
| | | | | | | Yes, that means OS X Yosemite fix. Change-Id: I236f7af7b803de24ff0895e04c9a9253b5cfdb3b Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Make QMacNativeWidget event processing workMorten Johan Sørvig2014-06-031-1/+1
| | | | | | | | | | | | | | | | | Don't interrupt the Qt event loop if the Qt event loop isn't running (meaning processEvents has not/ will not be called). This can happen in the QMacNativeWidget or plugin case where the native code calls [NSApp run] and QApplication::exec() is never called. In Qt 4 this was not necessary since UI event processing was more direct: QCocoaView would call QCoreApplication::sendMouseEvent/sendSpontaneousEvent directly on mouse events. Task-number: QTBUG-36225 Change-Id: I2894cbbca66a902652c9f8bc916e94ad8ce0e18e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>