summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
* Added MultipleWindows platform capability.Samuel Rødal2012-11-024-0/+5
| | | | | | | | | | | | | | Several platform plugins, like eglfs, kms, etc don't support multiple windows as there's no system compositor, they're rendering directly to a single back buffer. By adding a platform capability we'll be able to provide better error reporting when an application tries to create multiple QWindows on a single-window platform. Also, QML apps can use this capability to figure out whether they should create a QWindow for dialogs / popups / menus, or whether to just create items in the same scene, that are shown on top of the rest of the content. Change-Id: I15b8d21ee2bc4568e9d705dbf32f872c2c25742b Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Expose IAccessibleTable2 to non-conformant screen readersJan Arve Saether2012-11-021-7/+20
| | | | | | | This seems to be the established practice. Change-Id: I75a65d722a026ab0eb1805688743f46aba406e6c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Compile cocoa with QT_NO_ACCESSIBILITYJan Arve Saether2012-11-022-0/+8
| | | | | Change-Id: I82b5dbf1bce94bd928eee207992c0036edc527ad Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* XCB: Use screen's client leader as fallback for transient parent.Friedemann Kleint2012-11-021-8/+10
| | | | | | | | | Modal dialogs that do not have a QWidget parent may be hidden by their parent unless they actually have a transient parent. Task-number: QTBUG-27786 Change-Id: I7847df3517e5ba6e8d77a2a18c905e908a3cd2f4 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Mac: Add support for WindowMasks platform capabilityGabriel de Dietrich2012-11-025-32/+100
| | | | | | | | Also brings back a working QWidgetPrivate::setMask_sys(). Change-Id: Idde9eea15d28bb0299258df81322a5a3ff0b9493 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* beef up qt_plugin.prfOswald Buddenhagen2012-11-0111-45/+19
| | | | | | | it now defines the DESTDIR and creates an INSTALLS rule. Change-Id: I15a462ccad9acbe3521c352fa98327825dc27c05 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Only use the user set page margins for custom paperAndy Shaw2012-10-301-1/+3
| | | | | | | | | | | | | | When the QPrinter is initalized then it will set up page margins based on the default paper size. If the paper size is changed to be a custom one then it should disregard the margins for the default paper size. If the page margins are set explicitly beforehand then it will use these page margins. Change-Id: Ic535c3a80b8b217dbd5eb5f4fb2cbc0ab1354563 Reviewed-by: Titta Heikkala <titta.heikkala@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Bring back native dialogs for Windows XP.Friedemann Kleint2012-10-303-46/+468
| | | | | | | | | | | | | | | The CLSID_FileOpenDialog, CLSID_FileSaveDialog-based dialogs are available from Windows Vista on only, the old Shell-function based ones are required for Windows XP. Add a command line argument to switch dialog types. Extract some common functionality for both dialog types. Task-number: QTBUG-27621 Change-Id: I224c5c4574c2ff54daf354f00d3d1f82abc6f459 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Cocoa: Disable touch events.Morten Johan Sorvig2012-10-301-5/+0
| | | | | | | | | | | | | | | | | | | Enabling touch events has a negative impact on overall performance. In particular, enabling touch events seems to disable scroll event compression, resulting scroll processing lag. Until we find a solution where we can have both proper scrolling and touch events we choose scrolling over touch events. Applications that disagree can enable touch events manually: NSView *qtView = (NSView *)QGuiApplication::platformNativeInterface()-> nativeResourceForWindow("nsview", qtWindow); [qtView setAcceptsTouchEvents:YES]; Change-Id: I85cdd6e8c8ed8685c6cd5418c89fed6af02887cd Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Fix build on MinGW after 0f14ea3f3a05ef785b44fa610bf90ff3b5ba7bebKonstantin Ritt2012-10-291-3/+0
| | | | | | | | Also generalize set _WIN32_WINNT to 0x0501 and _WIN32_IE to 0x0501 globally, as it is out minimal requirement these days. Change-Id: I8ca9102d49c37f908fd8ac032f707f8fe4fdcb22 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Prevent potential crash in QXcbCursor::queryPointer().Samuel Rødal2012-10-263-12/+11
| | | | | | | | | | | xcb_get_setup might return 0, but we already have it in QXcbConnection. Task-number: QTBUG-27686 Change-Id: I58418aedd6bc121ae2b9605389beb3f6612d7fb7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Check the EGL error before calling eglTerminate().Samuel Rødal2012-10-261-1/+2
| | | | | | | | Otherwise we always get EGL_SUCCESS, which is not very informative. Change-Id: I25311c14108ae385913aa9dc159a1f5fad142342 Reviewed-by: Rainer Keller <rainer.keller@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Possibility to change custom Drag&Drop cursors while dragging something. ↵Cyril Oblikov2012-10-261-17/+23
| | | | | | | | | | | Implementation for Windows and X11. Additional checks to figure out if new Drag&Drop cursors where set. This means it is possible now to keep QDrag object in your program and call setDragCursor() method every time we need to change cursor depending on context. Change-Id: I4be69e44b2863371a7ffbb29efc17c18210d6cde Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix syncing of visibility and enabled for menus on CocoaAndy Shaw2012-10-263-1/+8
| | | | | | | | | | | Fixed menu handling on Cocoa so if a menu is enabled/disabled or made visible or not then it will keep this in sync with the appropriate native menu entry. Change-Id: If269185fcf065fb1b2f60d6ef8c27c107eb4509f Reviewed-by: Pasi Matilainen <pasi.matilainen@digia.com> Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* QNX: Query dynamic buffer count at runtimeRafael Roquetto2012-10-262-2/+17
| | | | | | | | | | | While unlikely, there are cases in which QQnxWindow::renderBuffer() is called before the window buffers have been created. Without this check, the program will abort on QQnxBuffer constructor, since the value that will be passed to it will be of an invalid buffer. Change-Id: I9ad5926dca856570032dcf10b6975e8f3364c284 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* remove last traces of qpluginbase.priOswald Buddenhagen2012-10-261-1/+2
| | | | | Change-Id: Idafdab98016cd20f0605a46bf9cb8938da41a99e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add glxContextForContext function to QXcbNativeInterface.Zeno Albisser2012-10-262-1/+22
| | | | | | | | | | | This change enables receiving the native GLXContext object that is used by a QOpenGLContext in case of GLX. This clearly is non-public api that is only meant to be used as a last resort for cases where it is really necessary to get hold of a native context object. Change-Id: I7f1f974f18063ed334b8034a0c0192c875c10cec Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* New-style Windows cursors when dragging object from outsideCyril Oblikov2012-10-262-2/+39
| | | | | | | | | New-style drag&drop cursors are used now on Windows when user drags object to application from outside (e.g. image from Explorer). This is achieved by using IDropTargetHelper. Change-Id: I67e1db73cf433e235fce891eef0093cd4e605904 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Make compile on WCE after c3b9398Kevin Funk2012-10-261-0/+2
| | | | | Change-Id: I594893eb80ecade903e592c41c7117b08bc946a5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Don't crash if there's no m_image yet.Sérgio Martins2012-10-251-1/+4
| | | | | | | | | | | Reproducible with: QBackingStore store( &window ); store.beginPaint(QRect(0,0,500,500)); All other methods already have null pointer checks. Change-Id: Ie278a263760900b58cf4a2ef286deb7f35d50cd0 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix crash when handling WM_PAINT during COM operationsMiikka Heikkinen2012-10-254-3/+31
| | | | | | | | | | | | | Synchronous expose corrupts painter state if it is done during existing paint operation, which can happen e.g. when requesting some value from dumpcpp generated wrapper inside a slot. Fixed by implementing support for setting asynchronous expose and doing expose according to the setting in handleWmPaint(). Task-number: QTBUG-27209 Change-Id: I89b5aa823fda947d26b1a4757f129e7c31ea408b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Add DnD support for QNX.Sergio Martins2012-10-252-3/+25
| | | | | | | | | | We only need DnD within the same application for now, so returning a QSimpleDrag is enough. Change-Id: I842d48f0252f8103fa8632dd3d149ae431658adb Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
* Add ContextMenu event to QWindowSystemInterfaceMiikka Heikkinen2012-10-253-0/+31
| | | | | | | | | | | | | Context menu key wasn't working, as QPA had no handling for it. Added ContextMenu event to QWindowSystemInterface and proper handling to QGuiApplication and QWidgetWindow. Also provide Windows implementation. Task-number: QTBUG-27648 Change-Id: I7ce71ec4b5cdcc7be758e67f9faf6d863f7b19be Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Add ANGLE as a 3rdparty library to Qt.Jason Barron2012-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | ANGLE is a component that implements the OpenGL ES 2.0 API on top of DirectX 9. See the following for more info: http://code.google.com/p/angleproject/ ANGLE is now the default configuration on Windows. If you want to use desktop OpenGL, you should build Qt with the following configure options: -opengl desktop To configure Qt to use another OpenGL ES 2 implementation, you should use: -opengl es2 -no-angle Task-number: QTBUG-24207 Change-Id: Iefcbeaa37ed920f431729749ab8333b248fe5134 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix warning about missing return value in XCB native interface.Friedemann Kleint2012-10-231-0/+2
| | | | | Change-Id: If311211076c05ed8d0fb62a9ff1129b93a813850 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* qpa: Fix drawPixmap rendering using CompositionMode_Source in DirectFBJulien Brianceau2012-10-221-1/+3
| | | | | | Change-Id: I646bc7054e1aa17dca4f54ddd3d2668c173773d4 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
* Make QPen default to 1-width non-cosmetic.Samuel Rødal2012-10-221-2/+2
| | | | | | | | | | | Use the Qt4CompatiblePainting render hint when painting with QPainter to treat default constructed QPens as cosmetic still. The NonCosmeticDefaultPen render hint gets documented as obsolete, since it was in any case not respected by the raster nor OpenGL paint engine. Change-Id: I04d910e9700baf7f13a8aac07a3633014bb9283e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Pass the correct handle to the Windows EGL context constructor.Jason Barron2012-10-221-1/+1
| | | | | | | | We should pass the shareHandle here instead of the handle for the context since that's what it expects. Change-Id: If851758817057ecc3c3646cba2354becf5a8a839 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove DRI2/OpenGL code paths from xcb plugin.Samuel Rødal2012-10-198-545/+8
| | | | | | | | | | | These were used to test QtWayland, but there are other options available for that now. The DRI2 code hasn't been maintained and doesn't even compile at the moment, so let's just remove it to de-clutter the source. Change-Id: I7db0f4db82348497b9f4d6c2dcf2e13f3ab14a76 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Small xcb startup performance optimization.Samuel Rødal2012-10-191-1/+15
| | | | | | | | Prefetch all the extensions, to avoid having to do blocking calls later. Change-Id: I1527dbf03d76372ec88bc0d5d9f7af18a4cc2a26 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Made xcb plugin work when the GLX extension is not present.Samuel Rødal2012-10-196-7/+53
| | | | | Change-Id: I9285d7524586ff404206c088019ece33335137d9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Modularize drag and drop documentationGatis Paeglis2012-10-191-19/+6
| | | | | | | | - Move dnd docs and examples out of QtDoc module to gui library in QtBase - Remove info related to Motif dnd since Qt5 doesn't implement it Change-Id: Id7eb4eb422f4294a36dd92709ce3007903371f03 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Cocoa: fix memory leakTeemu Katajisto2012-10-191-1/+4
| | | | | | | Release the created CGImageRef. Change-Id: If3b36b636ae1302b8a63bbae7285a6461b993f62 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QNX: Change base font sizes from pixels to pointsKevin Krammer2012-10-181-5/+7
| | | | | | | | | | | Previously recommended fonts sizes in pixels do not work very well on the new high resolution devices. Current UX documentation recommends certain point sizes for certain roles. Those work well on both type of devices. Change-Id: Ia4faa4cf2d753cab9b10f91d01dfef1450683272 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Cocoa: fix frameStrutMouseEventsRichard Moe Gustavsen2012-10-181-3/+7
| | | | | | | | | | | | | | | It turns out that the calculation of mouse pos over the frame strut (title bar) was wrong. When outside the content view, the nsevent coordinates are negative, so to get this correct, we need to calculate the height of the window above the content view and use this information to get the mouse pos in positive coordinates with origin window top left. This bug was especially apperent with QDockWidget, as it became almost impossible to dock a window under such circumstances. Change-Id: I2faf6aab5e2aa0b4e217ea087ceec8c1b1e978bb Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Windows QPA plugin: Parse arguments from list passed to factory.Friedemann Kleint2012-10-184-42/+46
| | | | | | | Using dynamic properties on the native interface is deprecated. Change-Id: Ia3411780dad15af61d4805c0d9fabf00dba92301 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Fix compilation with MinGW-w64Jonathan Liu2012-10-173-4/+4
| | | | | Change-Id: I0c9e6adc54ccce34e0f81af048f2a51a4ac051b4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Windows: Multisampling is disabled by default.Friedemann Kleint2012-10-171-1/+1
| | | | | | | | | The previous code assumed that -1 indicated some sort of "auto", but this is not the case according to documentation. Task-number: QTBUG-27600 Change-Id: Id17ce32f94ded61a63a33d0c04ec5312f53c7923 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Windows: QT_LIGHTHOUSE_WINDOWS_VERBOSE -> QT_QPA_VERBOSE.Friedemann Kleint2012-10-172-2/+2
| | | | | Change-Id: Ieffa1f483cddd220b158ccd570af151420c8e3c3 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
* Cocoa: remove current contentView when clearing windowTeemu Katajisto2012-10-172-0/+9
| | | | | | | | | | Otherwise they might be still events sent to view with no proper QWindow. Also, add dealloc QNSView for clean up. Task-number: QTBUG-26580 Task-number: QTBUG-27456 Change-Id: Icdbe5c39490b72ec82795c2d71e5671cea81921e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QPlatformWindow: change API for QPlatformWindow::setWindowStateRichard Moe Gustavsen2012-10-1710-19/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation requests the platform window to set the window state if it can, and return the actual window state back. The problem with this approach is that the platform window is created as late as possible, so a call to QWindow::setWindowState would in many (most?) cases never be forwarded to the platform window (instead, the platform window is responsible to check the current window state upon creation). As such, the window state might be left unsynched with the platform window. This patch suggests removing the return value from QPlatformWindow::setWindowState. This will at least be consistent, so that setting/getting state would produce the same result independent of delayed window creation. If needed, we can later add new API to QPlatformIntegration or QPlatformWindow for querying supported/actual window state. Change-Id: Ie43f56169656854a765ce88b47a808f8f3d51bb4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QWindowsKeyMapper: use a more efficient data structure for 'keyLayout'Marc Mutz2012-10-162-61/+56
| | | | | | | | | | | | | | | | Instead of allocating small chunks (40 bytes) on the heap, use a contiguous array to hold them. This always occupies 10240 bytes of memory instead of 1024 (32 bits) or 2048 (64 bits) for the pointer array (plus heap memory which depends on the number of items allocated), but is more cache-friendly and uses less memory when the array isn't sparse. To emulate the nullptr, a new bool has been added (doesn't change sizeof(KeyboardLayoutItem)). Also replace a few more magic numbers by symbolic constants. Change-Id: I7160f600faddd63deea265c89dc6fd857c7b557f Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* QWindowsKeyMapper: remove dead codeMarc Mutz2012-10-161-1/+1
| | | | | | | | | As an array of automatic storage duration, 'keyLayout' can never be nullptr, so remove the respective check. Change-Id: I2fb2db8311de55b41a1f9aef7c35341949e38e5a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* QWindowsKeyMapper: replace one magic constant with a symbolic oneMarc Mutz2012-10-161-5/+6
| | | | | | | | | Replace occurrences of a literal 9 that mean 'number of modifier key combinations' with the new symbolic constant NumMods. Change-Id: I1e78a1a3c00b81095450ec0557e30751da44c39a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* implement QCocoaWindow::setWindowIconJoerg Bornemann2012-10-162-0/+21
| | | | | | | | | | Code taken from Qt 4.8. Task-number: QTBUG-27175 Change-Id: I0f7a1add3ea63761c956e43d591cd1b26f25760e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Document needed packages for XCB on Fedora.Niels Weber2012-10-161-0/+4
| | | | | Change-Id: I415416e82d342b232607fe7087350a9dad615f7a Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Implement setWindowIcon() for Windows.Miikka Heikkinen2012-10-162-3/+52
| | | | | | | | | Platform implementation for QWindow::setWindowIcon() was missing from Windows platform plugin. Task-number: QTBUG-27175 Change-Id: I6807d1ded057b7788a9f2fa5b143e212a666029b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Check if there is an old item before removing itAndy Shaw2012-10-161-3/+2
| | | | | | | | | | | If something had changed with the menu item before it had actually been originally added to the native menu then this would crash when trying to remove a null item from the native menu. This prevents that from happening. Change-Id: I8d78b5504759225364d5fd051a23c8d6dbd7d1eb Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Set platform window geometry correctly.Morten Johan Sorvig2012-10-163-6/+26
| | | | | | | | | | | | Handle the non-toplevel child window case, where QWindow has a parent NSView instead of a parent NSWindow. QWindow geometry is then equivalent to the frame geometry Task-number: QTBUG-26972 Change-Id: Ie7cedb3ec1a564ce55b72e8269d4853962e073ce Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Cocoa: use defaultPixmap() if pixmap is not set for dragTeemu Katajisto2012-10-161-1/+5
| | | | | | | Task-number: QTBUG-26971 Change-Id: I6aed56a6b292c5aeebf38278d2a1fa982346c909 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>