summaryrefslogtreecommitdiffstats
path: root/examples/wayland/qwindow-compositor
Commit message (Collapse)AuthorAgeFilesLines
* qwindow-compositor: rename input to seatJohan Klokkhammer Helsing2018-08-091-6/+6
| | | | | | | This should have been done when we renamed from inputDevice to seat. Change-Id: I4a296322fc79a6dd6d30ee2b1c97c3a818cc568e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Make sure we don't use deleted memory in examplePaul Olav Tvete2018-08-041-2/+5
| | | | | | | | | | The view has a pointer to a QOpenGLTexture that is owned by the buffer. Don't keep using that pointer after the buffer has deleted it. Task-number: QTBUG-69384 Change-Id: I48fd813e0dcb74db04d217238be7b0b6b345fc11 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Use override when applicableJohan Klokkhammer Helsing2018-02-281-2/+2
| | | | | | | | | | Applied automatic fixes using clang-tidy's modernize-use-override. This adds the "override" keyword where it's possible and also removes the "virtual" keyword when redundant. Change-Id: I899950e5cf8782785d30a245a9c69c1720905d50 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Use default member initialization for raw pointersJohan Klokkhammer Helsing2018-02-281-3/+3
| | | | | | | | Initialize to nullptr to prevent undefined behavior. Change-Id: I7753c0be77a886d62ecb1cd7b86fc8c98340b0b8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Init variables where they are declared when possible (clang-tidy)Johan Klokkhammer Helsing2018-02-274-25/+13
| | | | | | | | | | | | | | | | | | | | clang-tidy -p compile_commands.json $file \ -checks='-*,modernize-use-default-member-init,readability-redundant-member-init' \ -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' \ -header-filter='qtwayland' \ -fix Afterwards I ran search and replace on the diff to clean up some whitespace errors: - Replaced '(\n\+[^:\n]*)(:\s+\+\s+)' with '$1: ' - Replaced '(\n\+[^,\n]*)(,\s+\+\s+)' with '$1, ' - Replaced '\n\+\s*\n' with '\n' I also had to do some manual edits, because for some reason, this particular clang-tidy check doesn't trigger for some files. Change-Id: I3b3909bac4bf20108bbe8ad1e01bcc54236dae1b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Use nullptr instead of 0 or NULLJohan Klokkhammer Helsing2018-02-202-7/+7
| | | | | | | | Applied automatic fixes using clang-tidy's modernize-use-nullptr, and some manual cleanup to prevent QFlag macros to be affected. Change-Id: I88f94390185bc6e6f23693b68723cd5710815ae6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Compositor examples: Remove unused dependencies on private APIsJohan Klokkhammer Helsing2018-01-161-1/+1
| | | | | Change-Id: Iee33e9fe065693a615e1d18d3d03d5a7618e3f75 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Merge remote-tracking branch 'qt/5.10' into devPaul Olav Tvete2017-10-271-5/+5
|\ | | | | | | Change-Id: I4f885a551093ada07da97fd3d99902e36f98595e
| * Fix outdated FDL license headerKai Koehne2017-10-201-5/+5
| | | | | | | | | | Change-Id: Id4ba079514c7844821adac3c0c108af7deb57889 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Replace Q_NULLPTR with nullptrKevin Funk2017-09-261-1/+1
|/ | | | | | | Change-Id: I9699a957430b8d3574ce29acb91b7ada9ea6209b Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix licensingv5.9.0-beta4Jani Heikkinen2017-05-045-15/+65
| | | | | | | | | | Currently tests are licensed under GPL-EXCEPT, examples under BSD and src under LGPL so replase old license headers with new & proper ones. Also remove old & unused license files Task-number: QTBUG-57147 Change-Id: Ia6a738798736c275dc309ccfa5b627dc2178d241 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Replace all occurrences of Q_DECL_OVERRIDE with overrideJohan Klokkhammer Helsing2017-01-232-8/+8
| | | | | Change-Id: I16b7b23efe944b49d1fcc9e7588cdb0a991cebd1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Add animations to the C++ examplePaul Olav Tvete2017-01-023-19/+110
| | | | | | | Show how to use setBufferLocked() from C++. Change-Id: I43be7dcf8f44fd80dd0d4977e38a0d8ff3339432 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Make qwindow-compositor look different than pure-qmlPaul Olav Tvete2016-11-291-1/+2
| | | | | Change-Id: I8aac99dd98be943909f5a6dc254a4f79e83e61d9 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Make sure we send leave events in the c++ examplePaul Olav Tvete2016-11-221-4/+3
| | | | | | | | The code was there, but an unfortunate null pointer check made us skip sending leave events. Change-Id: I3095949ac41330fc10e2a97c025d94d47bc6ea4e Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Add mode support to QWaylandOutputPier Luigi Fiorini2016-10-031-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Outputs usually have more than one mode, add an API to support them. When sizeFollowsWindow is true, modes are replaced by one with the window size and refresh rate. In that circumstance the mode changes when the window is resized. The sizeFollowsWindow property default value is no longer true. The setGeometry() method is gone as it doesn't make sense now, the setWidth() and setHeight() methods are now private slots to resize the resolution as the window resizes (and sizeFollowsWindow is true). Refresh rate is expressed in mHz rather than Hz just like the Wayland protocol. A compositor implementation may choose to add modes if it has access to hardware information, it will call addMode() for each mode and then invoke the setCurrentMode() method that sends the modes list to the client. The preferred mode is indicated with a boolean parameter to the addMode() method. Change-Id: Iffed4784ccef695c276ebd800172957f4cff3324 Task-number: QTBUG-49814 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Refactor buffer handlingPaul Olav Tvete2016-10-013-30/+11
| | | | | | | | | | | | | | | | | | | | | | | | | We cannot support bindToTexture() functions. On some platforms the texture is provided by the driver. Therefore, the HW integration must always provide a texture. This has the added bonus of unifying the two separate code paths that were introduced when EGLStream support was added. Add a separate buffer manager that owns all buffers. Don't destroy buffer objects on release. The client will probably attach them again later. Also, release shm buffers immediately after uploading to texture (needs to be documented that image() will not work afterwards). Make the old SurfaceBuffer class into an abstract base class, so we can store state in the buffer class instead of having to map from the wl_resource in each buffer integration. Move the shared memory buffer handling into a separate subclass. Change-Id: I81e471d13c92913d31ea1efe487f93fa908b5e0c Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com> Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Compositor: Base shell classPier Luigi Fiorini2016-09-302-3/+4
| | | | | | | | | | | | Standard shell class with focus policy shared by all protocol implementations. The automatic focus policy gives focus to windows automatically as they are created, while the manual policy allows a compositor to decide what to do. Change-Id: Ica71271174b30e28217e31c53f1c8dd576752c5e Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Compositor API: Add closeAllPopups method to QWaylandWlShellJohan Klokkhammer Helsing2016-09-202-18/+12
| | | | | | | | | | The WlShell implementation now matches xdg shell. Also adds a convenience method to QWaylandWlShell to get all popups. QWaylandWlShellIntegration and qwindow-compositor uses this new API. Change-Id: Ibfe3323ad7f56d43379785582b9be6801905a485 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* Rename the QWaylandXdg* classes to QWaylandXdg*V5Giulio Camuffo2016-09-053-28/+28
| | | | | | | | This frees the QWaylandXdg name for the hopefully coming stable version of xdg-shell. Change-Id: I9beb9b035c6497fb45bee5c9104485b564ca0619 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Merge remote-tracking branch 'qt/5.7' into 5.8v5.8.0-alpha1Liang Qi2016-08-281-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/compositor/compositor_api/qwaylandseat.cpp src/compositor/compositor_api/qwaylandview.cpp tests/auto/compositor/compositor.pro tests/auto/compositor/compositor/testinputdevice.cpp tests/auto/compositor/compositor/testinputdevice.h tests/auto/compositor/testinputdevice.cpp tests/auto/compositor/testinputdevice.h tests/auto/compositor/testseat.cpp tests/auto/compositor/testseat.h Change-Id: I98e045908dd964e5d4120bd35e71b8839c0d923a
| * qwindow-compositor: remove drag icon before droppingJohan Klokkhammer Helsing2016-08-111-1/+3
| | | | | | | | | | Change-Id: Ief93b5e79d3a51e4d20387357ad2abe15bf1a695 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Rename QWaylandSurface::isMapped to hasContentJohan Klokkhammer Helsing2016-08-223-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | It was potentially misleading, since "mapped" is already used with a slightly different meaning in the Wayland protocol. In the protocol, mapped means that the surface should be rendered. The renamed property, on the other hand, is true if the surface has a buffer with contents attached and committed. In some cases this is not the same, i.e. the drag icon after dropping, or xdg_popups after popup_done. Change-Id: Idc359433c6130e3815de57b21d4edb13e318887d Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Compositor API: rename QWaylandInputDevice to QWaylandSeatJohan Klokkhammer Helsing2016-08-113-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | The name QWaylandInputDevice could be confusing and misleading: - A QWaylandInputDevice was not one input device, but a collection of many. - Classes that sounded like they should inherit from it did not, i.e: QWaylandKeyboard, QWaylandPointer and QWaylandTouch. - The Wayland protocol already has another term for this, which is seat. Change-Id: I9d9690d5b378075d9dddaeb8cf18395c7f47603e Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Rename createSurface and similar signalsJohan Klokkhammer Helsing2016-08-032-7/+7
| | | | | | | | | | | | | | | | | | | | | | * createSurface -> surfaceRequested * createXdgSurface -> xdgSurfaceRequested * createXdgPopup -> xdgPopupRequested * createShellSurface -> wlShellSurfaceRequested * shellSurfaceCreated -> wlShellSurfaceCreated Change-Id: I715a927242130d7504955002a6a64a2bac516d46 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-026-145/+145
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/wayland/minimal-qml/main.qml Change-Id: Ic34029a6aa77f2b359f40258a05421d82efd5b37
| * Example cleanupPaul Olav Tvete2016-07-046-145/+145
| | | | | | | | | | | | | | | | Use sane class names and file names, just like we do in minimal-cpp. Change-Id: I17ef83711040a5507425721e695d64f43411fc4b Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Migrate to public QOpenGLTextureBlitterLaszlo Agocs2016-07-291-1/+1
| | | | | | | | | | Change-Id: I481ebdaf9e5749a57223a91ab3a231ca40af059a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Rename sendUnMaximized to sendUnmaximizedJohan Klokkhammer Helsing2016-07-121-1/+1
| | | | | | | | | | Change-Id: I20add5c8b12e1345ce50c009d8bae80fde9806e1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Rename shm to sharedMemoryJohan Klokkhammer Helsing2016-07-111-2/+2
| | | | | | | | | | | | | | | | sharedMemory is much clearer and will increase the readability of the code and API. Change-Id: Ibb6d7424fa8d44a94a0f4ddf476a564eb235323f Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
* | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-111-0/+1
|\| | | | | | | | | | | | | Conflicts: src/compositor/wayland_wrapper/qwldatadevice.cpp Change-Id: I2f555f969ec36b3e9b4123d758ae4176c5c90164
| * qwindow-compositor: avoid unused variable warningLaszlo Agocs2016-05-311-0/+1
| | | | | | | | | | | | Change-Id: Ie9091d6876ac834e204718fbc3258cee367ee292 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | Add position property to QWaylandXdgPopupJohan Klokkhammer Helsing2016-06-071-1/+1
| | | | | | | | | | Change-Id: I29c48ae9c44fc5601200a6bb6f6a7dbd9c8baba3 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | Rename xdg surface request<state> methods send<state>Johan Klokkhammer Helsing2016-05-311-4/+4
|/ | | | | | | | It could be confusing to have methods that cause Wayland events to be named request*. Change-Id: I6567f9e8fd9370e574516e97cd49858e2bf34829 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* Merge "Merge remote-tracking branch 'qt/5.7.0' into 5.7" into refs/staging/5.7Frederik Gladhorn2016-05-271-2/+7
|\
| * Merge remote-tracking branch 'qt/5.7.0' into 5.7Paul Olav Tvete2016-05-261-2/+7
| |\ | | | | | | | | | Change-Id: I6236699846c922a79a1bd420a161392fd6572001
| | * Make example work for the non-streaming casePaul Olav Tvete2016-05-231-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't crash when buffer is shared memory. Don't set m_texture to 0 when not streaming. Use the new buffer when advancing. Use proper filtering when uploading to texture. Change-Id: I05bb12a05c7448d17d5292910f16b49e613b0ce0 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Revert "Add position property to QWaylandXdgPopup"Johan Klokkhammer Helsing2016-05-271-1/+1
|/ / | | | | | | | | | | | | | | | | | | This commit would have broken source and binary compatibility between 5.7.0 and 5.7.1. This reverts commit 20692ad15b8ac0c24b12d30609f061a740c87f23. Change-Id: Ic4156571889ec08a708e67c55d461d3052ce0ad0 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* / Add position property to QWaylandXdgPopupJohan Klokkhammer Helsing2016-05-241-1/+1
|/ | | | | | | | Store the position relative to the parent Change-Id: Iccae120b70e98388d18e4867e21a3a8c36ddd522 Reviewed-by: Erik Larsson <erik@ortogonal.com> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-3/+1
|\ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/wayland/qml-compositor/qml-compositor.pro examples/wayland/server-buffer/compositor/compositor.pro Change-Id: Ie6fa21dfbdb71f33e0a4d29d34a824048cf00864
| * fix example installsv5.6.1-1v5.6.1Oswald Buddenhagen2016-04-281-3/+1
| | | | | | | | | | | | | | | | | | this actually includes removing the install targets for the sources - this is automated now. Change-Id: I736958d70baabfa4db816abbfc50acacbf2ee23c Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
| * Make qwindow-compositor build on systems without ext texturesLaszlo Agocs2015-10-271-0/+4
| | | | | | | | | | Change-Id: I47d7f7d2cb589df8087c23eda60137e7b263f11f Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
| * Support EGLStream in wayland-eglLaszlo Agocs2015-10-203-14/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Wayland on NVIDIA. Tested with a Jetson TK1 Pro and Vibrante Linux. With just the hw integration no compositors would work out of the box since EGL_KHR_stream_consumer_gltexture only allows connecting to the texture bound to GL_TEXTURE_EXTERNAL_OES, meaning that assumptions about the target always being GL_TEXTURE_2D break horribly both in C++ and in shader code. In addition, buffers have to be extended with an additional updateTexture() operation as EGLStream requires to call ConsumerAcquire on every frame. Previously there was no concept of this as calling createTexture() on attach() was sufficient. Qt Quick bits are omitted since the refactored compositor API is pretty different. This means that QML compositors will not currently function in this environment. The qwindow-compositor example is enhanced to support the external texture target, but this won't apply for the refactored branch either. It is provided for testing purposes for the time being, and to show how C++ compositors can support different texture targets and correct operation with EGLStreams. Done-with: Louai Al-Khanji <louai.al-khanji@theqtcompany.com> Change-Id: I0e209fc0cbcf435cca83528d938eb50e4bdceb82 Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
* | Fixed eglStream compositingDominik Holland2016-05-183-10/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating the eglStream from the fd we also need to create the texture and call stream_consumer_gltexture. Otherwise the wayland client can't create the wayland client surface. Fixed the qwindow-compositor example to use the texture associated to the QWaylandBufferRef when compositing a EXTERNAL_OES target. QML compositing only works when QSG_RENDER_LOOP is set to basic as we need to generate a texture from the gui thread. As the texture is created by the bufferintegration it might end up in a different gl context than the quick item using it. The texture is also deleted together with the buffer, which prevents the use of the texture afterwards. Both problems need to be fixed in follow up commits. Task-number: QTBUG-50850 Change-Id: Ifec67bbe9e4b2a680c871dc4aced37b71b7b6f80 Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Move drag icon relative the cursor hotspot positionErik Larsson2016-04-214-10/+12
| | | | | | | | | | | | | | | | | | | | Instead of placing the drag icons top-left corner at the cursors hotspot the drag icon is moved so it will be placed correct relative the cursor hotspot. This will makes the drag feeling more realistic. Change-Id: I8d60ae1b7788accb9034575983417abae4c58c1a Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Fix undefined behavior in qwindow-compositorJohan Klokkhammer Helsing2016-04-192-1/+9
| | | | | | | | | | | | | | | | | | m_xdgSurface and m_xdgPopup were left uninitialized. Fixes a crash when resizing wl_shell clients. Change-Id: I8f4b05e395ac6088d9f40bbe9cca6141ee12dfc9 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* | Create a fallback shellSurface in wl_shell::get_shell_surfaceJohan Klokkhammer Helsing2016-04-112-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes QWaylandShellPrivate::shell_get_shell_surface behave similarly to QWaylandCompositorPrivate::compositor_create_surface. First, a signal is emitted letting a compositor implementation create its own subclass of QWaylandShellSurface if desired. If it's not created, a plain QWaylandShellSurface is created instead. It also makes the API more consistent, as the creation of shell surfaces now mimick the creation of surfaces and xdg surfaces. qwindow-compositor has been updated to take advantage of the new API Change-Id: I7c7262dd253dc37843e8e471a4ead5f6e87b0ced Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Rename compositor Shell to WlShellJohan Klokkhammer Helsing2016-04-052-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * QWaylandShell -> QWaylandWlShell * QWaylandShellSurface -> QWaylandWlShellSurface * QWaylandQuickShellSurfaceItem -> QWaylandQuickWlShellSurfaceItem * Shell -> WlShell (QML) * ShellSurface -> WlShellSurface (QML) * ShellSurfaceItem -> WlShellSurfaceItem (QML) This is done to avoid confusion with XdgShell and will hopefully help clarify that some of the examples only support wl_shell and not xdg_shell. Additionally, this makes "Shell" an available name in the compositor API, which may in turn enable the creation of a more general abstraction hiding the details of the shell backends (i.e. xdg_shell, wl_shell, and eventually ivi_shell). Change-Id: Iebac1f36505084bfaaea68838005d54db6c55e21 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | qwindow-compositor: Fix regression when clearing popupsJohan Klokkhammer Helsing2016-03-311-3/+2
| | | | | | | | | | | | | | | | Clearing the popup list erroneously got moved inside the foreach loop. Change-Id: I8696c1c4281207230f5afa3a05d22881d93794c6 Reviewed-by: Erik Larsson <erik@ortogonal.com> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* | Initial compositor support for xdg-shell wayland extensionJohan Klokkhammer Helsing2016-03-244-14/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xdg-shell is an extension to the wayland protocol providing functionality suited towards traditional desktop environments. Most of the examples from Weston now require xdg-shell, ivi-shell or some other custom extension. In order for our compositor-api to support those examples and many real-world applications, we needed a compositor implementation of xdg-shell. This commit adds a class QWaylandXdgShell, along with QWaylandXdgSurface and QWaylandXdgPopup. These clases are used almost exactly like the corresponding QWaylandShell* variants. qwindow-compositor has been updated to use the new functionality. qwindow-compositor now only sets focus on surfaces that have a role. weston-terminal was crashing because we set keyboard focus on the cursor surface. Keyboard focus handling has been slightly changed. Most of the functionality has been moved from QWaylandKeyboard::setFocus to QWaylandInputDevice::setKeyboardFocus. This is done in order to track where the keyboard focus should have been, in case the input device (seat) does not currently have a keyboard capability. If a keyboard capability is later set on the input device, its focus will automatically be set to the value stored in QWaylandInputDevice. The reason for the change in keyboard focus handling is that we need to know if an xdgSurface has keyboard focus in order to know whether to send the Activated state in configure events. The Activated state tells the client to draw itself as having focus (i.e. title bar not grayed out). Change-Id: I1b1ca9a4223e87f5ade1e0f4c975979a400c38cb Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>