summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
* Windows: Store only full-size DC's obtained by BeginPaint.Friedemann Kleint2012-06-072-8/+13
| | | | | | | | | | | Avoid painting bugs in case the DC covers only a part of the window and QBackingStore does a full flush. Task-number: QTBUG-26039 Change-Id: Ic918d9898ac824690273ac59bcb1e7e546cc698a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QNX: Take nativeOrientation into account for QNX device orientationsSean Harmer2012-06-061-10/+25
| | | | | | | Change-Id: Idfe4a5bd9c9638a1f9ae52a7b1def3f869286587 Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fixed compile error in eglfs plugin due to narrowing conversion.Samuel Rødal2012-06-061-4/+8
| | | | | | | | | qeglfscursor.cpp:300: error: narrowing conversion of ‘((const QRectF*)r)->QRectF::left()’ from ‘qreal’ to ‘const GLfloat’ inside { } Change-Id: Ic4273828ad361ffac5a68068372bf400d468fb38 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Cocoa: do not send multiple window activation eventsBradley T. Hughes2012-06-061-2/+9
| | | | | | | | | | | | | | When switching the active window within the same application, Cocoa sends us an NSWindowDidResignKeyNotification for the old activated window, then an NSWindowDidBecomeKeyNotificationfor the newly activated window. Our handling of this would first set Qt's active window to zero, then immediately reset it afterwards. Avoid this by checking the key window when handling the deactivation event, and don't set the active window to zero if a new window has become active. Task-number: QTBUG-24322 Change-Id: I8719fc501049eeaaebb75e9ea03261b2209458b6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: Fix QCocoaBackingStore::flush on 10.8Morten Sorvig2012-06-061-1/+11
| | | | | | | | | | | | | | | | The call to displayRect works on 10.7 but does not update the pixels on screen on 10.8. Many Qt windows do not update properly. This is a workaround found by trail and error without fully understanding the underlying issue. I would like to have this in place until we can determine the cause of the bug. Change-Id: I1ecee745f42a93ded4f651cc8ad51963f250e78d Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Do not set an action on native submenu items on MacPasi Matilainen2012-06-061-1/+2
| | | | | | | | | | | | | On Mac, clicking on a submenu entry triggers QMenu::triggered(QAction*) signal, which is unexpected, and also closes the submenu, which does not match platform behavior. This happens because native submenu items have an action set, so fix it by not setting the action. Task-number: QTBUG-16738 Task-number: QTBUG-10706 Change-Id: I6819999e5af35e6acab1aec035d5d85445189f11 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* eglfs refactor: Query screen and format info from hooksGirish Ramakrishnan2012-06-054-42/+42
| | | | | | | | This allows boards to customize what they really work best for without having to set environment variables. Change-Id: Ib40c3a870ade568f66e37e621a8abc6b17e39411 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* eglfs refactor: Move egl initialization to the integrationGirish Ramakrishnan2012-06-054-42/+44
| | | | | Change-Id: If2c870538c742fd034fb9e5c115e4ac0bd8e2e03 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Verify the surfaceType before activating the GL contextHolger Hans Peter Freyther2012-06-056-1/+12
| | | | | | | | | | | | Verify that the surfaceType() of the QPlatformContext is of type OpenGLSurface before making the context active. Make it possible to get the QSurface from a QPlatformSurface, make QPlatformWindow use that to access the QWindow. Remove the setSurfaceType call from the eglfs plugin as this hiding a problem. Change-Id: I08906da052e066bb1f1f042030643c6389ab17d7 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Use QPointer instead of QWeakPointer.Stephen Kelly2012-06-051-1/+2
| | | | | | | | The use of QWeakPointer for tracking QObject pointers is to be deprecated. Change-Id: If460ca7f515db77af24030152f4bd56e1a5fae7c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNX: Implement QQnxScreen::nativeOrientation()Kevin Ottens2012-06-052-0/+11
| | | | | | | | | | Provide a proper version of nativeOrientation(). We use the screen physical size as reported by the device to determine its native orientation. Change-Id: I45b593b0d62436529f89050e98e10b8c9463b6b9 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* directfb: Compile with C++11 support enabledBradley T. Hughes2012-06-051-2/+2
| | | | | | | | | | | | | qdirectfbblitter.cpp:146: error: narrowing conversion of 'srcRect.x()' from 'qreal' to 'int' inside { } qdirectfbblitter.cpp:152: error: narrowing conversion of 'rect.x()' from 'qreal' to 'int' inside { } The same error exists for calls to y(), width(), and height() at both locations. Change-Id: I14f165a6a1cab9502e157e798157b835faf2300f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* The QFontEngineFT files are not built into QtGui anymore.Thiago Macieira2012-06-051-3/+1
| | | | | | | | | | | | | These files are only built into QtPlatformSupport, so the Q_GUI_EXPORT macro is now wrong. Remove it. Additionally, since these files are built into QtPlatformSupport, the windows platform plugin does not need to build them again. To-Do: move the files to src/platformsupport/fontdatabases Change-Id: I9d69b97ca25ee52ab627cfa633f43b277acc5e05 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* eglfs: Create mouse, keyboard and touch handlers by defaultGirish Ramakrishnan2012-06-022-2/+15
| | | | | | | | | | | | | | | | | Prior to this change, input support for eglfs was loaded as plugins. With this change, eglfs supports evdev based keyboard, mouse and touch input out of the box. The event dispatcher is created in the constructor because the evdev code creates QSocketNotifiers in the constructor which requires an event loop. Change-Id: I4e08f4121b9381ee5b414d0886eae2b8a2925800 Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com> Reviewed-by: Romain Pokrzywka <romain.pokrzywka@kdab.com> Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Implement QXcbWindow::setWindowIconCorentin Jabot2012-06-024-0/+49
| | | | | | | Change-Id: I1908cbef0c20d3725423b559f234bd6d3ddd4167 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* eglfs: implement hardware cursor for the raspberry-piGirish Ramakrishnan2012-06-017-41/+80
| | | | | | | | | | | | | | | | The cursor is rendered on a dispmanx layer and moved around. This approach saves us from having to update the underlying window each time the cursor moves. Dispmanx layers cannot be moved to negative coords. As a result, currently it is not possible to move to a location less than the hostpot. A future commit will fix this problem. Change-Id: Ida5ee961d03a6929860c515e503482756a4913ed Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com> Reviewed-by: Andy Nichols <andy.nichols@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* eglfs: allow cursor to be created without a contextGirish Ramakrishnan2012-05-313-22/+39
| | | | | | | | Textures are now created and uploaded on demand on first render() call where we are guaranteed to have a current GL context. Change-Id: I352c876dd1d8b7ed73536de21fa2880cdc6bdb60 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove QCursor::handleGirish Ramakrishnan2012-05-311-1/+1
| | | | | | | This used to be the Qt/Embedded's QCursor handle implementation. Change-Id: I31b8ed44ac9325defcb13d887949d9536a262be8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows: Add ANGLE support.Friedemann Kleint2012-05-317-9/+360
| | | | | | | | | | | | | | | | | | - Add QWindowsEGLContext usable for ANGLE and Windows CE. - Add QWindowsEGLStaticContext containing the display for resource cleanup. - Add EGLSurface to QWindowsWindow. - Add a -angle option specifying the path to the external ANGLE installation to configure, add libraries to the mkspecs. Initial-patch-by: Jabot Corentin <corentinjabot@gmail.com> Task-number: QTBUG-24207 Change-Id: I5f80b1efb6996da7c5d70aa3720f7801c9e4c6af Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* directfb: Allocate a special surface for OpenGLHolger Hans Peter Freyther2012-05-302-1/+34
| | | | | | | | | | Allocate an RGB16 surface when we need to use OpenGL, set the custom DSCAPS_GL for this EGL mode. The broadcom hardware would allow us to use ABGR but we have some issues with the QSurfaceFormat to select the right kind of surface. Change-Id: I0fff7906154f3d7afb35b2b5d2bb91510cf3aa4d Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* KMS platform plugin: Introduce default cursor for better usability.Samuel Rødal2012-05-301-0/+8
| | | | | | | | Similar to the default cursor in eglfs, not having it makes it hard to interact with Qt applications using the evdevmouse plugin. Change-Id: I9638267c7d790d91b66620e4a82d86f299061922 Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* eglfs: keep context active only during flushGirish Ramakrishnan2012-05-301-2/+4
| | | | | | | | The OpenGL context needs to be current only while flushing the backing store. Change-Id: I4d6a10f22bcfe04f35a14a690180237f6c691829 Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Add minimalegl QPA platform pluginGirish Ramakrishnan2012-05-3012-0/+929
| | | | | | | | | | | | | | | The EGLFS platform plugin was originally meant to be an example and thus to be kept simple. However, EGLFS is becoming more and more complex with the addition of hooks for board support, cursor integration, built-in evdev support etc. minimalegl is a new platform plugin that intends to follow the original intentions of EGLFS. The code is an adaptation of EGLFS as of f913859f8 Change-Id: I3d4cf84cde380cdcc7e0e8bfefff4df6be731b8d Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Allow a window subclass to allocate a different kind of surfaceHolger Hans Peter Freyther2012-05-304-16/+21
| | | | | | | | | | | | A subclass of QDirectFbWindow might need to allocate a window with different surface flags. This is the case for the DirectFB EGL plugin and QSurface::OpenGLSurface type of surfaces. Add createDirectFBWindow, make it virtual and call it from the platform integration classes. Add an assert to verify that this method is only called once. Remove the pre DirectFb 1.1 code as it was never really tested. Change-Id: Icf3d262f40bca70e376043935eeb292958f6df5d Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Fix compile error in eglconvenienceGirish Ramakrishnan2012-05-301-2/+1
| | | | | | Change-Id: Ic20d890a9c59e21a5f0c81f961074ab02083a266 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* directfb: description.surface_caps was already assigned conditionallyHolger Hans Peter Freyther2012-05-301-1/+0
| | | | | | | | We have already assigned this flag in case the IDirectFBSurfaceLayer has the capability of premultiplied alpha. Do not set it unconditionally. Change-Id: Id5f9bd6bdfa29dc9cd35d913b61fb55c09f54864 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Make popup windows show on the correct desktop.Morten Johan Sorvig2012-05-301-0/+7
| | | | | | | | | | | Set NSWindowCollectionBehaviorFullScreenAuxiliary for Qt::Popup windows. This will make them show on the same desktop as their parent full-screen window. Change-Id: Ice1bd50976ef0cd66b01a683a43e08e782573153 Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fixed KMS y-invertedness.Samuel Rødal2012-05-2912-447/+177
| | | | | | | Upgrade to new gbm_surface API which lets us use eglCreateWindowSurface. Change-Id: I4af86d442375017ae3b4744e7b3bdebf3b496b6e Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* QtPrintSupport - Add QPrinterInfo api for more printer detailsJohn Layt2012-05-291-0/+6
| | | | | | | | | | | | | | | A previous commit changed the Mac behaviour for printerName() from returning the CUPS Description to returning the CUPS Name. In case anyone was relying on this for a human-readable name add new api to return the CUPS Description. Also add the Location and Make and Model which will be used in the Unix print dialog instead of directly calling CUPS. Change-Id: I9901bf8d6368466adf111580f5db5a3f01ca9170 Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: John Layt <jlayt@kde.org>
* eglfs: Don't update screen for non mouse-move eventsGirish Ramakrishnan2012-05-291-0/+2
| | | | | | | Change-Id: I7df089a9dc87396e19c08cef3d76c7c7f95a8fbf Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Andy Nichols <andy.nichols@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add q_printEglConfig to qeglconvenienceGirish Ramakrishnan2012-05-291-43/+1
| | | | | | | The code was initially part of eglfs. Change-Id: I8aa6e77edec85ab2b23765ca04e4416757f3bed6 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* eglfs: remove support for widget rendering using opengl paint engineGirish Ramakrishnan2012-05-292-26/+0
| | | | | | | | | | The eglfs backing store code can render either using the raster paint engine (through QImage) or using the opengl paint engine. Rendering quality using the opengl paint engine is pretty poor so remove it. Change-Id: I64061ceb3a480049cfebe61aaf172ad1f1da7042 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* eglfs: release shader program after useGirish Ramakrishnan2012-05-291-1/+1
| | | | | Change-Id: Ibe89de88c6c01d182a240def92eb78c0cc896463 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* eglfs: rename QEglIntegration to QEglFSIntegrationGirish Ramakrishnan2012-05-292-6/+6
| | | | | | Change-Id: Ifa096537d417571ed660a63a501fed188186f400 Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QApplication::activeWindow is replaced by QApplication::focusWindowThiago Macieira2012-05-291-1/+1
| | | | | Change-Id: I28ec9b59171fbacbe5c7c0dd1cc998d75538545f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows QPA plugin: Add \internal to class documentation.Friedemann Kleint2012-05-2922-7/+56
| | | | | | | | Prevent the classes from appearing in the Qt documentation. Change-Id: I62abff0c57effdf16629f9d5a0dc384ea2c43d5a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Qt 5 to-do in QXcbKeyboardGatis Paeglis2012-05-261-2/+2
| | | | | | | | Rescheduling to Qt 6 since Qt 5.0 was decided to have as little source incompatible changes as possible. Change-Id: I47cd3e236dd90717efb287aef8fbbedacea1bc0f Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* QNX: Adding native file dialog support for BlackberrySean Harmer2012-05-269-6/+487
| | | | | | | | | | | | | This patch enables use of native file dialogs in the application modal case. The native file open dialog is reasonable but the native file save dialog could do with some improvements to make it more usable. Perhaps providing our own "native" dialog UI would be an option once the widget style is finished. Change-Id: If5fb7cf73d27e52db7bfa6d97d8f8fb7912960bb Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
* Fix xcb plugin compilation for -qconfig largeTasuku Suzuki2012-05-2611-1/+65
| | | | | | Change-Id: I1ee1fb9c140396e83272d607ee4dd63ce2c50b8d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* XCB/EGL: Free display.Friedemann Kleint2012-05-251-0/+5
| | | | | | | Fix valgrind reporting resource leaks. Change-Id: I4c2038f61b63dc5b6bc0c7eca43f0f339ddf723a Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Fix warnings about unused variables.Friedemann Kleint2012-05-251-1/+1
| | | | | Change-Id: Ie95f032981d2ce68b1193725ab55ac207d187525 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* eglfs: use GL API directly in QEglFSCursorGirish Ramakrishnan2012-05-252-12/+53
| | | | | | | | | | | | | | | | | | | | | The upcoming hardware cursor support for pi requires the cursor code to render with it's own context. This is because the cursor rendering happens in the input event (gui) thread which may be different from the the scenegraph thread. Currently, Qt can be informed about the current opengl context by using QOpenGLContext::makeCurrent(). All of Qt's helper OpenGL classes complain if that function has not been called. Usage of makeCurrent API requires a QSurface. A big rewrite of EGLFS is needed to make such a QSurface (QEglFSWindow) available to the cursor code. There is no other way around this since Qt has no other API to inform it that an opengl context is active. The solution is not use Qt's OpenGL helper classes and use GL API directly. Change-Id: If47030d9a289686ebf2e758f90445323d1733dc0 Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* QNX: Rationalise the usage of qDebug() to remove lots of #ifdef'sSean Harmer2012-05-2522-716/+374
| | | | | | Change-Id: I097e4af86a6a0941f4fd7e122970f88ba536ab38 Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com> Reviewed-by: Andriy Golovnya <andriy.golovnya@googlemail.com>
* Windows: Fix verbose debug outputMiikka Heikkinen2012-05-241-1/+1
| | | | | | | The isEmpty() check for environment variable contents was inverted. Change-Id: Ic220f4eed9e45539d6e89fe1e0d37976f7757eda Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QPA: Refactor QFileDialogPrivate::qt_clean_filter_list for QPASean Harmer2012-05-241-2/+2
| | | | | | | | | | Allows QFileDialog and QPA plugins to access this helper function. Needed by the Cocoa and QNX plugins. This commit fixes up the Cocoa plugin. The QNX support will be in a follow-up commit. Change-Id: I8dd08a9f3dc27d85edd0dc9dad9629406c1e677a Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* QNX: Recreate EGL surface when the window geometry changesKevin Ottens2012-05-241-0/+16
| | | | | | Change-Id: Ic578e9c3f4d8f70bcac0d95f59942cd2724aee51 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
* QNX: Make sure calls to (create/destroy)Surface are symmetricKevin Ottens2012-05-242-3/+3
| | | | | | | | | As a matter of fact also reduces state duplication with QQnxWindow by getting rid of m_surfaceSize. Change-Id: I47f5af0f00a317d3bb246c0c9161e2219fbd3263 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
* QNX: Advertise geometry changes to Qt event systemKevin Ottens2012-05-241-0/+2
| | | | | | | | | Some QWindow subclass rely on those events to be sent to know when the window geometry changes (e.g. QQuickCanvas). Change-Id: I16d3928803d09761f265544fdf10a5d080fccc17 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
* QNX: Force windows resizing when the screen orientation changesKevin Ottens2012-05-241-0/+1
| | | | | | Change-Id: I82e464df86b55f04498a8f6f5c1cc5011cac0bd6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
* Add QMacPasteboardMime::count(QMimeData*).Morten Johan Sorvig2012-05-243-8/+17
| | | | | | | | | | | | As QTBUG-25076 points out, the ### comment indicates that we want to add virtual function to QMacPasteboardMime. The default implementation returns 1. Reimplement for QMacPastebardMimeUrl and return the url count. Change-Id: Ie300574eab9991af625986805d2b030914291cc0 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>