summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Windows: Do not detect full-screen state for child windows.Friedemann Kleint2013-11-041-1/+1
| | | | | | | | | | Introduced by a1db174ea98fab8669da498639895bac4c894baf (Fix window state handling). Task-number: QTBUG-34477 Change-Id: I4c92edddef346f9d7c4741f2f9784e9f686e9cda Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* iOS: Prevent calling QWindow methods on native NSViewsAndy Nichols2013-11-041-1/+1
| | | | | | | | UIViews can return nil when calling qwindow, so we must check before trying to use the QWindow handle. Change-Id: I72e9ddc58ebe10a3e7ea511f2356650402ba23f4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* enable PPS keyboard implementation also for plain QNXFrank Osterfeld2013-11-041-12/+4
| | | | | | | | | | Integrating with /pps/services/input is also the way to go for QNX. Change-Id: If2498f2c42ed4e6e0d1cadc787cc62e80940043a Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Handle keyboard focus changeJan Arne Petersen2013-11-042-0/+48
| | | | | | | | | | | | Call QWindowSystemInterface::handleWindowActivated when a SCREEN_EVENT_PROPERTY event for he SCREEN_PROPERTY_KEYBOARD_FOCUS property is received. Change-Id: Ic2b10c5b793dd4451adac68691296f8265a71160 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Android: Differ between ShowMaximized and ShowFullScreenEskil Abrahamsen Blomfeldt2013-11-0116-10/+279
| | | | | | | | | | | | The default is now ShowMaximized which behaves as it did before, i.e. each window will fill the screen but the status bar will be visible. Calling showFullScreen() explicitly will now hide the status bar to maximize the amount of screen real estate occupied by the application. Task-number: QTBUG-33135 Change-Id: If0d0a2ab72f8026e76818290e2b953dbc0dec156 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Android: Check for null pointer before calling ANativeWindow_release()Christian Strømme2013-11-011-1/+2
| | | | | | | | | | Calling ANativeWindow_release() with a null pointer will cause a SIGSEGV. Task-number: QTBUG-33955 Change-Id: If7d1afa3baea04360507eec5042b4e18a0272527 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Android: implement a simple cache mechanism for assets dirs.BogDan Vatra2013-11-012-27/+54
| | | | | | | | | AAssetManager_openDir is a pretty slow operation, so we are caching the most used dir contents. Task-number: QTBUG-34464 Change-Id: If198f7dae0d6961291c992e6eb46839ba5455819 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Remove unused field.BogDan Vatra2013-11-011-7/+0
| | | | | | | Fix crash on Android 4.4 Change-Id: Ibee584c0154b0b116af58477302e7e8385f0290d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Handle virtual keyboard visibility changes.BogDan Vatra2013-11-013-2/+35
| | | | | | | | | emitInputPanelVisibleChanged when virtual keyboard visibility is changed. Task-number: QTBUG-34347 Change-Id: Iab7374db42ff8ce6f33dcc793b23f84d3c8692d5 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Cocoa: Improve cursor setting.Morten Johan Sørvig2013-11-015-44/+88
| | | | | | | | | | | | | | | | Implement cursor setting in terms of [NSCursor set] and [NSView cursorUpdate] using the window tracking area. Refactor cursor conversion into QCocoaCursor:: convertCursor. Rename QCoocaWindow::m_underMouseWindow to m_enterLeaveTargetWindow since it's set according to spesific enter/leave logic. Add m_windowUnderMouse which tracks mouseEntered/mouseExited state. Task-number: QTBUG-33961 Change-Id: Id5e12594f5db365e09c9926a4c08d748a9afb935 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* iOS: bugfix touch events when not using alienRichard Moe Gustavsen2013-11-011-5/+12
| | | | | | | | | | | | | | It seems that 130ee40b broke touch handling for non-alien QWindows. For those cases, a QWindow that is a child of another QWindow will get its own UIView to back it up. The current code did not take this into account when calculating the global coordinates of touch events. Instead we need to search for the top level QWindow it might be inside before we find the view that acts as the "desktop" for it. Change-Id: Ie3c19bf86c92fa3f247a0764116830e91b8322d2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: clear focus object when resigning first responder statusRichard Moe Gustavsen2013-11-011-1/+5
| | | | | | | | | | | Instead of deactivating the window when we resign first responder status, we now leave it focused, and tell it to clear its focus object instead. This will work better with the rest of Qt, which expects a window to have focus when its in front. Change-Id: I6fcc232467af306b791a834f4843bfd2786b206f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Mac: Modify Qt::SizeAllCursor to look like arrowsKari P2013-10-313-3/+3
| | | | | | | | | On Mac, Qt::SizeAllCursor showed a spreadsheet cell selection cursor. It has been changed to look like it looks in the Qt Documentation. Task-number: QTBUG-27577 Change-Id: I2d50ab0d813137366b56cb30b8784ecf70392d4e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Windows: Do not use blend function for GL windows with alpha.Friedemann Kleint2013-10-301-5/+7
| | | | | | | Task-number: QTBUG-34376 Change-Id: I81a5ee6ff14e5472eb1f3846577d86b615be34e0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* iOS: Fix logic for determining whether to exit the root event loopTor Arne Vestbø2013-10-302-32/+8
| | | | | | | | | | | | | | | Instead of trying to hook into various places where we might be in a situation where the root event loop should exit, and then enabling the runloop-observer, we always keep the observer active, and then do the relevant checks whenever the run-loop exits. The reason for checking if the event loop is running is that iOS will enter and exit the root runloop as part of normal operation, eg due to flicking a scroll view and switching the runloop mode, so we need to ensure that we're actually supposed to exit the root event loop. Change-Id: I9b84b47ee45e0c9e2b1d2ebb5a432ea92700b324 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Android: Don't rely on QIcon::isNull() to validate icon data.Christian Strømme2013-10-301-4/+6
| | | | | | | | | | | QIcon::isNull() only checks if it has a valid d pointer and not if it actually contains any image data. The result is that the QImage create from the icon would be invalid, and later cause an exception to be thrown. To avoid this we should check the QImage as well. Task-number: QTBUG-34416 Change-Id: I9dd0a2387d73bfc2c27ceb9df247ddc186dd659f Reviewed-by: BogDan Vatra <bogdan@kde.org>
* xcb: Compilefix #ifdef glx codeJørgen Lind2013-10-301-0/+4
| | | | | Change-Id: I4204cab76b2621318dda909d24ceb2abab6e0ba3 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* xcb: Act on the _NET_ACTIVE_WINDOW eventJørgen Lind2013-10-301-3/+6
| | | | | | | | | | It happens that we don't get a focus inn event for top level windows when focus goes from a window mapped. But we do get a _NET_ACTIVE_WINDOW event. Task-number: QTBUG-34426 Change-Id: Id1d9eb708a968e0e8934e56dec19abe2dd203bc7 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Silence the _COMPIZ_DECOR_* warnings on UbuntuJørgen Lind2013-10-303-1/+12
| | | | | | | | | Earliest occurrence is to my knowledge in 12.04. It is still unclear how to act on those messages Change-Id: I7da48281c6bec973448a1d4cd800d445a80695a2 Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Add QGuiApplication::sync() functionJørgen Lind2013-10-302-0/+9
| | | | | | | | | This will allow applications to make sure Qt has the same state as the window system at any given point. The use of this function is discouraged but it is very useful for auto tests. Change-Id: I691bff365fc391e9d7213f2607008983505bb774 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Different native Cocoa menu fixes.Christoph Schleifenbaum2013-10-292-11/+19
| | | | | | | | - Fix location of NSMenu when no NSView is given. - Fix shortcut when given in text with tab. Change-Id: Iec21cf3d12084db1e70c1a8779d5482c78285796 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Don't support threaded GL on chromium (virtual box GL)Gunnar Sletta2013-10-293-1/+39
| | | | | Change-Id: I84f89450e3fce1cbbafd19dbf4509b1911e06b19 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* QNX: Manage foreign mmrenderer windowsRafael Roquetto2013-10-296-10/+125
| | | | | | | | | Manage and correctly set the z-order of a foreign created mmrenderer window by QtMultimedia Task-number: QTBUG-33816 Change-Id: I46273b945bf10991462fa72eb1ec8d00b0648988 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Cocoa: Fix mouse event coordinates transform to window spaceGabriel de Dietrich2013-10-291-22/+21
| | | | | | | | | | | We pass the mouse screen coordinates that we convert to window space instead of the other way around. This makes sure the original mouse coordinates are not bound to any moving window. Task-number: QTBUG-29583 Task-number: QTBUG-32221 Change-Id: I8f9ada6e8c0d20af8e85e88ee39190d23e58977f Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Re-enable NonFullScreenWindows on AndroidEskil Abrahamsen Blomfeldt2013-10-291-1/+0
| | | | | | | | | | | | This flag was created because the eglfs plugin did not support non-fullscreen raster windows. Now that it does, we can remove it again. Turns out this also fixes several issues with positioning and sizing of dialogs due to bugs in the implementation of the flag. Task-number: QTBUG-33846, QTBUG-33499, QTBUG-32537, QTBUG-32297, QTBUG-31457 Change-Id: I3902ae57d49d77e3c1046ec57b6f6926f70ec6a4 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* eglfs: Make backingstore handle unexpected scenarios gracefullyLaszlo Agocs2013-10-291-2/+2
| | | | | | | | | | | | On platforms other than Android eglfs does not allow having multiple windows when one of the windows is OpenGL. On Android however this has to be handled silently, without aborting the application. The backingstore lacked the necessary checks so QGLWidget-based apps were crashing. This is now corrected. Task-number: QTBUG-34412 Change-Id: Ifb469fa9ef391b24aed3942430c0347276809ba5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Don't crash if the screen is not yet initialized.BogDan Vatra2013-10-281-2/+4
| | | | | Change-Id: I4751c2dec5780f42b348a8a8ea628f65d548dcec Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* eglfs: Perform initialization in initialize() instead of the constructorLaszlo Agocs2013-10-251-22/+25
| | | | | | | | | | Move (almost) everything to initialize(). Doing so allows the QEglFSScreen constructor, the hooks' platformInit() and others to perform tasks that need the event dispatcher. Task-number: QTBUG-34208 Change-Id: If64e3d1691c41752c53968f8d4fb063b45345680 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* QWindowsKeyMapper: Added some comments about functionality + cleanupOliver Wolff2013-10-252-26/+14
| | | | | Change-Id: Ieabdea7601ea0eba08eac701b2fdf27b4cd2ff45 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix bug in updatePossibleKeyCodes() with dead keys and modifiersJuan Luis Boya García2013-10-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As it was until now, QWindowsKeyMapper::updatePossibleKeyCodes() tested using ToUnicode for which characters produce a key with every possible combination of modifiers. Calling ToUnicode with a dead key is dangerous, because MS Windows keeps it in the driver buffer, so if you call ToUnicode with acute key and then you press a, you get an á. To prevent this, updatePossibleKeyCodes() checked if the key that was being tested was a dead key. If true, it inserted an space and then repeated the key in order to reset the system internal buffers to the same state they were before the call. The problem with this is if the dead key is really two keys (like ^ or ´ in US International keyboard layout) and you press one of those keys without the modifier to make it a dead key (i.e. 6 in US International): Since updatePossibleKeyCodes() only tests for the key that was pressed it gets 6 is not a dead key, and thus it does not execute the workaround. Thus, the next time the user presses 'a' they get 'â' instead because updatePossibleKeyCodes() set the dead key on the keyboard buffer and did not run the workaround. This patch makes updatePossibleKeyCodes() run the workaround if any possible combination of modifiers with the key being examinated makes a dead key. Task-number: QTBUG-33591 Change-Id: I8c0b27586f7c62798986258b1b84aa90e4c5d64c Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix virtual key mapping on MS WindowsJuan Luis Boya García2013-10-253-27/+26
| | | | | | | | | | | | | | | | | | | | | | | | | In order to map MS Windows virtual keys to Qt keys without messing with dead keys now I use the built-in keyMap structure of QWindowsKeyMapper and assert every cell in the keymap is properly updated. In order to guarantee this even when the user changes the keyboard layout, WndProc now manages the WM_INPUTLANGCHANGE message, which is handled by QWindowsKeyMapper, resetting the layout structure. I don't fully understand yet some things about QWindowsKeyMapper, i.e. how QWindowsKeyMapper::updatePossibleKeyCodes workarounds the dead key issue with ToAscii; but it seems to work fine in all the tests I've done. Any further testing is highly appreciated, though. [ChangeLog][[QtGui][Platform Specific Changes][Windows] Fixed virtual key mapping on Windows. Task-number: QTBUG-33409 Task-number: QTBUG-8764 Task-number: QTBUG-10032 Change-Id: I4f7709a90906b03f4504deea1ff5c361e9f94b3f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix compile warnings on 10.6Morten Johan Sorvig2013-10-253-0/+3
| | | | | | | | Apple clang 3.0 complains about missing function declarations. Add them. Change-Id: Ib9c3c238c94e8649844cf3e67a659875ad549ecb Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Accessibility: Make it possible to send events with no QObjectFrederik Gladhorn2013-10-251-7/+3
| | | | | Change-Id: Icbb9d15ec52ff5f7718eaf3600cab140971274aa Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Android: Fix repaint on rotationEskil Abrahamsen Blomfeldt2013-10-255-15/+10
| | | | | | | | | | | | | After f89f099c55576992b39a8021aace64ff32747624, we no longer post a geometry-change and expose event when calling setGeometry, which the Android plugin depended on. This caused the window to stay the same size when it was resized by orientation changes. We put back the events in the code that calls setGeometry() instead. Task-number: QTBUG-32878 Change-Id: I449515dda07c839e0991c5a7031a972ca9c74dff Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Windows: Handle WM_SYSCOLORCHANGE as theme change.Friedemann Kleint2013-10-231-0/+3
| | | | | | | Task-number: QTBUG-34170 Change-Id: I6ca11ab67c1e2752300fc167fb8f3c4f0d9ae2b8 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix crash in QXcbDrag.Friedemann Kleint2013-10-231-1/+1
| | | | | | | | | handleStatus() was called with drag==0 when releasing the mouse over the desktop. Task-number: QTBUG-33920 Change-Id: I553647d1e734934b7c6caf4c984683cff88f9162 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix typo in check for MINGW_W64 versionKai Koehne2013-10-231-1/+1
| | | | | | | | Got introduced in 9b187bcd6a256b53cc2fb85500 Change-Id: I1d713f8309d3d8568ea836cc1d29f9dca685ac01 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Don't crash if the platform plugin is not initializedBogDan Vatra2013-10-231-0/+3
| | | | | Change-Id: I999411816192edbd2bf40c6bda92d6e94fb3d1b0 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Rely on isLayered() to decide layeringGunnar Sletta2013-10-231-2/+3
| | | | | | | | | The logic here was a bit broken. Every QWindow has an opacity which is 1 by default so the expose was hit for every single window, regardless of it being layered or not. Change-Id: I04873cd5db1cd147708e7de140f5947d3a01e9e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Android: Make platform menu more robustPaul Olav Tvete2013-10-231-3/+5
| | | | | | | | | Don't crash and lock up the whole device when people try to remove menu items that don't exist. Task-number: QTBUG-34246 Change-Id: I4396d252c5af93e021c9e218dbab7c0e7f190d9d Reviewed-by: BogDan Vatra <bogdan@kde.org>
* Fix compilation with latest MinGW-w64 (release 3)Kai Koehne2013-10-221-1/+3
| | | | | | | Now that MinGW-w64 fixed the headers the old hack actually break stuff. Change-Id: I1f60b9176982f6c07e01f3960bc1d7e70d7f9481 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Android: Accessibilty: Handle text betterFrederik Gladhorn2013-10-201-3/+15
| | | | | | | | Try harder to actually return text, before TalkBack would not read the contents of line edits and other text widgets. Change-Id: Ibb9bb8ac4a2728674f6f5ccf29eda5ed66a81a34 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Cocoa: Allow popups to grab mouse and keyboardGabriel de Dietrich2013-10-182-1/+9
| | | | | | | | | According to the QWindow documentation this should happen regardless of the window type. (It also mimics the current behavior on Linux and Windows). Change-Id: I1b0959ad8cf19bce452fd79a13b07d0a3a3c49e9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Refresh CUPS printer list when QPrinterInfo.availablePrinters() is called.Friedemann Kleint2013-10-172-6/+19
| | | | | | | | | | Introduce freeCupsPrinters() thus fixing a bug in the old deallocation code which would first set m_cupsPrintersCount = 0 and then pass it to cupsFreeDests(). Task-number: QTBUG-33666 Change-Id: I94c51cb390761a669a9cbd589c1131cfb51354c3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Blackberry: Cannot create shared egl contexts.Nick Ratelle2013-10-171-1/+9
| | | | | | | | | | Currently the share context is always set to EGL_NO_CONTEXT when it should instead query the share handle from the QOpenGlContext and pass that to the eglCreateContext call. Change-Id: Ia7e32574e1427fba0f919003e5367cfc98688d9d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Implement native gestures on OS X.Morten Johan Sørvig2013-10-171-0/+96
| | | | | | | | | | | | | | | Add QWindowSystemInterface::GestureEvent and QNativeGestureEvent to QtGui. These events are copies of Qt4's QNativeGestureEvent, where it was an implementation detail of QGestureManager. Add gesture message handlers to QNSView and bring back the Mac gesture recognizers for QGestureManager. Task-number: QTBUG-28126 Change-Id: I1304e09e776fa7c44d133d54ca8b895ca2f544c5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* iOS: Wrap user's main by renaming symbol and relying on weak linkingTor Arne Vestbø2013-10-171-3/+14
| | | | | | | | | | | | | | | This approach is similar to the earlier apprach of defining main=qt_main when building the user's sources, but uses the linker to rename the symbol instead, which is less fragile than using the preprocessor. To keep the hybrid usecase unaffected by our wrapper logic we declare both our main wrapper and a fallback qt_main as weak symbols, which ensures that when the user's application links in our plugin the real main/qt_main provided by the user is preferred over our weak symbols. Change-Id: Ic76f3ba8932430c4b13a1d3a40b8ed2322fe5eea Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Refresh Windows printer list when QPrinterInfo.availablePrinters() is called.Friedemann Kleint2013-10-172-19/+37
| | | | | | | | | Introduce static query functions. Task-number: QTBUG-33666 Change-Id: I291098c9da82bc2cc24957044187e93cdc33c41d Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* iOS: Mark argument as unused for release buildsTor Arne Vestbø2013-10-171-0/+1
| | | | | Change-Id: I73497a6c16236f912646c9fbe9b136ff760ce4f7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Fix compilation with Clang and libc++ under LinuxMarcel Krems2013-10-162-0/+2
| | | | | | | | | | src/plugins/platforms/xcb/qxcbsessionmanager.cpp:205:80: error: use of undeclared identifier 'ERANGE' while (getpwuid_r(geteuid(), &entry, buf.data(), buf.size(), &entryPtr) == ERANGE) { src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp:173:28: error: use of undeclared identifier 'LC_CTYPE' char *name = setlocale(LC_CTYPE, (char *)0); Change-Id: Ide6f3072e9158eef412973ce0a72babb41b695f0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>