summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/qeglfscursor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove the GLES 2 dependency for eglfs and kmsJorgen Lind2013-11-191-2/+3
| | | | | Change-Id: If7b80487e01db726367f5a67d2860073f60a0844 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* eglfs: Support multiple raster windowsLaszlo Agocs2013-09-201-6/+15
| | | | | | | | | | | | | | | | | | | | | Allow widget apps with popups and multiple top-level widgets to function on the eglfs platform. GL and Quick2 apps are not affected. Instead of trying to create a native window and EGL surface for each window, do it only for the window that is created first. This first window is forced to fullscreen as usual. Later windows however are treated differently: These will not have a native window, surface or context, and keep their normal size. All the textures belonging to the raster windows are then rendered in one step, using a stacking order maintained based on visibility changes and window activation. Note that this will only help apps that create a main window first and have everything else inside that window or on top of it as menus, dialogs, popups, etc. Change-Id: Ia435458ba81bf3c35cc8f61bcb2d2a50cf17f0e3 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* eglfs: Avoid glUniform calls with wrong type when drawing the cursorLaszlo Agocs2013-09-131-1/+1
| | | | | | | It is not really fatal but fixing it gets rid of a Mesa warning. Change-Id: I3045b2691e7457541d6524c3e3ff8a1882ca460b Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-221-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Regression: Fix setting of custom cursors for native widgets.Friedemann Kleint2013-01-211-3/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | Currently, there is no concept of not having a cursor set on a Window. Qt::ArrowCursor is always set instead. This causes bugs when native child widgets are involved, for example setting a cursor on the native widget's parent no longer works since the child's Qt::ArrowCursor applies. Introduce QWindowPrivate::hasCursor tracking whether a cursor has been explicitly set and clear in QWindow::unsetCursor(). Handle 0 in QPlatformCursor::changeCursor() to mean "unsetCursor()": - Windows: Introduce default constructor for QWindowsWindowCursor meaning "0". Search for applicable parent cursor in applyCursor. - XCB: No big changes required, set XCB_CURSOR_NONE for no cursor. - Other platforms: Assume Qt::ArrowCursor when cursor = 0 is passed for now. Task-number: QTBUG-28879 Change-Id: Id82722592f3cd5fe577a5b64dcc600c85cfea484 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Compile with QT_NO_CURSOR.Volker Krause2012-12-071-0/+4
| | | | | | | | | | | | | Mostly straightforward, the a11y changes might look a bit drastic, but the base class QAccessibleTextWidget was already disabled in this case, so we have to obviously take out its sub-classes as well. Change-Id: I682ace20d6938688ddb1da23c3463f3c025fab8e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
* Remove handleSynchronous* functions.Morten Johan Sorvig2012-10-101-1/+2
| | | | | | | | | | | | | | | | | | | | There are now two different ways to implement synchronous event processing. The platform plugins can choose which one to use. 1) flushWindowSystemEvents() Use to flush the event queue at one point, making preceding calls synchronous. 2) setSynchronousWindowsSystemEvents(bool enable) Makes all handle* functions synchronous, bypassing the event queue completely. Change-Id: I020b80c731fd13f855a377d7c91d06a4e39b6a0b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | 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>
* Revert "Move QWindowSystemInterface out of qpa."Paul Olav Tvete2012-08-031-1/+1
| | | | | | | | | | | | | | 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>
* Move QWindowSystemInterface out of qpa.Stephen Kelly2012-07-191-1/+1
| | | | | | | | 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>
* Suppress QWindowSystemInterface inclusion warnings.Girish Ramakrishnan2012-07-031-1/+1
| | | | | | | | | | | | | Since QWindowSystemInterface is now part of QPA API. The correct inclusion is: #include <qpa/qwindowsysteminterface.h> #include <qpa/qwindowsysteminterface_p.h> Bulk of the work was done by: find . -type f | xargs sed -i -e 's,#include <\(QtGui/\)\?QWindowSystemInterface>,#include <qpa/qwindowsysteminterface.h>,g' Change-Id: If75fc32611e72ef1cf58505794def375b1acf74a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* eglfs: move m_pos into CursorGirish Ramakrishnan2012-06-221-6/+6
| | | | | Change-Id: I51e92d265e7ea6372ae58b357f75362e2d9a2df9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.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>
* eglfs: implement hardware cursor for the raspberry-piGirish Ramakrishnan2012-06-011-20/+37
| | | | | | | | | | | | | | | | 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-311-10/+31
| | | | | | | | 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>
* 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>
* eglfs: use GL API directly in QEglFSCursorGirish Ramakrishnan2012-05-251-11/+51
| | | | | | | | | | | | | | | | | | | | | 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>
* eglfs: Add support for cursor hotspotsGirish Ramakrishnan2012-05-181-11/+36
| | | | | | | | | Cursor information is now loaded from cursor.json. Done-with: Johannes Zellner Change-Id: I093cf8e944d495269973e777d0b444ae4ececee1 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* eglfs: Allow cursor atlas to be specified using an env variableGirish Ramakrishnan2012-05-171-1/+4
| | | | | | | | The atlas it assumed to have 8 cursors per row. All cursors have to be square. Change-Id: I7ffbad4662be450b146f84032bb26187894d528f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* eglfs: delete cursor textures in the destructorGirish Ramakrishnan2012-05-171-1/+7
| | | | | Change-Id: I7e86313134c428bacda41f5e5401ebc392ceecd8 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add eglfs cursor supportGirish Ramakrishnan2012-05-161-0/+222
cursor-atlas.png was generated from existing cursor images (qttools/src/shared/qtpropertybrowser/images/) Change-Id: Ic4b396590eaec93e14a4b0915b15f735f5b1a5f5 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>