summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-06-12Fix QWaylandDrag leak in the compositorOlivier Blin2-2/+2
Make it a scoped pointer. Change-Id: Iaeef87cad2022496ebe3a7c746b02584fac9a485 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-06-12Fix build without OpenGLOlivier Blin2-1/+19
Also fix a comment alongside. Change-Id: I0091a89ff8e7ed46e769ea47a0225bc87db2c1f5 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-06-09Fix typo that leads to mis-evaluation of an expression.Christian Kandeler1-1/+1
Change-Id: I5d6eedeb3dfb80ca9df7ca27e29ad6604dbfe683 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-06-09Fix wheel events when the decorations are enabledGiulio Camuffo3-5/+29
We must offset the wheel events' position, as we do with the other types of mouse events. Change-Id: If85e93ffe95304c7dee4c2a3ff195a73243a8182 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-06-09bradient: Activate the decoration's buttons on mouse release, not pressGiulio Camuffo1-6/+36
Change-Id: I5a161119b20301a405bdde9bbea6bfbdcc4b9fa0 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-06-09Fix a corner case freed memory use/crashGiulio Camuffo1-1/+1
QWaylandDisplay::flushRequests() does not only flush them, but also dispatches the pending events. If we have two wl_data_device.selection events in the queue we must not dispatch the second one while we are dealing with the first one because that will replace the data offer and delete us while we're in QWaylandMimeData::retrieveData_sys(). Change-Id: Ib58ca571867faa2633daa9ec94fe7094df02e9fd Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-06-09Don't generate spurious selection eventsGiulio Camuffo1-1/+1
By calling destroy() on the active wl_data_source before replacing it with a new one and calling set_selection() we trigger a spurious selection(null) event before the one with the offer for the source we are going to set. Change-Id: I6c2f2fd029fa523312b9892c6a5050805dfa83b0 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-06-08Add 3 QList::reserve() callsSergio Martins3-2/+7
Change-Id: Ic89d25a4497ffaffb3f6b688f4c5ecc5128e9642 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-06-03Merge remote-tracking branch 'origin/5.5' into devLiang Qi28-69/+349
Conflicts: src/compositor/wayland_wrapper/qwloutput.cpp Change-Id: I05f7431aca46760f90632dfa7ef9c4d0abf392ec
2015-05-29Fix that we pick up the generated headers in source packagesJørgen Lind1-0/+2
Change-Id: If5ae8749ccbddfc878ae4e0adaa40f072527d425 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-05-28Fix crash when the wl_shm global comes after a wl_output oneGiulio Camuffo3-1/+8
Task-number: QTBUG-44503 Change-Id: I6932df57bb4560b6dceb72a5cb7c536cd090e92a Reviewed-by: Martin Gräßlin <mgraesslin@kde.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-05-25Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi0-0/+0
Conflicts: .qmake.conf Change-Id: Iafa184859c6610a39f4251e6ca59d0863eed3ae0
2015-05-17Fix the build error in public headersBhushan Shah2-3/+3
One should always use Q_SLOTS/Q_SIGNALS in then public headers Change-Id: Ibbba0d3ff402bd320049bcd58ced07ad1342ef3b Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-05-15Add safety check in QWaylandInputDevice::Keyboard::modifiers()Martin Gräßlin1-0/+3
::modifiers() might be invoked before being initialised. E.g. when a pointer button event is emitted before the keymap is sent. Change-Id: Ib95f9866d808b2a32ddfaa0862cdb3226fab1938 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-05-14Fix threaded OpenGL rendering on Mesa and possibly other EGLsGiulio Camuffo3-4/+14
eglBindAPI's docs says "defines the current rendering API for EGL in the thread it is called from". We were instead just calling it in the thread the context was created in, not in the thread used for rendering. Change-Id: Iba8ffe75a6f4f8b9d1bba59c0e7cce34499e9c48 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-05-07Reset wayland object pointer after destroyArnaud Vrac1-0/+4
This allows calling init() on the wayland object again after destroy() Change-Id: I7856cc8ec676eee7575e15a5d1f81cf1b89537c8 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-05-07Track last input window with a QPointer in case it is destroyedArnaud Vrac2-2/+8
Change-Id: I61d7aa4b6a37922eb3beefd983154ee267cae0ef Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-05-07Map more XKB key codesArnaud Vrac1-0/+17
Change-Id: I0a2b56043235666bc57b46ae4ac78ca5e24e736d Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-05-06Remove output extensionPier Luigi Fiorini16-375/+10
This protocol is empty now and is no longer used. Change-Id: I45e79fb86a67b4cebdc307170218fa039b2aa27f Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-05-04Fix crash on keyboard removeGiulio Camuffo1-0/+4
If the compositor sent a wl_keyboard.leave and a new wl_seat.capabilities without the keyboard bit we would end up deleting the Keyboard object with a roundtrip in flight, ending up using freed memory later. Destroy the callback when destroying the keyboard, and notify the window system the active window is active no more. Change-Id: Ie415ca62b46e0b8ef0fe4d09c8e7a8130928df90 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-04-24Let the underlying system decide the default keymap parametersGiulio Camuffo1-2/+2
By passing "" instead of hardcoded defaults we let xkbcommon decide what the default parameters for the keymap should be. The user can change that with environment variables, as described here: http://xkbcommon.org/doc/current/structxkb__rule__names.html Change-Id: I8fb037201aeababaa0aa4755cae339ae3d9800b9 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-04-24Use a FontSmoothingGamma value of 1.0Giulio Camuffo1-0/+7
This is what the xcb plugin does, be consistent with it. Change-Id: I5befa2de3ff514ca0c9196eb7137682586cec126 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-04-24Use defines instead of hardcoded stringsGiulio Camuffo1-6/+4
Change-Id: Id382a1e39f2c052fbfeb96caa9b01becb31e81c9 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-04-24Do not manually update the xkb stateGiulio Camuffo1-1/+0
xkb_state_update_key() is not supposed to be used in apps with a master process, such as wayland clients, which use xkb_state_update_mask() with the state serialized by the master. Change-Id: Ie51a39ca0c567c54072b221d1ab8cf7b8ea15c55 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-04-23Introduce the surface role conceptGiulio Camuffo2-0/+77
This is a concept originating initially from an implementation detail in Weston which was later formalized in Wayland 1.7. A wl_surface by itself will not be shown on screen, it must have a 'role' attched for that to happen. A role can be a shell surface, a pointer surface, ... Once a role is set on a wl_surface it cannot be changed, attempting to do so should send a protocol error. It is however allowed to destroy and recreate a new i.e. wl_shell_surface for the same wl_surface. This patch introduces the role and role handler concepts. A class such as a shell surface implementation should inherit from SurfaceRoleHandler, and have a 'static SurfaceRole *role()' function, which will be used to check against the role the surface has when the role handler is set to it. This changes introduces the new plumbing code but does not port existing code to it. Eventually this new API should become public. Change-Id: I43dc809b86051b7528ae6c39f796b9a96719ffd0 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-04-21Move surfaces to outputsPier Luigi Fiorini15-50/+274
Moving surfaces to belong to a specific output. Surfaces can be viewed on a different output anyway. Change-Id: I9ef76300f85190d84b83431374e76e581786e4e7 Done-with: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-04-20Bump versionOswald Buddenhagen1-1/+1
Change-Id: I55a870542290b49267613427bbc8cb68ca4dd7fb
2015-04-19Merge remote-tracking branch 'origin/5.5' into devLiang Qi33-1514/+258
Change-Id: I133110d1deaa09e400e6cbaa704dfd0f32aca974
2015-04-16Add client side support for media keysGiulio Camuffo1-0/+7
Unfortunately we don't have a keysym in libxkbcommon for PlayPause, we only have Play. We're going to pretend XKB_KEY_XF86AudioPlay is really PlayPause since that is what is most common. Change-Id: I1a75d8b5b0ea360e0f62eb7a93004ba3fababfa8 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
2015-04-15Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi21-52/+54
Conflicts: src/client/qwaylandshmbackingstore.cpp src/client/qwaylandwindow.cpp Change-Id: I795fd08f0fc5d3cb5ed55bf16e724f66b7567723
2015-04-11brcm-egl: Avoid conflicts with GLES3Pier Luigi Fiorini1-0/+2
qopengl.h includes GLES3 which conflicts with GLES2 declarations. Might happen because Qt is built with desktop GL. This patch fixes the following build error. In file included from ../../../../hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp:61:0: /opt/vc/include/GLES2/gl2.h:600:125: error: conflicting declaration of C function 'void glShaderSource(GLuint, GLsizei, const GLchar**, const GLint*)' GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length); ^ In file included from /usr/include/qt/QtGui/qopengl.h:97:0, from ../../../../../include/QtCompositor/5.5.0/QtCompositor/private/../../../../../src/compositor/hardware_integration/qwlclientbufferintegration_p.h:46, from ../../../../../include/QtCompositor/5.5.0/QtCompositor/private/qwlclientbufferintegration_p.h:1, from ../../../../hardwareintegration/compositor/brcm-egl/brcmeglintegration.h:44, from ../../../../hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp:44: /usr/include/GLES3/gl3.h:475:29: note: previous declaration 'void glShaderSource(GLuint, GLsizei, const GLchar* const*, const GLint*)' GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); Change-Id: I49ae11457b70b05f740ce70b8c1cfa5d6aa554bb Reviewed-by: Olivier Blin <qt@blino.org> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-04-10Remove .desktop suffix to appIdPier Luigi Fiorini1-4/+18
The appId is the desktop entry identifier. According to the desktop entry specifications [1], for applications the part of the name should follow the reverse DNS convention (see [2]). To do this we use the application domain if available, otherwise for lack of information we fall back to the executable base name like other toolkits such as Gtk+ do. [1] http://standards.freedesktop.org/desktop-entry-spec/latest/ [2] http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s02.html Change-Id: I181ad23a9736844e07e8060d78e756a943c27f67 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-04-08Don't handle mouse events in decos if buttons were pressed in the content areaGiulio Camuffo1-1/+2
This fixes the decorations stealing the mouse events when going outside the content area. Change-Id: I8f3592fbda6b9c1da6498d74820a73be11c6999d Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-04-02Fixed license filesJani Heikkinen3-683/+182
Removed unnecessary license files (LICENSE.GPL & LICENSE.LGPL ) and added missing ones (LICENSE.LGPLv21 & LICENSE.LGPLv3) Change-Id: Id42db1372d19e934480e84a64e9064dff31ca708 Reviewed-by: Sergio Ahumada <sahumada@texla.cl> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-03-31examples: remove unused windowDestroyed signalOlivier Blin2-15/+0
Unused since commit fc439e40e37f9c0b3108225f951fb19bb3abee80 Rework the way buffers are used and rendered Also remove associated slots that are now empty in server-buffer. Change-Id: I33be0bc6a5e175553d28e9ead54fefd2f0c07ce0 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-03-30Tests: Blacklist tst_WaylandCompositor::keyboardGrabCaroline Chao1-0/+2
This test is currently failing in CI on Ubuntu 14.04. Task-number: QTBUG-45108 Change-Id: Ibb364171356f742e5a1f9818e0938bde5f2a8f76 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-03-30Fix build for brcm-egl integrationPier Luigi Fiorini1-3/+0
Change-Id: I5540dfb8e115ab6b3c90bb78618b277783a912f3 Reviewed-by: Olivier Blin <qt@blino.org> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-03-30brcm-egl: Disambiguate wl_registryPier Luigi Fiorini1-0/+1
Include wayland-client.h to disambiguate between QtWaylandClient::wl_registry and wl_registry. Change-Id: Idf33fd56a6b2c2436f5cbabc953980d05826ebba Reviewed-by: Olivier Blin <qt@blino.org> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-03-29qwindow-compositor: fix rendering shm NPOT textures with OpenGL ES2Olivier Blin1-0/+1
Always use GL_CLAMP_TO_EDGE instead of GL_REPEAT, since OpenGL ES2 doesn't support NPOT textures in combination with GL_REPEAT by default, and repeat is not needed anyway. See also qtbase commits: 8dfeb1c374972f06759a92b4edc5d6a18b96ccec 8ab1323842433fb6b45e7d6f381b4b9710a81da9 72558e810d9b3493dabfc936fa6c8bf3c3f3b49c Change-Id: I01770fe3352da05baf6898d63c091bfae95e7a98 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-03-29Drop unused mScreensInitialized variable in QWaylandDisplayOlivier Blin1-1/+0
Unused since commit 78a701272e68d4f0ab95df4062374b8d34ef2919: Made wayland plugin single-threaded, yay :) Change-Id: I1fae78d77179feaac79f5dba6dcad8084e3e97fa Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-03-27Fix shm buffers init and destruction on failureOlivier Blin2-5/+12
Some pointers need to be initialized in QWaylandBuffer and QWaylandShmBuffer, and checked at destruction. This avoids crashes when shm surface creation fails. Change-Id: I6f6afa3cc6c67533b5130700cbc27b271764109e Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-03-27Fix connecting to surfaceDestroyedOlivier Blin1-3/+3
It was being called with a garbage pointer, since the signal does not have an object argument anymore. This has been changed in commit fc439e40e37f9c0b3108225f951fb19bb3abee80 Rework the way buffers are used and rendered Change-Id: I220c52285909dc93aebd128fc418df3c8a6bd37c Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-03-27Fix BrcmBuffer buildOlivier Blin1-1/+1
It got broken after commit b332630c86014eada07990acf66c13e000b3482b: Fix generated code for interface names not starting with qt_ or wl_ Like done in xcompositebuffer.h Change-Id: Ib9b44536d4214737d8d68d62c8512e18a80d5b5d Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-03-27Remove useless EGL linking in pluginsOlivier Blin5-10/+0
EGL libs are already linked from the hardwareintegration pri file, and the plugins do not make direct use of any EGL symbol. Change-Id: If6ecfee16e8c9d8fee67f03419941ced92d1eff8 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-03-27Make QWaylandShellSurface a QObject to allow build without RTTIOlivier Blin4-7/+11
dynamic_cast can not be used when RTTI is disabled, so make QWaylandShellSurface a QObject. QWaylandWlShellSurface and QWaylandXdgSurface must also inherit from QWaylandShellSurface first, to properly inherit from QObject. Change-Id: I2addb8105a0fe61615d4bc905414f7ee7277029f Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-03-24ShellSurface: fix leak of QWaylandSurfaceItem on destructionOlivier Blin1-0/+1
The QWaylandSurfaceView/QWaylandSurfaceItem object is never destroyed from ShellSurface. This was also leaking the underlying GL texture. Task-number: QTBUG-41180 Change-Id: If74c956075744115b8b5a7e8cb89b584714ec7e6 Done-with: Nicolas Marc <nicolas.marc@softathome.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-03-24Use Qt foreach instead of C++11 specific range-base for loopOlivier Blin1-1/+1
To fix build with compilers without C++11 support. Change-Id: If5a5d5d874b196f60bcc5b7bd5a543b58f9c89a3 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-03-24Remove local documentation templateTopi Reinio3-776/+0
Any documentation config can simply include the global template with include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) Change-Id: I58298deeed5267776589d019a3df293b43c3a755 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-03-23Keep Surface's visibility is in sync between client and compositor.Gunnar Sletta4-14/+9
In change fa32466916f1e0fbd2be28bd48df2d9edfcd5e5f we moved the visibility variable from QtWayland::ExtendedSurface to QtWayland::Surface. But we didn't move the code in the ShellSurface that kept this state in sync with the client. As a result the client and compositor would get out of sync. Change-Id: I54a7cb9f4b0669d3f3839ac8a29d8c42407195e2 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
2015-03-20Fix build with gcc <= 4.5Olivier Blin1-1/+1
nullptr is not defined with gcc <= 4.5, use 0 instead. Change-Id: I90d9170e57258f26b8ba7770a957a135539364de Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>