summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-1614-31/+112
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylanddataoffer.cpp src/client/qwaylanddisplay.cpp src/client/qwaylandinputdevice.cpp src/client/qwaylandwindow.cpp src/compositor/compositor_api/qwaylandsurfaceitem.cpp Change-Id: I2eae0fd43a71fbfd7c907ca715707a26f3c134c5
| * Sanitize popup behavior.Laszlo Agocs2015-02-136-21/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Popups are pretty important for widget apps. Menus, combobox dropdows and such are all popups. Currently they are completely borked when activated via keyboard or touch. This is because of the bizarre set_popup request in the protocol, and Weston's current implementation, that ignore the fact that a popup can be opened as a result of a keyboard event too or may not originate from an input event at all. Pass the last input device and serial we have seen, regardless of the type, by tracking it globally in the QWaylandDisplay. With this patch menus and such will not freeze the application anymore when activated with keyboard or touch without sending a mouse event to the window first. The behavior is still broken in some ways, especially with keyboard due to immediately getting a popup_done, but at least applications remain usable. Task-number: QTBUG-41142 Task-number: QTBUG-41147 Change-Id: I18de501004ae8a62ff8667e72225d08c2d3ba491 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * Fix popup menus with no parent windowsGiulio Camuffo2015-02-111-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The QMenu API doesn't play well with Wayland. You can do: QMenu menu; menu.popup(someGlobalPos); which is completely broken on wayland. If some popup window doesn't have a transient parent use the current focus window for that. Fixes right-click popups in qdbusviewer and other apps. Change-Id: I3227f4ec27431ca8ec156971cbfdbf1e848a0527 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Fix copying text to non-qt clientsGiulio Camuffo2015-02-072-0/+5
| | | | | | | | | | | | | | | | | | Like we do for pasting, set the mime type of text to "text/plain;charset=utf-8" too besides "text/plain". This allows copying text to clients such as weston example clients or Xwayland. Change-Id: I8a24f32d93e438f16db662e7c09b09ddd7578768 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Do not send invisible key charactersGiulio Camuffo2015-02-051-1/+2
| | | | | | | | | | | | | | | | | | xkb_keysym_to_utf32() will return 0 if the keysym does not have a unicode representation. Task-number: QTBUG-44012 Change-Id: I85a13b58c7f0b9765c7d67db6568a90629bcfbfa Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * Fix deadlock when starting a dragGiulio Camuffo2015-02-051-1/+8
| | | | | | | | | | | | Change-Id: Ie2fdc56bffb97ce04ffad11ea7a7686dc09a06cc Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * Make all the screens virtual siblingsGiulio Camuffo2015-02-022-0/+9
| | | | | | | | | | | | | | | | Wayland outputs fit the definition of virtual sibling screens so make the platform screen subclass so. Change-Id: Id3f2592653f6309406185589f70127f2b74065ac Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Send mouse events with the correct modifiersGiulio Camuffo2015-01-291-5/+5
| | | | | | | | | | Change-Id: I33da2681bc2315b3dc7de16fa80c45e26a478caa Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * Fix pasting from sources advertising the utf8 charsetGiulio Camuffo2015-01-291-4/+21
| | | | | | | | | | | | | | | | | | Some clients use "text/plain;charset=utf8" as the mimetype for the clipboard instead of just "text/plain". Since we support Utf8 accept it as a valid type. Change-Id: Icd540f0ff507ed9917b374f3b40fbdc259ce9ee2 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * Make sure we send a valid initial resizeGiulio Camuffo2015-01-271-2/+2
| | | | | | | | | | Change-Id: Ib9a0152f83af433354d32ef4a8a233e5551ded8c Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Send a touch cancel event when we stop getting inputGiulio Camuffo2015-01-202-0/+15
| | | | | | | | | | | | | | | | | | | | Take a grab when a touch gesture begins and send a touch cancel event when we lose the grab. That makes sure that we don't leave the client with a broken input state if some item like Flickable steals the events from the QWaylandSurfaceItem. Change-Id: I1e07836041a25cdbabff0d8559c4e06cbac27e7e Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * Unset the pointer focus if we're deleting the view holding itGiulio Camuffo2015-01-191-0/+6
| | | | | | | | | | Change-Id: I546c6ab2a060d76de18330766a0b2fba419589bd Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Fix QtCompositor compilationGiulio Camuffo2015-02-081-1/+1
| | | | | | | | | | | | | | | | | | This is a quick fix, a proper fix needs the ongoing effort to make surfaces and outputs aware of each other. Change-Id: I61faca9929a448208e82574c5c4d963c271f7e68 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Add QWaylandOutput to support multiple outputsPier Luigi Fiorini2015-02-0833-236/+1078
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new QWaylandOutput class to support multiple outputs. Each QWaylandOutput need a window for rendering. Rename OutputGlobal to Output and Output to OutputResource. Add support for physical size, mode and available geometry. Use better defaults for geometry and refreshRate from the QWindow if available. A window is no longer passed to QWaylandCompositor constructor and all output related methods are removed, however one or more outputs are required for hardware integration. QWaylandCompositor returns a list of outputs and offers an API to add or remove outputs. Hardware integrations can run headless. Change-Id: I742996571ddb78328f7bfa4f79b25a81995279e1 Done-with: Jan Arne Petersen <jan.petersen@kdab.com> Done-with: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Add a SHM format converter classJorgen Lind2015-02-054-2/+152
| | | | | | | | | | | | | | | | | | This class helps keeing one lookuptable for server and client It relies on that wayland-(client|server)-protocol.h being included before the qwaylandshmformathelper.h Change-Id: I12158126a80c8fef5c52427d35792f33716020f1 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Update the protocol to 1.4 and raise the required libwayland versionGiulio Camuffo2015-02-0312-28/+366
| | | | | | | | | | | | | | | | Wayland 1.4 introduces wl_subsurface which is quite an important addition. Change-Id: I48375f60adce556c9989872319f4d073e4a7b13b Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Remove unused headerPier Luigi Fiorini2015-01-301-1/+0
| | | | | | | | | | | | | | Remove qwaylandcompositor_p.h leftover. Change-Id: I2ede92db92894f14301c89cc28c896cfdc6d3563 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Namespace the platform pluginsGiulio Camuffo2015-01-29135-34/+583
| | | | | | | | | | | | | | | | | | | | | | | | There currently is a QWaylandInputDevice class both in the wayland QPA plugin and in the QtCompositor API. This causes the qwindow-compositor example to crash when running nested in a wayland session due to a mismatch between the two classes. By namespacing all the plugin code we make sure that name clashes will not happen anymore. Change-Id: I17497cff697599200bea68bf01dfde474526390f Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-197-8/+21
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I65c8503cf632699129ebb6b4f01721b74be78def
| * Bump versionOswald Buddenhagen2015-01-161-1/+1
| | | | | | | | Change-Id: Iec9d43735e4388d3617d5c56a11013446e7ebd8e
| * Recreate the surface textures after the scenegraph invalidationv5.4.1Giulio Camuffo2015-01-151-0/+1
| | | | | | | | | | | | | | | | | | When the scenegraph is invalidated we delete the surfaces texture. Set the update flag to true so that when the scene graph is again initialized and starts to draw a frame the textures will be recreated. Change-Id: I2fb171e4bed517e48fa2311c22651150f3e605f7 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * Correctly handle '--invert' parameter in server-buffer compositorSiteshwar Vashisht2015-01-131-2/+2
| | | | | | | | | | Change-Id: I9a3285dc5bddd848ec557287c4641d9edce752a9 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * Set the composing string of the wayland input methodGiulio Camuffo2015-01-132-0/+17
| | | | | | | | | | | | Task-number: QTBUG-43346 Change-Id: I9bc6d804ddca59a7a0173b8f0d3ec2f268fe9a59 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| * Remove unused membersThiago Macieira2014-12-313-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang found two problems with this from QWaylandDataDeviceManager. First, it's a class, not a struct. Second, nothing is using this private member. qwaylanddatadevicemanager_p.h:66:5: warning: struct 'wl_data_device_manager' was previously declared as a class [-Wmismatched-tags] qwaylanddatadevicemanager_p.h:66:36: warning: private field 'm_data_device_manager' is not used [-Wunused-private-field] And also this one: qwaylandextendedoutput_p.h:61:21: warning: private field 'm_screen' is not used [-Wunused-private-field] Change-Id: Ifc8f28f92190547dcb0a5319aa6fc14277894f15 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Send proper mouse enter eventsGiulio Camuffo2015-01-134-50/+92
| | | | | | | | | | | | | | | | The wl_pointer.event carries the surface local position of the pointer. Notify Qt of it, without pretending it to be a motion event. Change-Id: Ibbe1d125a93b478f9c350a50bfea25b01f628178 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Allow retrieving the egl display for a QWindow on waylandGiulio Camuffo2015-01-051-0/+2
| | | | | | | | | | | | | | | | This allows a compositor running with the wayland qpa inside another compositor to provide EGL to its clients. Change-Id: I308fb909c8168955148be152bf314a53c0e5ca43 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Make use of the new QPlatformIntegration::destroyScreenGiulio Camuffo2014-12-291-2/+4
| | | | | | | | | | | | Task-number: QTBUG-41141 Change-Id: I0bd789cc1090f7e0e7615b47c33a4e4179677398 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-12-2911-12/+26
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf src/compositor/compositor_api/qwaylandsurface.cpp Change-Id: I3ee40153c959dbe31ea685571c5a8bb1ae36606e
| * Bump versionOswald Buddenhagen2014-12-121-1/+1
| | | | | | | | Change-Id: If637c41ed60c0191ea118ae4e83c5aa6781b6e2e
| * Fix wrong check condition.Giulio Camuffo2014-12-121-1/+1
| | | | | | | | | | Change-Id: Iecd5050097abcafa06073d41a31d1ae31fac5b42 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * Fix dangling pointer access when getting dnd data in some casesGiulio Camuffo2014-12-112-3/+4
| | | | | | | | | | | | | | | | | | Calling wl_data_source.destroy(); wl_data_offer.receive(), where the wl_data_offer is referring to the destroyed wl_data_source, was crashing the compositor. Change-Id: Iab352d63f8a93aebd0bfbcf1dc26c0e8a48a523a Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Fix possible double free when hiding a windowGiulio Camuffo2014-12-062-0/+5
| | | | | | | | | | | | | | | | | | There was a race condition between the gui and the wayland event thread which could lead to double freeing the QWaylandShmBackingStore's frame callback. Protect the wl_callback_destroy calls using a mutex. Change-Id: Ia70ebac208a6d4450328ba5254a850be26d84d6d Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Silence uninited variable compiler warningsLaszlo Agocs2014-12-031-1/+1
| | | | | | | | | | | | | | | | The code is correct but some compilers may still warn about dragData not getting initialized. Silence them. Change-Id: Ib52321667fc5094e22ebbef538b72b5477e6f10b Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| * Don't access a dangling pointerGiulio Camuffo2014-11-201-0/+2
| | | | | | | | | | | | | | | | The surface's resource may have been destroyed, return a null client in that case. Change-Id: I3d7e0f0e94008e003e43f1987e6560dd73f5c5db Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Remove deleted views from the listGiulio Camuffo2014-11-141-1/+3
| | | | | | | | | | Change-Id: Ic4c998347e14c17693bea461452d6ee8fc41064b Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Make sure to have valid texturesGiulio Camuffo2014-11-103-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The texture of QWaylandSurfaceItem's texture provider was updated in QWaylandSurfaceItem::updatePaintNode(). That is fine as long as the texture is accessed after the updatePaintNode() call, but if not we would access an invalid texture. That could happen when another QQuickItem subclass was accessing the textire in its updatePaintNode(). We don't have any guarantee on the order of the updatePaintNode() calls, so the other item could be updated before the QWaylandSurfaceItem. Change-Id: I7320d445c72796ce26f8d8483175a35e9c6840e7 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | xdg-shell: upgrade to support current version (weston-1.6.0)Philippe Coval2014-12-283-190/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many inprovements on windows's decorations, Also handle compositor events (test: Super+Shift+F , Super+Shift+M) The protocol file is a raw copy of Source: http://cgit.freedesktop.org/wayland/weston/plain/protocol/xdg-shell.xml?id=1.6.0 Task-number: QTBUG-38633/related Change-Id: I667ec52c8a7e34d74b60174a671c89671f841d6b Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Implement high-dpi supportMorten Johan Sorvig2014-12-179-13/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wayland 1.2 added support for display scaling, where wl_output has a "scale" event informing the the client that the compositor will scale the output surfaces by the given factor. The client then has the option of providing large surfaces to match the target pixel densety and bypass the compositor's scaling. This is done by calling wl_surface::set_buffer_scale. Re-use the current high-dpi support in Qt by implementing devicePixelRatio() for QWaylandScreen and QWaylandWindow. Provide high resolution buffers both for raster and OpenGL graphics. Introduce a new coordinate system: buffer coordinates, which is related to the window coordinate system via an "int scale" scale factor. This scale factor corresponds to Qts qreal devicePixelRatio, but we keep the name and the type in the QtWayland implementation. Change-Id: Ie10d7e5b4833480a9a25d96a26ad02150eb6e83f Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Enable Qt WebEngine on WaylandLaszlo Agocs2014-12-045-1/+60
| | | | | | | | | | | | | | | | | | The native resource getters that are supported by eglfs will have to be supported by the wayland platform plugin too. (on wayland-egl at least) Change-Id: Ibbab649c04785dbde177342c45b9bc6f1edd954d Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Merge "Merge branch '5.4' into dev" into refs/staging/devFrederik Gladhorn2014-11-15117-538/+1253
|\ \
| * | Merge branch '5.4' into devGiulio Camuffo2014-11-15117-538/+1253
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge done by Giulio Camuffo Conflicts: src/client/client.pro src/client/qwaylanddisplay.cpp src/client/qwaylandinputdevice.cpp src/client/qwaylandinputdevice_p.h src/client/qwaylandwindow.cpp src/compositor/compositor_api/qwaylandsurface.cpp src/compositor/compositor_api/qwaylandsurface_p.h src/compositor/wayland_wrapper/qwlsurface.cpp Change-Id: I1df878bb54f49d953c51215a2772869e261ebe81
| | * Be more careful when destroying wl_resourcesv5.4.0-rc1v5.4.0Giulio Camuffo2014-10-287-30/+17
| | | | | | | | | | | | | | | | | | | | | | | | The compositor must not destroy wl_resources when it wants to, else it breaks the contract with the client. Change-Id: Ic0d298072cdf0954d2504c04bff2bcc99733e621 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| | * Update .gitignore after wayland examples moveOlivier Blin2014-10-231-13/+13
| | | | | | | | | | | | | | | Change-Id: I44e0dc6ac4e92a8bdc6a9f8398e60e4d323247f9 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| | * Gracefully fallback when xkb context creation failsOlivier Blin2014-10-231-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xkb context creation can fail when xkeyboard-config files are not available. This changes qwlkeyboard to gracefully fallback on the QT_NO_WAYLAND_XKB path, as suggested by Giulio Camuffo. Change-Id: Ic57d80b6aa3e9fbd8a393a3ca54dff768a4c3e83 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
| | * Fix fd leak in case of ftruncate() failure in qwlkeyboardOlivier Blin2014-10-211-1/+3
| | | | | | | | | | | | | | | | | | Change-Id: Id7d6582d4e139763634c7022548b558d4a2f8ec2 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| | * Fix crash when cursor theme can not be loadedOlivier Blin2014-10-211-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add a debug message about theme loading failure. This is not necessarily fatal, some embedded applications could still function properly without a cursor. Change-Id: Ib3e2ee43b00630ee77997c7472a95ac5a22c2cc2 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| | * Fix -no-opengl buildsLaszlo Agocs2014-10-144-0/+8
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-41677 Change-Id: I039ec581e960eb70eb04aed6e65add70c563ba77 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| | * Be compatible with older compositorsGiulio Camuffo2014-10-137-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | When binding globals take care of the version the compositor provides and don't call requests that the compositor doesn't implement. Change-Id: Iea0c534fb9e005720857e2778e380b6a9c22a6f3 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| | * Move examples into wayland subdirectory.v5.4.0-beta1Friedemann Kleint2014-10-0936-17/+19
| | | | | | | | | | | | | | | | | | Conforming to the Qt project directory structure. Change-Id: I452867fabc88e9594fa26f944b5d3e1ca4ffc720 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| | * Pass the relevant serial when setting the selectionGiulio Camuffo2014-10-092-2/+3
| | | | | | | | | | | | | | | | | | | | | This fixes copying in Weston. Change-Id: Icbdb81078e8df4575bbe440321773131ba27ebbf Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>