summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Properly manage window geometry in kmsLaszlo Agocs2012-08-072-4/+9
| | | | | | | | | | | If QWindow::setGeometry() is called before QWindow::create(), QKmsWindow::setGeometry() is not called at all. This is wrong because there is some special size restricting happening there which must never be skipped. Change-Id: I321632d4fdb327b0a75e6791c019b3f4c2793888 Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Only use glXCreateContext if glXCreateContextAttribsARB did not succeed.Zeno Albisser2012-08-071-16/+13
| | | | | | | | | | | | If glXCreateContextAttribsARB does not succeed or is not available, we should fallback to using glXCreateContext. But we should not just create a context with glXCreateContext by default that is being thrown away if glXCreateContextAttribsARB succeeds. Otherwise glXMakeCurrent with context 0 might cause an unexpected context change when dealing with multiple contexts. Change-Id: I7627abbe2500b4006180653a1b3b074fe7aca1d3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* fix maximize -> fullscreen -> maximize on WindowsJoerg Bornemann2012-08-061-1/+1
| | | | | | | | Using a reference changes the value of oldState within this function, which is undesired. Change-Id: I9fb66e488015d6b3e586ffa2f0b05a40c095e16b Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* XCB: Correction to OpenGL version check for profile supportSean Harmer2012-08-041-1/+1
| | | | | Change-Id: I2f2bf877b1e2e628806f22fe66180b05090f4b3e Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QNX: Ensure that m_requestedBufferSize is properly initialisedSean Harmer2012-08-031-1/+2
| | | | | | | | | | | | This solves a new corner case resulting from the recent refactoring of QQnxWindow::setGeometry() that occurs when using a plain OpenGL backed window in a single threaded environment and the user code calls QOpenGLContext::makeCurrent(this) in the QWindow subclass ctor. Change-Id: Iaf07fbff1cb2743f5706020a8d657a82cb9f2255 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>
* Fix FullScreen for Windows CEAndreas Holzammer2012-08-032-0/+26
| | | | | | | | | For Windows CE the taskbar needs to be hidden manually. Change-Id: Ife69a2a91457ba0c162e4e1be88f87ad22c61190 Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Revert "Move QWindowSystemInterface out of qpa."Paul Olav Tvete2012-08-0336-36/+36
| | | | | | | | | | | | | | This reverts commit 784a877d3cd9a1a75aca9c83146389503a966071. Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/testlib/qtestkeyboard.h src/testlib/qtestmouse.h src/testlib/qtesttouch.h Change-Id: Iebfed179b3eb7f30e4c95edcae5a8ad6fd50330e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix mimedata updating and signal emision issues in xcb clipboard.Gatis Paeglis2012-08-021-26/+38
| | | | | | | | | | | | | Clipboard should reacquire the clipboard whenever the content or metadata (e.g the list of supported targets) changes. Patch enables us to monitor changes to the clipboard through help of XFixes extension. Cleanup xlib xa_* naming conventions Task-number: QTBUG-26709 Change-Id: I9d47766ad9859b5628b0358b1c47e8af8fecef73 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix badAtom issues introduced by behavior changes between Xlib and xcb.Gatis Paeglis2012-08-021-22/+7
| | | | | | | | | | | | In Xlib, the 'length' variable gets updated with the the actual number of 8-bit, 16-bit, or 32-bit items stored in the returned data, but xcb returns the actual number of bytes read through xcb_get_property_value_length, therefore the logic of calculating offset was broken. Task-number: QTBUG-26709 Change-Id: I04de3b5c5631cfaf9b3c2c3d4513be73c569f61f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QNX: Do not send geometry change events to Qt too earlySean Harmer2012-08-012-22/+31
| | | | | | | | | | | We explicitly do not send geometry change events to Qt from QQnxWindow from the constructor. This prevents us from ending up in resizeEvent() reimplementations from the QWindow ctor. Change-Id: I045b35aa7eb23890772fe131c3d19314252f6a5a Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QNX: Ensure that the QQnxWindow has a valid size for EGL surfacesSean Harmer2012-08-011-0/+4
| | | | | | | | | | | | | | | | If QWindow::create() gets called before resize() or setGeometry() then the rect argument passed into QQnxWindow::setGeometry() by the ctor is null. This could potentially result in 0 sized buffers and EGL surface creation being attempted. We bail out in this case and tell user how to fix their application. Change-Id: Ia709dba617fa266bd66b61409bdb1c980acfb1a2 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QNX: Remove dependency on QtWidgets from QNX QPA pluginSean Harmer2012-08-015-304/+4
| | | | | | | | Change-Id: I52027752630beee81a97644983dbccf973c0c2c2 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* don't change a widget's active state in QWindowsWindow::setWindowStateJoerg Bornemann2012-08-011-31/+18
| | | | | | | | | | | | | QWindow::setWindowState is not supposed to set the window active. The method requestActivateWindow() should be used for that. When switching from and to fullscreen mode we're always passing SWP_NOACTIVATE to SetWindowPos to not change the activation state of the window. This is inverse to the old behaviour, which did not have an effect. Change-Id: I339337935cdad76b3ef252202e92177f37543038 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix showFullScreen for QWindowAndreas Holzammer2012-07-311-1/+2
| | | | | | | | | | | | | If the setWindowState is called in a early stage, where the window is not yet shown, the fullscreen flag is cached in the QWindow. Then in the call to setVisible(true) the window gets generated, but the fullscreen is not handled there. So set the state while window is generated. Change-Id: I0ea53ed8a2465da6a9973d84fb4579381543e89b Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Implement synchronous WS events by flushing.Friedemann Kleint2012-07-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | Previously synchronous window system events were implemented by bypassing the queue and processing the event immediately. This is not ideal since the event order is not preserved - there might be "happened before" events waiting in the queue. Add QWindowSystemInterface::flushWindowSystemEvents and change all handleSynchronous* to 1) queue the event 2) call flushWindowSystemEvents. flushWindowSystemEvents is almost identical to the already existing sendWindowSystemEvents with the exception that it does not call QApp::sendPostedEvents. Move the common implementation to a new private function. Task-number: QTBUG-20778 Change-Id: Ie98a83875bc0a14e335e36bed0dd9e0ed4a1dea0 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Accessibility: fix updates for models with rootIndex set.Frederik Gladhorn2012-07-311-6/+12
| | | | | | | | | | | | | | | The accessible table/list implementation would ignore when a root index is set, resulting in trying to use row/column for the top level index, leading to accessing invalid indexes. (cherry picked from commit def2ee829435c705055733a0f99c0ca44a012c50) Conflicts: src/plugins/accessible/widgets/itemviews.cpp Change-Id: Ic2745ab3e262ccee2d43e0d532e165d2958f519e Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* QNX: Reduce dependency on QtWidgetsKevin Krammer2012-07-292-6/+2
| | | | | | | | Use QObject::inherits() to check if the current input focus object is a numerical input instead of trying to cast. Change-Id: Ie476fba3d2f9f20a1ce0328043430cb6a96a8a3d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add QCocoaAutoReleasePool to QCocoaMenu::setTextMorten Johan Sorvig2012-07-271-0/+1
| | | | | Change-Id: Ia47d79d400c6c4dcd7a49595f05ddafb5a256fad Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* QtNetwork: use nullary version of qRegisterMetaType<T>("T")Marc Mutz2012-07-252-2/+4
| | | | | | | | | | | | | | | | | Using the nullary version has the advantage that multiple calls during a program run are much more efficient, since an inlined atomic is used to store the result. It also ensures that Q_DECLARE_METATYPE(T) has been used, whereas qRegisterMetaType<T>("T") will happily register anything. So I've added the macro where it was missing, or moved it to a central place when it existed hidden. In tst_qnetworkreply, this became a bit tricky, because a private header is conditionally included, so moved the Q_DECLARE_METATYPE() into a conditional section, too. Change-Id: I71484523e4277f4697b7d4b2ddc3505375162727 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Disable tty keyboard in kmsLaszlo Agocs2012-07-255-2/+150
| | | | | | | | Set QT_KMS_TTYKBD=1 to prevent this and keep vt switching, ctrl-c, input appearing on the tty, etc. working. Change-Id: I0071685205ae9e02536dcb71f6fef6495c48f8fb Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Fix keyboard input in kmsLaszlo Agocs2012-07-251-1/+3
| | | | | | | The window was not made active. Change-Id: I20c323201be71fa4deb758e4a8fc32297d6faf0c Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Update only dirty areas in kms backingstoreLaszlo Agocs2012-07-252-3/+36
| | | | | | | | | | Do not upload the entire (typically fullscreen) image all the time. Taken from eglfs' backingstore implementation. Change-Id: I53db5cf54577ebea715d6cbd7215b9d2154e8960 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* QXcbWindow::setMask(): Check for SHAPE extensionUli Schlachter2012-07-251-0/+2
| | | | | | | | | | | If the SHAPE extension is not available and we try to use it, the xcb connection will shut down and go into an error state. This is bad because there would be no error message that would give a hint on what went wrong. Change-Id: I1a6734bd146ca179a990b6ce896813bf76007b66 Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Reimplement QXcbWindow::setMask() with xcbUli Schlachter2012-07-253-39/+19
| | | | | | | | | This functionality does not need libXext. The bindings for the shape extension from libxcb-shape is enough and is available without Xlib. Change-Id: I9f1927024c64df00ace1666998c6c6deda2ef782 Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QNX: Remove mouse events synthetized from touch eventsKevin Ottens2012-07-241-17/+0
| | | | | | | | | This behavior is now implemented in a finer way in QtQuick and QtWidgets, it's not needed anymore in the platform plugin. Change-Id: Iacdcd313253627fbba094abe4e9a9c1d23a431e1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
* Remove winEventFilter, replaced with installNativeEventFilter.David Faure2012-07-242-3/+4
| | | | | | | | | No reason to keep a virtual method for Windows when all other similar methods (macEvent and x11Event) have been removed, and when installNativeEventFilter provides a much nicer solution (no need to derive from QApplication). Change-Id: Ia2a7960e320fcbd04cef91f467900861dbb377c1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add basic backingstore implementation to kmsLaszlo Agocs2012-07-232-4/+130
| | | | | | | | | | | | | | This allows using the kms plugin in QWidget apps having a single (preferably fullscreen) top-level widget. Based on eglfs' implementation. Dirty rectangle tracking is missing, should be added later. There is no composition so multiple TLWs will not work nicely. Change-Id: Ia78589d1a375925ebdcc46aa20fc1619ec14d6cc Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
* If the GL driver is singlebuffered, reflect that in QSurfaceFormatJan-Arve Saether2012-07-231-2/+1
| | | | | Change-Id: Iafed64d0a35f8d49357f147c8b7b4c0e9f4b9173 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* If swapBehavior is TripleBuffer, set WGL_DOUBLE_BUFFER_ARB to TRUEJan-Arve Saether2012-07-231-1/+1
| | | | | | | | | | Previously, if the drivers' swap behaviour was single-buffered it would fallthrough (just like DefaultSwapBehavior) and remain single-buffered. Change-Id: I4b93ad7a49094aa992d0b8fb3429c163bbbf655d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* WindowSystemInterface::sendWindowSystemEvents(): Remove unused parameter.Friedemann Kleint2012-07-234-41/+11
| | | | | | | | No need to pass the dispatcher. Get rid of Windows logic to maintain a stack of dispatcher associated with flags. Change-Id: Ic2daad4b6762a46fac3274937effc188af436c9a Reviewed-by: David Faure <faure@kde.org>
* XCB: Record the OpenGL profile in the formatSean Harmer2012-07-231-0/+1
| | | | | Change-Id: I68f9e78e15fc798ec801feed74e0cb900ef577ae Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QTBUG-26296, dock widget movingJames Turner2012-07-234-1/+153
| | | | | | | | | | | | | | | Cocoa lacked implementation of FrameStrut events, and also frameMargins on QPlatformWindow. Fix both of these issues. Unfortunately QDockWidget also contains a tangle of #ifdef MAC behaviour which I am unclear about. What's included here disables some logic on Mac that seems definitely wrong - while moving a window on Mac we now generate NonClientArea events (as intended, I believe), but this should not cause dock-widget dragging to end. Note the window titlebar is the only frame-strut/non-client area on Mac (as far as I can see) Task-number: QTBUG-26296 Change-Id: Id0c6e954db64b9f9f71d16355cb92922877e5ebe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* release and clear next_bo when pageFlip failsElvis Lee2012-07-211-0/+4
| | | | | | | pageFlip failure makes starvation in waitForPageFlipComplete. Change-Id: Ifbcdda2a4138753f475e4c37767058014cc4230b Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Provide public API for native event filtering, moved up from QPA.David Faure2012-07-2010-121/+26
| | | | | | | | | | | | | | | | | | The previous API was hard to use (global function, no type safety, manual chaining), and confusing (app vs dispatcher split only made sense on Windows). Installing and removing out of order would have the risk of setting back a dangling pointer (crash). Meanwhile QPA added type safety, and this new API models the QObject::installEventFilter API for ease of use. The virtual method is in a new interface, QAbstractNativeEventFilter. QPA was even calling the dispatcher event filter with QPA-private event classes, which made no sense (refactoring leftover from when the code was in the dispatcher). Now the QPA plugins trigger the qcoreapp event filters with the actual native events directly. Change-Id: Ie35e47c59c862383bcaf857b28d54f7c72547882 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Remove unneeded Windows CE dummy functionsAndreas Holzammer2012-07-201-5/+0
| | | | | | | | | With the change I69f4d5d504e2341555d9991c68e82beed2e8129c IsZoomed function is no longer needed. Change-Id: I07239f3e81509f8a966e64ee9705a04ea41cb38d Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Implement nativeResourceFunctionForContext for kmsElvis Lee2012-07-202-0/+25
| | | | | | Change-Id: I4e0486744f4c3eb711a9252c90b0d06c5bb3c670 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Reset drm cursor position if cursor image is set before movedLaszlo Agocs2012-07-202-1/+7
| | | | | | | | Do not let the cursor appear at some random position and then jump back to the top-left corner when first moved. Change-Id: I0b77763bdfa86c23435d6cc07bdc13dfcc682567 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Hide drm cursor when exitingLaszlo Agocs2012-07-202-0/+7
| | | | | Change-Id: Ib4e1895dcf3e0168eb759fbecee499d75dd45bfe Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Disable threaded rendering with kms pluginLaszlo Agocs2012-07-201-2/+1
| | | | | | | | The page flip handling in QKmsScreen cannot currently cope with contexts on multiple threads. Change-Id: I9492095fec52fd1ad0197db00b3d6a2f58016e6d Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Don't update geometry while the style is setAndreas Holzammer2012-07-202-1/+7
| | | | | | | | | | | | Under Windows CE a resize event gets fired when the style is set, this will produce geometry change events inside Qt, which will end up in changing the geometry back and forth. Change-Id: I7f834997abc53760ccfe2ad97012bb74dc5c705c Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Move QWindowSystemInterface out of qpa.Stephen Kelly2012-07-1936-36/+36
| | | | | | | | Public QtTest headers require it, so all unit tests would have to use private Qt headers otherwise, which is not practical. Change-Id: I5d4466ec30b6a57ebdfc34413e716e657eb51368 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* QWidget/Win: fix restoreGeometry() from fullscreen modeJoerg Bornemann2012-07-192-2/+14
| | | | | | | | | | | | | | | When turning off fullscreen mode and restoring the widget's geometry we must inform the QWindow about the geometry change synchronously. Otherwise QWidget::geometry() will return the old value. Using the same technique for the state transition to fullscreen mode without sending a separate resize event. Autotest: tst_QWidget::saveRestoreGeometry Task-number: QTBUG-26421 Change-Id: I869e36cd302d9a94e398f48949ab3cb7ee9cdf51 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix window state handlingAndreas Holzammer2012-07-192-28/+9
| | | | | | | | | | | There is no need to query each time the window state from windows, as we already know in which state it is. We are also getting state change notifications. This fixes issues under Windows CE. Change-Id: I69f4d5d504e2341555d9991c68e82beed2e8129c Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Follow gbm api changes in kms pluginLaszlo Agocs2012-07-182-5/+3
| | | | | Change-Id: I3058f4d3540b04710a853bbaa901bdbecf35b4b5 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Tear down properly in kms plugin when exitingLaszlo Agocs2012-07-181-0/+8
| | | | | Change-Id: Idad060af4a8b4e68c2312cc2b69de39d2a58a1c4 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Add config test for kmsLaszlo Agocs2012-07-181-0/+4
| | | | | | Change-Id: I55afc65d356aaca0fe443dda100805a4df8f0ae6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Fix window size issue under Windows CEAndreas Holzammer2012-07-161-0/+2
| | | | | | | | | | | | | | Under Windows CE the top title window bar needs to be taken into account when creating a window, so the Style WS_OVERLAPPED needs to be passed to AdjustWindowRectEx, to get the right size of the window. For the desktop the documentation says, that you should not pass the WS_OVERLAPPED flag, but wince does not talk about this. Change-Id: Id8c9d28b7aa04a9920e4cb81ac11463d9717a0e7 Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* handle XInput 2.2 multipoint touch eventsShawn Rutledge2012-07-162-15/+221
| | | | | Change-Id: I5c925ae3e191244c7ab9415e4ba2fe49b93dd2af Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* QNX: normalize signals/slotsMarc Mutz2012-07-131-4/+4
| | | | | | | | | | | This is the result of running util/normalize --modify from Qt 4.7 with manual review. Change-Id: I9229c3c52ba785194469ad51aba0c3af0c058894 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* plugins/bearer: normalize signals/slotsMarc Mutz2012-07-135-66/+66
| | | | | | | | | This is the result of running util/normalize --modify from Qt 4.7 with manual review. Change-Id: I7c9539056a4434ed10a0255152eac1781f7833be Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>