summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
...
* Correctly reimplement QPlatformCursor::pos() in QCocoaCursorBradley T. Hughes2011-12-092-2/+2
| | | | | | | | QPlatformCursor::pos() is a const function, the reimplementation should be as well. Change-Id: I7e37e41086e3b329dc31ebc060fcb0915771d884 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Extend touch events.Laszlo Agocs2011-12-094-8/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The capability flags indicate which information is valid in the touch points. Previously there was no way to tell if e.g. the value returned by pressure() is actually the value provided by the driver/device or it is just something bogus due to pressure not being supported. The points' flags return information about the individual touch points. One use case is to differentiate between touches made by finger and pen. Velocity, if available, is now also exposed. Each touch point can now contain an additional list of "raw" positions. These points are not reported individually but are taken into account in some way by the underlying device and drivers to generate the final, "accurate" touch point. In case the underlying drivers expose these additional positions, they are made available in the lists returned by the touch points' rawScreenPosition(). The raw positions are only available in screen coordinates to prevent wasting time with mapping from global positions in applications that do not use this data. Instead, apps can query the QWindow to which the touch event was sent via QTouchEvent::window() and can call mapFromGlobal() manually if they need local raw positions. The capability and device type information is now held in a new QTouchDevice class. Each touch event will contain only a pointer to one of the global QTouchDevice instances. On top of type and capability, the new class also contains a name which can be used to differentiate between multiple touch input devices (i.e. to tell from which one a given QTouchEvent originates from). The introduction of QTouchDevice has three implications: The QTouchEvent constructor and QWindowSystemInterface::handleTouchEvent need to be changed (to pass a QTouchDevice pointer instead of merely a device type value), and each platform or generic plug-in is now responsible for registering one or more devices using the new API QWindowSystemInterface::registerTouchDevice. Change-Id: Ic1468d3e43933d8b5691d75aa67c43e1bc7ffe3e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add support for three new X11 keysAlbert Astals Cid2011-12-092-0/+12
| | | | | | | | | New keys are: XF86XK_TouchpadToggle, XF86XK_TouchpadOn and XF86XK_TouchpadOff Change-Id: I51c0330213def093adf959d4065ee6d7c1f66d76 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Cocoa: remove autoreleasepool in QCocoaIntegrationMorten Johan Sorvig2011-12-082-4/+0
| | | | | | | | | | | | | This one was far to long lived and would delay releases until application shutdown. We might get more "no autoreleasepool in place" warnings now, these should be fixed by adding local auto release pools. Change-Id: Ia7a46ab05fb1937154997d0c47b8899d2a0cef65 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* Better handling of GLX / EGL errors.Samuel Rødal2011-12-073-5/+31
| | | | | | | | | | If context creation fails, try again without a shared context. Added QPlatformOpenGLContext::isSharing() and QPlatformOpenGLContext::isValid() to propagate whether the platform context was successfully created with or without sharing. Change-Id: I37080b645f531fd207946441057be6d3f6be3f6e Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfbegl: Add unimplemented QDirectFbWindow::eglSurface, build fixHolger Hans Peter Freyther2011-12-062-1/+16
| | | | | | | | | | | QDirectFbScreen needs to have the full QDirectFbCursor definition, include the header file directly instead of a forward declaration. Impelement QDirectFbWindowEGL::eglSurface to return the EGLSurface of the underlying DirectFBWindow. Change-Id: Ib6765331ffea6e0b5f10f738d9e05320b7f8155f Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Ask for a context that is likely to be supported.Gunnar Sletta2011-12-061-1/+2
| | | | | | | | | | Most embedded GL chips support 24-bit depth with packed 8 bit stencil, but more rarely 32-bit. Asking for 32 bit means we often fail on other properties to, such as multisampling. Change-Id: Ib913d94af0635b09913ff15cff54cc694ba293fc Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Cocoa: Handle accessible interface children.Morten Johan Sorvig2011-12-021-2/+27
| | | | | | | | Implement AccessIbleChildrenAttribute and accessiblityHitTest. Change-Id: Ia9fa80e3015edbb969d173a2587cb53b9c69852e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Don't inherit QAccessible from QWindowsAccessibleJan-Arve Saether2011-12-021-27/+27
| | | | | | | Qualify all references to QAccessible members with QAccessible:: Change-Id: Ia78d8482bbab3d77c9e258a52bc74f8e7c0c7e10 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* directfb: Introduce EGL integration for DirectFBHolger Hans Peter Freyther2011-12-028-4/+327
| | | | | | | | | | | | Introduce a new platform called 'directfbegl' that allows platform integration with EGL. Change the QDirectFbIntegration to make it more easy to hook up in the creation process, introduce an EGL integration with custom screen, window and EGL Platform Context. Vendors might need to add custom code to initialize EGL to be used with DirectFB, this can be done in QDirectFbScreenEGL::platformInit. Change-Id: I7bee277ede27c72437cd7c5977fa6ed85e65f538 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Use QT_BEGIN_NAMESPACE/QT_END_NAMESPACE around the codeHolger Hans Peter Freyther2011-12-029-0/+32
| | | | | Change-Id: Iabf32130dcfe4f5a383e9c99f661ded176432817 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Move the macro to the qdirectfbconvenience header fileHolger Hans Peter Freyther2011-12-022-5/+6
| | | | | | | | We will need to have logging outside of the blitter code, make the macro available to everyone. Change-Id: I811ecb98a870a818630276b5daa788790db71ccd Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Fix image format use in cocoa pluginGunnar Sletta2011-12-012-2/+2
| | | | | | | | | | | | The screen should be opaque. It is used to create the default pixmap data which should be RGB32 on mac. The backing store uses premultiplied in the resize but initializes with non premultiplied. Unify this to all premultiplied Change-Id: I7d17d492fcff30b555a768da852ff9be0a9d96aa Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Mac Core Text font database for QPAJiang Jiang2011-11-302-5/+3
| | | | | | | | | | | | | | Add Core Text fontdatabase for Mac and use it as default. It also reenabled Core Text font engine for native font rendering on Mac, though it's not used in declarative UI (by default declarative will still use scenegraph, which will only use this font engine for retrieving font metrics and outlines). With the new fontdatabase it's now possible to load all the fonts installed in the system as well as adding application fonts. Change-Id: I0d2aa1420019adf6d0f70dd147a9d71b2684d3f1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Include qglobal.h first in qnsview.mm compilation unit.Zeno Albisser2011-11-302-0/+4
| | | | | | | | | | If cocoa headers are being included first, this messes up the defines MAC_OS_X_VERSION_MAX_ALLOWED and MAC_OS_X_VERSION_MIN_REQUIRED when compiling with clang. Change-Id: I07177d07a0ac7c5f7e72b04f42d6343e689e0d33 Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Prevented Xlib sequence errors in xcb plugin.Samuel Rødal2011-11-291-0/+1
| | | | | | | | | | | | | | Prevent Xlib errors of the form "Xlib: sequence lost (0x2716a > 0x1717c) in reply type 0x11!" from being printed. We know the cause of these is because we're manually calling the XESetWireToEvent handlers since those are not handled by XCB, and this confuses Xlib since it's then seeing events with old sequence numbers. We simply set the sequence number to the latest sequence number and the errors go away. Change-Id: I2a9e7a7cfd0ba8692e43ce61f796a8189305e0d3 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
* Remove QPlatformPrinterSupport usageJohannes Zellner2011-11-292-9/+0
| | | | | | | QPlatformPrinterSupport seems to not exist anymore. Change-Id: I142ce99877620e0b678fd6693bc72257ca230e4f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fixed Qtbase OSX specific namespace compilation.Toby Tomkins2011-11-295-2/+18
| | | | | | Change-Id: Idacfa679df7aa6417f8017f80928907830d15df2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix a small memory leak in QXcbIntegration.Jędrzej Nowacki2011-11-292-15/+12
| | | | | | | Prefer to use a smart pointer over a raw pointer. Change-Id: If8b5cbef8767433eab2f82c14abaa9608b8e61d0 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QtGui: Bring back HBITMAP/HICON conversion functions.Friedemann Kleint2011-11-285-394/+8
| | | | | | | | | | - Move the conversion functions from the Lighthouse plugin to QtGui as qt_pixmap/From/To/HBITMAP/HICON(). - Re-enable them in Widgets (QFileIconProvider, QWindowsStyle). - Use them in QtPrintSupport. Change-Id: I1436bc604160d94c78ef270ad2b31bf3b20b5c90 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Introduce QWindowSystemInterface::handleSynchronousCloseEventGunnar Sletta2011-11-251-1/+1
| | | | | | | | | | | | And use it from the Cocoa backend. In general, for threaded GL rendering to work, any function that affect the surface must be synchronous, so the implementor (such as QQuickCanvas) can pick it up and block until the GL context has released the surface. Otherwise, we will crash. Change-Id: Id8484dac7452fe96fa80ade4ea321145f32124b4 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Change default implementation of window() to just return 0Jan-Arve Saether2011-11-251-2/+17
| | | | | | | | Instead move the traversal up to the ancestors to the bridge. This simplifies the default implementation to just return 0 Change-Id: Ic3ec60851f378587f4a23363aec2039d0e8a08a1 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Make cocoa opengl backend threadsafe.Gunnar Sletta2011-11-252-9/+1
| | | | | | | | | | The current implementation on Mac OS X called update() inside the cocoa plugin from the GUI thread, which breaks when trying to use the GL context from another thread and the window gets resized. We now only call it from makeCurrent() Change-Id: I025aad3a3b140e85e729816bf3b68827337cc80d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* directfb: Use the QPlatformWindow in the DirectFB BackingstoreHolger Hans Peter Freyther2011-11-243-8/+10
| | | | | | | | | Remove usage of QDirectFbConvenience::dfbDisplayLayer in the QDirectFbBackingStore code and resolve the IDirectFBWindow through the QPlatformWindow. Change-Id: Ia7db8dedc91096648bc9de029d034002ba0d6a03 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Get the IDirectFBDisplayLayer through the QPlatformScreenHolger Hans Peter Freyther2011-11-244-5/+15
| | | | | Change-Id: I1e8bacc2a5c39065f1c0667cda900730c5670066 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Fix the typo in the parameterHolger Hans Peter Freyther2011-11-241-1/+1
| | | | | Change-Id: I3d373872c533bc4b6f4f010f5cce4dbb41dbb561 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Remove dfbDisplayLayer from QDirectFbInputHolger Hans Peter Freyther2011-11-243-8/+7
| | | | | Change-Id: I2ae61c40c28b337448077cff5643a007b54a3d71 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Pass the IDirectFBWindow to the QDirectFbInput methodsHolger Hans Peter Freyther2011-11-243-16/+26
| | | | | | | | No need to go from IDirectFBWindow -> WindowID -> IDirectFBWindow to attach the event buffer for the event system. Change-Id: Ia5f7c20d06e8e1da5142f1bd99ca69906107adba Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Use DirectFBErrorFatal for errors we don't handle wellHolger Hans Peter Freyther2011-11-241-5/+4
| | | | | | | | | In case we fail to initialize DirectFB, use the DirectFBErrorFatal to quit as there is no way we can recover from this error and the QPA backend has already been selected. Change-Id: I8001bf32d0a14ba21c2ec13121748a6384b87c2b Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Access the screen layer through QWindow::screen()Holger Hans Peter Freyther2011-11-245-4/+30
| | | | | | | | | Instead of assuming which layer was assigned to Qt, resolve the to be used layer via QWindow::screen()->handle(). Add a method to the DirectFB QPlatformScreen to provide a pointer to the IDirectFBDisplayLayer Change-Id: Iaea9466ca84daff752a4932deafbe38f48123715 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* directfb: Move QDirectFbScreen into a separate fileHolger Hans Peter Freyther2011-11-246-63/+151
| | | | | | | | The screen handling will get a bit more complex due the integration of different ways to do OpenGL. Move to a new file. Change-Id: Ibe3e397d13da1b270ec4afaf046d28be50e976f9 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Remove virtual child integers.Frederik Gladhorn2011-11-231-28/+83
| | | | | | | | | | | | | | This makes the accessibility apis much simpler and less error prone. Disable the itemviews implementation that is in complex widgets. The itemviews will use the new code from itemviews.h/cpp everywhere now. QToolBox was broken before, now at least it simply exposes all its children. The children are the buttons (tabs of the toolbox) and their contents. Change-Id: I45e218f49f02aebbd678ddfe29f94c2a112a2125 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Accessibility: Clean up usage of navigate.Frederik Gladhorn2011-11-211-4/+2
| | | | | | | Prefer to use parent/child functions instead. Change-Id: Ic92165b9439eb750c9d762ddf5dcd2a5ccf0277d Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Fix a memory leak in QXcbConnection.Jędrzej Nowacki2011-11-182-3/+3
| | | | | Change-Id: I2307bf434c53d9321c71609eeacc1f3883bbbb13 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* qtbase: Warnings fixes.Friedemann Kleint2011-11-181-2/+1
| | | | | Change-Id: Ie97e36bc168b3de3cae2d0eb615e777884529a06 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fixed crashes from tests using xcb plugin with -qtnamespace.Rohan McGovern2011-11-1812-2/+49
| | | | | | | | Use QT_BEGIN_NAMESPACE/QT_END_NAMESPACE consistently in xcb plugin. Some, but not all, of the sources were already using QT_BEGIN_NAMESPACE. Change-Id: I23b83cc88870fd4039437b733084ab86dd807356 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Add correct event mask for Qt::WindowTransparentForInput in xcb pluginJørgen Lind2011-11-151-1/+5
| | | | | Change-Id: I4c683c08876cc6fa934971399af7e48b160168fc Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Properly handle position in non-synthetic ConfigureNotify with xcbLaszlo Agocs2011-11-151-1/+18
| | | | | | | | | | | | | | | The received window position cannot be trusted blindly, e.g. in case of resizing a window via the mouse or calling showMaximized() the position is bogus (for our purposes). Instead, it needs to be queried. Before 37f338e5edc6d7b70b5a4eaf63326f2a22d7bfbd an incomplete workaround was in place however it got removed in that commit, resulting in weird off-by-a-certain-amount mouse position issues in certain use cases. This patch aims to fix the issue similarly to how it was done in Qt4. Change-Id: I2d2a69b81a2782117b700fe366fae4c102aca1f4 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Support 31 mouse buttons (with platform plugins xcb and xlib).Rick Stockton2011-11-142-9/+54
| | | | | | | | | | | | | This commit includes changes for mouse button support within the XCB and XLIB platform plugins. Support in other platform plugins will be added in the future. The namespace update is prerequisite to compile the the Plugins, and the update in qguiapplication.cpp is required for the enhancements to actually work. Task-number: QTBUG-22642 Change-Id: Ie18fca3b9c86d0b6abbf2103a4f8582e6ce83e7d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Windows platform plugin: Fix compilation with MinGW.Friedemann Kleint2011-11-141-2/+2
| | | | | Change-Id: Ibecfc7c5314d0dea7d796cbc586e5db05e2a80ee Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Factor out QPlatformTheme from QPlatformPlugin.Friedemann Kleint2011-11-1113-69/+321
| | | | | | | | | | | | | | | | | | Implement QCocoaPlatformTheme. The menus and dialog API is moved from the platform to the theme plugin. (Both APIs contain references to QtWidget classes, which we are working towards removing.) The theme plugin is created after the platform plugin, first by asking the platform plugin, then by looking for a separate plugin if the platform does not specify a theme. Initial-patch-by: Morten Sorvig <msorvig@trolltech.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Change-Id: I2778cdd3a205c4ce35ead93e39fe6b4cd58a39f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QPlatformDialogHelper: Split class hierarchy, decouple from DialogFriedemann Kleint2011-11-115-147/+163
| | | | | | | | | | | | | | | | | | | | | - Introduce hierarchy of QPlatformDialogHelper-derived classes for font, color and file dialogs. - Start reducing dependencies on QDialog: * Remove QDialog-specifics from interface, introduce enumeration for DialogCode * Make the helpers Q_OBJECTS to be able to add the signals passed on to the QDialogs * Remove QDialogPrivate pointer - Split setVisible_sys() in show_sys() (factory method for native dialogs) and hide_sys(). Pass parent window to show_sys(), removing the necessity to query the QDialog for it - Introduce a styleHint() similar to QGuiApplication's for platform-specific - Fix compile in cocoa/windows, reduce depency on QDialog (-private) classes. Change-Id: Ic1cb715e1edf767f2cb18b9780341d189339ef1d Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Compile.Morten Sorvig2011-11-102-2/+7
| | | | | | | | QNSPanel must be a NSPanel and not a QNSWindow subclass. Change-Id: I1de31e147757824610f4aabc0ef66ae3906dc0f6 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix build when QEGL_EXTRA_DEBUG is defined for debug outputJohannes Zellner2011-11-091-11/+11
| | | | | | | Also shift EGL configuration plot above window surface creation Change-Id: I2de860e087cb2648b6e8e9b75365fbe78fe7687a Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Adopt eglfs platform plugin to changed QEGLPlatformContext APIJohannes Zellner2011-11-091-2/+2
| | | | | | | eglClientVersion is not used anymore Change-Id: I8595a17386c1466d7766522adbdbd7cd5002ecf8 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Cocoa: Implement mouse and keyboard grab.Morten Sorvig2011-11-092-3/+53
| | | | | Change-Id: Id53ff19d43213d79aaf8f1a6617a06ef9d0cfb4b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* Cocoa cursor support: Add QCocoaCursor.Morten Sorvig2011-11-085-1/+375
| | | | | | | Port the Qt 4 mac implementation. Change-Id: I3bc6fd0b5a0398dcf43a5aaa3b498bb74b42c105 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Windows: Add dialog helpers for native dialogs.Friedemann Kleint2011-11-049-0/+1506
| | | | | | | | Implement QPlatformDialogHelper for file dialogs based on IFileDialog. Add prototypical implementation of color dialogs. Change-Id: If3c7470be6c0b8fbf8cfea1b6638bda43afafea7 Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
* Fixed returned geometry of toplevel child widgetsOliver Wolff2011-11-031-11/+9
| | | | | | | | | | | If a widget has got a parent widget but also is a toplevel widget it should not return its geometry relative to its parent. In addition to that, child widgets which are not toplevel should not change their left and top values according to their parent but also keep their width and height intact. Change-Id: I5e641abf5ddc0b8d056ba023f8de52af1d2ccc9f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows platform plugin: Fix compiler warnings.Friedemann Kleint2011-11-022-3/+2
| | | | | Change-Id: Id7111ca74455b93aabb803babff51c4393508dbc Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>