summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-22337-8052/+8052
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Cocoa GL context: do not crash when closing windowsLaszlo Agocs2012-09-201-2/+2
| | | | | | | | | Running hellowindow and closing its windows one by one would result in crashes without the additional checks for the presence of the underlying native window. Change-Id: Id32bdfda9a77936380b2e9a95fb56ceb52028d9d Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Load Mac specific resources when used in a static buildAndy Shaw2012-09-201-0/+7
| | | | | | | | | When Qt was built statically then the Mac specific resources were not being loaded which meant some style specific images were not used. Task-number: QTBUG-25391 Change-Id: If311148df19a87b6c8104553b662e3bf157f5717 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Rotate non maximized windowsRafael Roquetto2012-09-192-1/+114
| | | | | | | | | | | | | | There are two types of rotation to be considered: 1. Rotation of native widgets The corresponding window should be rotated and resized proportionally to the new screen geometry. 2. Rotation of toplevel windows. The window will be only rotated. It will be only moved or resized if it becomes clipped, in order to be fitted on the screen properly. Change-Id: Ice92427ac07a9bea284e68917ff3e0f436722bc0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Introducing NoDropShadowWindowHint window flagGabriel de Dietrich2012-09-182-0/+9
| | | | | | | | | | Added suppport on QCocoaWindow. Also we deprecate WA_MacNoShadow since it isn't used anywhere, and updated the 'windowflags' example app. Change-Id: Id0b453ba15a23b768b0615838597bca139f507ad Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix mapping to/from global coordinates for child/embedded windows.Miikka Heikkinen2012-09-182-0/+19
| | | | | | | | | | | | | | | | | | | | | QWidget's mapToGlobal() and mapFromGlobal() functions assumed that if the widget reports it's a window or if it has no parent widget, it must be a top level window whose coordinates are in global coordinates. This is not true for child QWindows or embedded native windows (QAxWidgets). Changed the logic for mapping coordinates to use equivalent methods from QWindow if widget has a window handle, and changed QWindow's methods to map coordinates using native methods if window is embedded. Also fixed newly failing accessibility autotest. The geometry related failures there popped up because now the position of the rect returned by accessible interface is actually correct while widget geometry still reports position 0,0 before widget has shown up. Task-number: QTBUG-26436 Change-Id: I658fafd0ce01eb1604ba255efeeba3073ca0189f Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* X11 (xcb) support for QScreen-per-output and runtime changesShawn Rutledge2012-09-184-64/+244
| | | | | | | | | | | | | QScreen has notifiers for its properties, but they were not being emitted when one changes the resolution or arrangement of individual outputs, e.g. via xrandr. Also there should be one QScreen per "output", e.g. laptop LCD + external monitor means 2 QScreens which will be siblings, rather than just 1 QScreen to represent the whole desktop. Change-Id: Ia61bbc5e6a3506f813ab11f87c03d14cf7f4ce85 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Prevent buffer overflow in QXcbWindow.Samuel Rødal2012-09-181-1/+1
| | | | | | | | Thanks to Janne Kulmala for noticing this and informing about the fix. Task-number: QTBUG-27123 Change-Id: Idd3cfd74fb7be277b6d805446aea5784b8fdf2f6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make maemo scope syntax in project files more genericLaszlo Papp2012-09-141-1/+1
| | | | | | | | | | | | | | | | | It is necessary to use the n9 device file for now in scratchbox or/and on the community open build service because the maemo platform mkspecs file assumes that a cross-toolchain is used all the time. If no platform file is used, then for instance certain plugins may not be built in general. There is currently an ongoing issue with the meego plugin for context management in the Harmattan components project. That is currently not built due to this issue, so no orientation works in those applications. The nice solution would be to make the maemo platform file work with cross and native toolchains as well, but that requires a decent amount of investigation and work. Thereby, the scope is extended this way for now. Change-Id: I172c7d152bdbb2db279526d9fd1ca5648d0cd0a9 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Fix repaint issue when resizing a window in WindowsMiikka Heikkinen2012-09-142-15/+5
| | | | | | | | | | | | | | | QWindowsWindow::handleWmPaint() cached the device context it got from BeginPaint call and used that for the window when the backing store blitted itself to the window. The problem with this device context is that the clipping region is set to only encompass the newly exposed areas, which means any changes caused by the resize on the previously exposed area were not repainted. Fixed by removing the DC caching. The benefit was minimal anyway. Change-Id: I8bd3c4031432ce6b52434c80bfe65d35d9feae49 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* qpa: avoid useless resize in DirectFB platformJulien Brianceau2012-09-141-0/+6
| | | | | | | | Check current size before resizing QDirectFbBackingStore through its resize() method to avoid useless deallocation/reallocation. Change-Id: Idc32eb20d3d3cac988fa9dd2feb80910303f5763 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* qpa: extend drawPixmap capabilitiesJulien Brianceau2012-09-122-33/+48
| | | | | | | | | Extend drawPixmap capabilities for qpa through new ExtendedPixmapCapability QBlittable flag and add related implementation in DirectFB platform. Change-Id: If5436e16bfb37bf081bf864cad73a5e97394df8c Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* CocoaPlugin: add missing auto release poolsRichard Moe Gustavsen2012-09-122-0/+5
| | | | | | | | | | Add auto release pools to the entry functions of the plugin that leads to mem leaks. By adding them as early as possible in the callstack, we avoid creating to many pools Change-Id: I715e06bd8d3280c6877340fc724eb1afbf804ae1 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* qpa: add non-opaque fill supportJulien Brianceau2012-09-112-12/+54
| | | | | | | | | | Add non-opaque fill support for qpa through new QBlittable flag "AlphaFillRectCapability" and add related implementation in DirectFB qpa platform. Change-Id: I863a270e24c96c432489099a34dc1f3a2be52280 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* CocoaPlugin: remove autoreleasepool warnings on 10.6Richard Moe Gustavsen2012-09-102-0/+3
| | | | | | | | | All examples running on 10.6 complained about missing autoreleasepools. This patch adds them in where they were missing. Change-Id: I18a1ddf486efdd1ece82d82d111b46e2ef064ff1 Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* Windows: Implement automatic mouse capture in QPA.Friedemann Kleint2012-09-103-23/+41
| | | | | | | | | | | | | | | | | | | | Qt expects the mouse to be captured on any button press until release. Remove flags to store capture, use WinAPI GetCapture() instead. Remove setMouseGrabEnabled_sys(), streamline code. Replacement for the reverted change 6b5bbc531b30d8ece25425e39843c6ae1af1d045 for QTBUG-25977. Task-number: QTBUG-27132 Task-number: QTBUG-27039 Task-number: QTBUG-25977 Task-number: QTBUG-26962 Change-Id: If86428eabfadcafd16da10f134a419f833185272 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* QNX: Compile. Adapting to change in QString API.Thomas McGuire2012-09-101-2/+2
| | | | | | | | Use fromLatin1() instead of fromAscii(). Change-Id: Ib3bd15a78b595d77c66fbc6d8ae50710a9e9de42 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Removing duplicate includesSergio Ahumada2012-09-093-3/+0
| | | | | | | Do not include a header more than once Change-Id: Ia2e5d66e72988ad833cf5177a3f8aa988bf510e9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QNX: Enable support for hardware buttons in QPA pluginSean Harmer2012-09-075-2/+328
| | | | | | | | Change-Id: I3de18c3fdcfdacddc375b70800b34b6a8d16ac41 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
* QWeakPointer use for tracking QObjects is deprecated.Thiago Macieira2012-09-071-2/+2
| | | | | | | Use QPointer. Change-Id: Ife3cbec620ec83a9148d274d15e44016a3f5d7d0 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* linuxfb: use linux/kd.h instead of the glibc dummyArvid Picciani2012-09-071-1/+1
| | | | | | Change-Id: I0f2e35dd82b3353f5ab5e79ba2fc654dd3b4afed Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Revert "Use true and false in preference to TRUE and FALSE"Sergio Ahumada2012-09-075-18/+18
| | | | | | | | | | | Even though I really think the change was the right thing to do, it seems like Windows people don't like this change because of some Windows Data Types specific rules. This reverts parts of the commit 56d5c909af6473be64a1ae487b45bd444a9a8553. Change-Id: I2c67d9b1bab36fc63937ef386aef56d2a4472a04 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Use true and false in preference to TRUE and FALSESergio Ahumada2012-09-056-20/+20
| | | | | | | | The TRUE and FALSE macros are obsolete and should be replaced with true and false (all lower case) respectively. Change-Id: Iee352e8173500683e6319be0abbf5bacf29016e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix Windows platform plugin narrowing conversion compile errorsJonathan Liu2012-09-052-2/+2
| | | | | | | | Implicit conversions from int to BYTE (unsigned char) result in compile errors when compiling with the GCC -std=c++0x option. Change-Id: Iaf8190426207bf15ab4b337300510596d70659ed Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Cleaner support for window flags in QCocoaWindowGabriel de Dietrich2012-09-032-37/+75
| | | | | | | | | Window flags were not properly forwarded to the platform window instance. Particularly in the use cases found in QtQuick desktop components. Change-Id: Ibeadfee7de95ba497e9c0f765acee77c84884466 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* Fix MinGW-w64 GCC 4.6.3 compilationJonathan Liu2012-09-031-2/+2
| | | | | | | | Several IShellLibrary constants and the COMDLG_FILTERSPEC struct are already defined in newer versions of the MinGW-w64 headers. Change-Id: I614b35c835123484aeeb4e61e0bae24261584da0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix QScreen::grabWindow() on Windowsaavit2012-08-301-3/+1
| | | | | | | | | | Finish up 94ac17c2ccbe3b3f3671848afda9430be214f8d5 Task-number: QTBUG-26963 Change-Id: I13f52f0a6cf460d525b53338738aecd4b3cf313c Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix MinGW-w64 TDM64-GCC 4.6.1 compilationJonathan Liu2012-08-301-5/+28
| | | | | | | | | | | This fixes a regression introduced by f58390e0f495e229d9f2f1301c3a9dec978af9c2 because __MINGW64_VERSION_MAJOR is the same in older releases of shobjidl.h that do not declare the IFileDialogEvents interface. Task-number: QTBUG-24699 Change-Id: I000a5b9baf52363dfdedff2fb29bbe7ab24df5ca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Avoid a warning from the QNX QPA plugin.James Turner2012-08-301-0/+11
| | | | | | | | | | | | The HDMI display on the Playbook is listed, but (normally) unattached, and hence generates an error if we attempt to register for events. This patch avoids the warning; a future change will actually watch for screens being attached / detached and update the QPlatformScreens and event registration correctly. Change-Id: I5a9cc773648d50f657fe1b3611fd42495ca7e836 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Revert "Fix transformation in eglfs backingstore"Jon Trulson2012-08-291-2/+2
| | | | | | | | | | This reverts commit 12491f35bbea7008b15fb0ba0ee7ea5bf6eb6b6c. This change is not needed on eglfs. It causes widget based apps to be rendered with Y inverted. Change-Id: Idb23fa22c438442b81882b64bf84d6aa0662d27b Reviewed-by: Laszlo Agocs <lagocs83@gmail.com>
* Fix missing cleanup of native Cocoa menus.James Turner2012-08-282-0/+11
| | | | | | | | | | | QCocoaMenu was missing a destructor to release various native resources, and this causes issues with pop-up menus when the Qt peers are recycled on successive shows of the same menu. Task-number: QTBUG-27022 Change-Id: I3cdf979804358ce10fe8a87c9e2c90419c6e0b48 Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* OSX: Drag and Drop QMimeData.Christoph Schleifenbaum2012-08-251-4/+17
| | | | | | | | | | | | When dragging and dropping within the same application, the QDropEvent should contain exactly the same instance of QMimeData as it was set to QDrag. This solves the problem in https://bugreports.qt-project.org/browse/QTBUG-26953 Change-Id: I3bc4da845ff4293c509343c1c8c62fc331416ec0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* xcb: fix unused static warningMarc Mutz2012-08-231-0/+2
| | | | | | | | | The variable ptrXcursorLibraryLoadCursor is only used in code wrapped in XCB_USE_XLIB. Change-Id: If0b4997ac6e80a3709263d9793d1ca0dfd5907f3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* linuxfb: remove unused functionMarc Mutz2012-08-231-10/+0
| | | | | | | | debug() isn't even referenced in commented-out code, and GCC warns about it being unused, so remove. Change-Id: I2830b7932e18cdd3643925973995bea7fea9f277 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fixed missing window decorations on compiz.Samuel Rødal2012-08-231-3/+1
| | | | | | Task-number: QTBUG-26954 Change-Id: I6981338d4bbc9cf1440c9d67e9d034e0553dfeae Reviewed-by: Jason Barron <jason.barron@nokia.com>
* Fix transformation in eglfs backingstoreLaszlo Agocs2012-08-221-2/+2
| | | | | | | | | | | | While not visible with forced-fullscreen windows, the formula used to set up positioning on the Y axis is wrong. (with the GL coordinate system Y goes 1..-1 when moving top-to-bottom) Taken from kms' version of the backingstore which had the formulas corrected. Change-Id: I460a4eec925e47b08453af4e093d719567af22ea Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fixed non-GL applications crashing when GLX/EGL initialization fails on xcb.Samuel Rødal2012-08-221-15/+20
| | | | | Change-Id: I5a08d6067272575aa56074aaebe308c3d49299bb Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add hint for touch -> mouse event synthesizingMorten Johan Sorvig2012-08-221-0/+3
| | | | | | | | | | | | | | | | | Commit 7808ec79 changes QApplication to synthesize mouse events from (unhandled) touch events. On Mac OS X this creates a conflict for two-finger scroll swipes, which generates both touch events and mouse wheel events: scrolling in QTextEdit will also select the text. Add a SynthesizeMouseFromTouchEvents platform style hint that enables the event synthesising. Set to true by default and false in Cocoa. Change-Id: I1ffa5a141476aa38b81ce92a87eff676c7ec2276 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix a bunch of Mac/clang specific warningsJiang Jiang2012-08-215-4/+6
| | | | | Change-Id: I0ecc67d58fb7e727a88a5f546eeca01ff7554502 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: use filterNativeEvent instead of the deprecated filterEventThiago Macieira2012-08-201-3/+3
| | | | | Change-Id: I76259d1a0d978fb2f7fb60cd0d05990365691b7e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix C++11 mode compilation with MinGW-w64 4.7.1Yuchen Deng2012-08-201-2/+2
| | | | | Change-Id: I8b840ece7341877fb6f5d6a85d8714517034e319 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix freetype font rendering for Windows CEAndreas Holzammer2012-08-201-0/+47
| | | | | | | | | | Windows CE does not have support for GetGlyphOutline. So addGlyphToPath will not work. QML uses it for their distance field rendering. One option to bypass this issue is to use freetype as rendering backend. Change-Id: I965254344945cbdad771a5d505fb61c1cc2087df Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix in-process QAxServers inside modal windows.Miikka Heikkinen2012-08-202-0/+17
| | | | | | | | | | | | | | | | The main window of in-process QAxServers doesn't have QWindow parent, but it does have native parent that is part of the native window tree of the application. The lack of Qt parent makes embedded controls look like toplevel windows, which causes problems e.g. with modality. Introduced new optional method QPlatformWindow::isEmbedded() to detect if a window is an embedded window and utilized it in proper places during modality handling. Task-number: QTBUG-26871 Change-Id: Iac9a51dae06b8fc15410de7838857e203e4275b8 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix drag curor visibility on Windows.Janne Anttila2012-08-201-2/+0
| | | | | | | | | | | | | QDrag has an API to set both pixmap (QDrag::setPixmap) and drag cursor (QDrag::setDragCursor): http://qt-project.org/doc/qt-5.0/qdrag.html. We cannot return from createCursors if there is no pixmap, but we need to go through also dragCursor and use those if one is set. Change-Id: If2b2139ad193a4ab5b25c65400c595dc7c33de2c Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Clean up QScreen::grabWindow()aavit2012-08-182-3/+9
| | | | | | | | | | | Handle 0 WId parameter as meaning "desktop window"/whole screen. Also, re-add the default values for the grab area, both for convenience and compatibility with QPixmap::grabWindow() in Qt4. Update the screenshot example so it doesn't comlain about usage of deprecated QPixmap::grabWindow(). Change-Id: I2ad229113ddb8ded0388f2ebc0e8c703c6657f1f Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Doc: Fix spelling errorsSergio Ahumada2012-08-171-2/+2
| | | | | Change-Id: Ibae8d10183f6b15a16b1499daa2df8802dbb014e Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* QNX: Allow app to run when spurious 2nd screen is reportedSean Harmer2012-08-171-4/+4
| | | | | | | | | | | | | | On the PlayBook, libscreen always seems to report the presence of a 2nd display even when none is connected. This of course leads to the failure to query this display for its physical size. This patch relaxes the demand for a physical size to being for the primary screen only. Change-Id: If30b1fd704e7a194a426a0a9f0b85557478105f7 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* WinCE: Fix call of GetAncestor in setParent_sys()Kevin Funk2012-08-171-0/+9
| | | | | | | | | | There is no GetAncestor under Windows CE. Use GetParent instead. Change-Id: I87b86961dade0d5c7c8bf6a470f777d32188dcd2 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix setParent_sys() to use native methods when checking for toplevelMiikka Heikkinen2012-08-171-1/+8
| | | | | | | | | | | QWindowsWindow::setParent_sys() was checking if window was toplevel using non-native method, which caused wrong result in some cases involving native windows. Changed the toplevel check to utilize native method instead. Task-number: QTBUG-26826 Change-Id: I72ca17c53c1ed7611f141cee17b2edaaa80c6c17 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix GDI object leakMiikka Heikkinen2012-08-171-1/+1
| | | | | | | | DeleteObject parameter must be a handle, not a pointer to a handle. Task-number: QTBUG-26835 Change-Id: Id5de2b0b067bd9fc45c1c8ead4f7d67f0162f070 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>