summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-098-23/+41
|\| | | | | | | Change-Id: Ib4c65db63c2f3119fc7c157d4353c4e0ecebefb0
| * Clean up ShmServerBuffer's unused and shadowing membersv5.12.0-beta2Johan Klokkhammer Helsing2018-10-092-10/+10
| | | | | | | | | | Change-Id: I588ccc782f593ec83a87f75bd88d98f873366395 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Client (xdg-shell): Only restore normal size when not maximizedJohan Klokkhammer Helsing2018-10-092-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kwin and perhaps other compositors sometimes send questionable configure events with state set to maximized and size == {0,0}. Previously, we would then restore the m_normalSize, which would give us a maximized window with the size of a windowed (normal) one. A size of zero usually means that it's up to the client to decide, which makes sense for non-maximized windows, but not so much for maximized ones. This is what the protocol spec says about the maximized state: The surface is maximized. The window geometry specified in the configure event must be obeyed by the client. It's fixed in the dev version of kwin, but until then, let's be on the safe side and only resize the window if things make sense. [ChangeLog][QPA plugin] Fixed a bug where maximized windows would resize to their unmaximized size if the compositor sent an invalid configure event. Change-Id: I2371b29c82426ac48cd1c18c14c3dd0fe4f2250e Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Client: Fix cursor size becoming bigger and bigger when switching screensJohan Klokkhammer Helsing2018-10-081-3/+4
| | | | | | | | | | | | | | | | | | | | | | cursorSize was a static which was multiplied with the dpr each time loadCursorSize was called resulting in a bigger and bigger cursor size. Fix it by making the static constant. Change-Id: Ie23cf0cc0d6c13721feecebe214d7c794be35077 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org>
| * Don't send ivi_surface configure events with negative sizeJohan Klokkhammer Helsing2018-10-041-0/+4
| | | | | | | | | | | | | | Similarly to how we don't do it for xdg_shell or wl_shell. Change-Id: I61cd453858c9fdff148364f4dfb85c345943725c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Avoid spurious move events after configure callDavid Edmundson2018-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whilst wayland can't actually move the window in a QWindow::setGeometry call the previous behavior was to keep it so that it appeared to the client that it had moved. The new behavior is non-consistent, QWindow::setPosition will update QWindow::position until the first configure call is received at which point it will move back to 0,0. This then generates a QMoveEvent for the window that hasn't moved. This patch keeps the QWindow::position consistent with the user request and doesn't generate move events. Change-Id: Ifb1433b3902d44c1b2e43036bc1805a6e00128fb Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Client: Remove failing assert on compositors without wl_data_deviceJohan Klokkhammer Helsing2018-10-031-1/+0
| | | | | | | | | | | | | | | | | | Some compositors don't advertise wl_data_device_manager support, and the client has no control over this, so the assertion doesn't make sense. Returning nullptr in that case should be fine. Change-Id: If0b145326d074ea4ebf8f5a12654962d56012a2d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Fix compilation with libwayland < 1.10 (again)Johan Klokkhammer Helsing2018-10-051-1/+6
| | | | | | | | | | | | | | | | wl_proxy_marshal_constructor_versioned was added in libwayland v1.10.0, use the old way with wl_proxy_marshal_constructor for older versions instead. Change-Id: I4514212e0b44ecbf200769759667186f71b279b6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Remove wayland-client.h includeJohan Klokkhammer Helsing2018-10-031-2/+0
| | | | | | | | | | Change-Id: I44df8aa9117e12280f6397f7d75dc10959905302 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Don't include system versions of wayland protocolJohan Klokkhammer Helsing2018-10-0344-60/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wayland-client.h and wayland-server.h includes protocol generated for the version of wayland.xml corresponding to the libwayland version. This becomes a problem when we want to support a version of wayland.xml that's newer than the system libwayland. The solution is to include wayland-client-core.h and wayland-client-server.h instead. These headers don't include any wayland-scanner generated code, so we can safely compile and link code generated against the version of wayland.xml that we ship. [ChangeLog] Code generated by qtwaylandscanner now includes wayland-client-core.h and wayland-server-core.h instead of wayland-client.h and wayland-server.h. This might break source compatibility for code using custom wayland extensions. Fixes: QTBUG-70553 Change-Id: Ice0cdb60ecc4f936acc0e158b96f7978549f62c1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-025-17/+480
|\| | | | | | | Change-Id: I4bd7389958fcee8b16d131625280c7d125894212
| * Update plugins.qmltypesv5.12.0-beta1Kai Koehne2018-10-012-10/+473
| | | | | | | | | | | | Task-number: QTBUG-70264 Change-Id: Idd4c6b2b7bb032241555a08e2b3e420b1312aa35 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Compositor: Fix crash after surface destructionJohan Klokkhammer Helsing2018-10-011-1/+1
| | | | | | | | | | | | | | | | Fixes a crash due to dangling pointer dereference in QWaylandQuickItem::inputMethodQuery. Change-Id: Id379779f23221e7de17423f75c3d78d7e794b7b9 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Compositor: Remove WaylandCursorItem.scaleCorrectionJohan Klokkhammer Helsing2018-10-011-5/+4
| | | | | | | | | | | | | | It's an implementation detail, so shouldn't be exposed as a property. Change-Id: Ib0a5b7dd92403cf45e1067710d1aad330a7a340f Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Client: Fix deadlock for xdg-shell when makeCurrent is called earlyJohan Klokkhammer Helsing2018-09-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | If makeCurrent was called before the window was exposed, it would disable resizing, which would block the window from applying the configure which the client needs to ack in order to be exposed. Fixes the issue by locking resizing only if the window is exposed. Change-Id: I0e6b30bc4b08886fb95d502cac0b735d4bb732d2 Fixes: QTBUG-70646 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-2533-20/+1051
|\| | | | | | | Change-Id: I66c91dfde14a7c252a02777cfcf0396b1d05e854
| * Add server buffer integration using Linux dma-bufPaul Olav Tvete2018-09-2118-3/+1018
| | | | | | | | | | | | Fixes: QTBUG-70494 Change-Id: Iaa4990fe9d39a1f9fb81f5e5f19039aa2e52dcac Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Add virtual QtWayland::ServerBuffer::bufferInUse()Paul Olav Tvete2018-09-215-0/+12
| | | | | | | | | | | | | | | | This allows the compositor to reclaim unused graphics memory when a buffer is no longer used by clients. Change-Id: Ia0269608019c5120da8c091c81e165411b563554 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Add logging category for hardware integrationsPaul Olav Tvete2018-09-202-0/+2
| | | | | | | | | | | | | | qLcWaylandCompositorHardwareIntegration, "qt.waylandcompositor.hardwareintegration" Change-Id: I977ccc53f51b24b58acee08c424b806868550eac Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Change compositor categorized logging namespacePaul Olav Tvete2018-09-203-6/+8
| | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Add new categorized logging namespace "qt.waylandcompositor" and rename "qt.compositor.input.methods" to "qt.waylandcompositor.inputmethods" Change-Id: Id861e527e3eb8582fdc96f8497fad0cba0766847 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * Don't use members of wl_resourceJohan Klokkhammer Helsing2018-09-187-11/+11
| | | | | | | | | | | | | | | | | | When we switch to only including core wayland headers, wl_resource will be an opaque type. Use the getters and setter functions instead. Task-number: QTBUG-70553 Change-Id: I7d84d48a4ee3586f231a331cd15716686dcee775 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Fix popup positions on screens when DPR != 1Johan Klokkhammer Helsing2018-09-244-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Fixed a bug where xdg-shell popups were misplaced when devicePixelRatio was not 1. The fix is to use the more robust QWaylandQuickItem::mapFromSurface instead. Also made wl-shell use mapFromSurface, although it already accounted for devicePixelRatio. Fixes: QTBUG-70662 Change-Id: I8be3ea76d6bcfd6d6974d532d160c20e44499382 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Add QWaylandQuickItem::mapFromSurfaceJohan Klokkhammer Helsing2018-09-242-0/+17
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Added QWaylandQuickItem::mapFromSurface which converts points in Wayland surface coordinates to points in QQuickItem coordinates. i.e. the inverse of the existing QWaylandQuickItem::mapToSurface. Task-number: QTBUG-70662 Change-Id: I11123c2c5394d7d9b7b8fdfcfd325592597a6b50 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Client: Make features for shell integrationsJohan Klokkhammer Helsing2018-09-212-7/+42
| | | | | | | | | | | | | | | | [ChangeLog][QPA plugin] Shell integrations are now features that can be enabled or disabled at build time. Change-Id: I1c48bb5d444074ac25331cb1ca8a9f49ebcd9805 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Decorations: Don't depend on wl_shellJohan Klokkhammer Helsing2018-09-2012-51/+68
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QPA plugin] The private window decoration API method, QWaylandAbstractDecoration::startResize, now takes Qt::Edges argument instead of a wl_shell_surface_resize enum. This will break window decoration plugins written for older versions of Qt Wayland. Change-Id: I4fc9aab949e91efd48a4943f8e116f51dfc373b8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-1822-783/+210
|\| | | | | | | Change-Id: I27420ad626a0c6a18b9a11c6ffdc102006fe78e0
| * Update xdg-shell-unstable-v5.xmlJohan Klokkhammer Helsing2018-09-171-17/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | The old xdg-shell-unstable-v5.xml was malformed, and was missing some <description> tags. The updated version passes wayland-scanner run with --strict. Hopefully we can start to use it soon. Otherwise, it's just documentation fixes. Change-Id: Id28ad7196643156cd22407e12ed7ff1e7fb34ce6 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
| * Revert "Upgrade wayland.xml to version 1.10.0"Johan Klokkhammer Helsing2018-09-172-662/+85
| | | | | | | | | | | | | | | | | | | | | | | | Since we're using the deprecated ways of including wayland (wayland-server.h instead of wayland-server-core.h), we can't upgrade wayland.xml to a version that's newer than the system libwayland. Our minimum supported version is 1.6. This reverts commit 4d2106d4b6ed1a088834a8fec9c6a47e5a67d4e8. Fixes: QTBUG-70528 Change-Id: I102cb215a40a1aaaeba6f463200eefc3be653c52 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Compositor: Rename addSocketFd to addSocketDescriptorJohan Klokkhammer Helsing2018-09-172-4/+4
| | | | | | | | | | | | | | | | Generally we prefer not to use abbreviated names. It now also matches what's in other Qt modules. Change-Id: I67d54961bebf93760780be54761c6122069f1e1d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Remove ifdefs for unsupported libwayland versionsJohan Klokkhammer Helsing2018-09-173-21/+0
| | | | | | | | | | | | | | The ifdefs were for version 1.2.0. Change-Id: Ie58745c7cf4c0fba45bc5203d24e9913d3a8b8ce Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Compositor: Use Q_PRIVATE_SLOTs in QWaylandOutputJohan Klokkhammer Helsing2018-09-173-37/+34
| | | | | | | | | | Change-Id: I25a8feb0919dcccc30d2f23d619e0ba5d4c214ff Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Remove unnecessary function declarationJohan Klokkhammer Helsing2018-09-171-5/+0
| | | | | | | | | | Change-Id: I55a7b579babfa99707e3e4b4cf15c34f48459825 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Compositor: Rename QWaylandKeyboard::toScanCode to keyToScanCodeJohan Klokkhammer Helsing2018-09-173-4/+4
| | | | | | | | | | | | | | Since the key argument is an int, the signature looks ambiguous otherwise. Change-Id: I732971437ff7354ad3863ecfe42c779a06a84d69 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Remove confusing elses after returnsJohan Klokkhammer Helsing2018-09-142-8/+4
| | | | | | | | | | Change-Id: I0ba39df637f6e5ce93ba57f40f279c81532e9289 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Don't include wayland-client-core.hJohan Klokkhammer Helsing2018-09-141-1/+1
| | | | | | | | | | | | | | | | It requires libwayland 1.8 and we're supposed to support versions as old as 1.6 Task-number: QTBUG-70528 Change-Id: Iff4c2542d103d53aba8db99ecceddfccb79cfcb6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Add missing Q_UNUSEDJohan Klokkhammer Helsing2018-09-141-0/+1
| | | | | | | | | | Change-Id: I41ff947ed5fd18d19058583ed3da51225d353af9 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Don't try to use wl_proxy_get_version with libwayland < 1.10Johan Klokkhammer Helsing2018-09-131-0/+7
| | | | | | | | | | | | | | | | The pregenerated header for xdg-shell was generated using wayland-scanner 1.13 which uses wl_proxy_get_version which was introduced in 1.10. Change-Id: I19507ff6e543d4b0aa53e0d022d680090c34ab50 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Merge "Merge remote-tracking branch 'qt/5.11' into 5.12" into refs/staging/5.12Paul Olav Tvete2018-09-122-24/+35
| |\
| | * Merge remote-tracking branch 'qt/5.11' into 5.12Paul Olav Tvete2018-09-122-24/+35
| | |\ | | | | | | | | | | | | Change-Id: I703c03c4c92889f82a1c8d16eb906bad9fa10461
| | | * Don't destroy buffer before surfaceDestroyed signalPaul Olav Tvete2018-09-112-24/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Give the application time to set buffer lock first. Change-Id: Id8a7ee8956bc587344b8eece7072edff5197414c Task-number: QTBUG-69384 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
| * | | Workaround for crash in QWaylandGlContext::makeCurrentv5.12.0-alpha1Johan Klokkhammer Helsing2018-09-121-0/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | QOpenGLContext::makeCurrent no longer sets the current context before calling the platform function. Task-number: QTBUG-70511 Change-Id: I67766d43b1142b0742f655b5c2728f4c87fbfb5f Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Client: Clean up hardware integration initializationJohan Klokkhammer Helsing2018-09-112-32/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If QT_WAYLAND_DISABLE_HW_INTEGRATION is set, clients no longer bind to the qt_hardware_integration interface. [ChangeLog][QPA plugin] The environment variables, QT_WAYLAND_CLIENT_BUFFER_INTEGRATION and QT_WAYLAND_SERVER_BUFFER_INTEGRATION, now takes precedence over what is communicated through the qt_hardware_integration wayland interface. Change-Id: Iff68ccc151781c3c2ad6def8497bca65e89a0b20 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-1131-71/+2078
|\| | | | | | | | | | | Change-Id: I40724946222f7e51b3cf36a2ce1cd60d7801f41a
| * | Create feature wayland-shm-emulation-server-bufferJohan Klokkhammer Helsing2018-09-104-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | And make OpenGL a requirement, in order to make builds without OpenGL work again. Fixes: QTBUG-69779 Change-Id: Iff1153b0aaca8e115f47c59c2ceb028e638e3fe9 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | Prefix and suffix server buffer integrationsJohan Klokkhammer Helsing2018-09-104-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Features for server buffer integrations have been renamed. "drm-egl-server" is now "wayland-drm-egl-server-buffer" and "libhybris-egl-server" is "wayland-libhybris-egl-server-buffer". Change-Id: I06a9d1b1c9219c88045fe966be134ff072cd756e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | Compositor: Add XdgToplevel::xdgSurfaceJohan Klokkhammer Helsing2018-09-072-0/+19
| | | | | | | | | | | | | | | | | | | | | Similar to the property we already have for popups, XdgPopup::xdgSurface. Change-Id: I1a0b77b28a35597139fcf381a4b345ccaa93d626 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | Fix eglGetError call in error handlingJohan Klokkhammer Helsing2018-09-071-1/+1
| | | | | | | | | | | | | | | Change-Id: I215db1d8bb321e0fe9d49d09c8b5f0d2492e901d Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
| * | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-063-3/+6
| |\| | | | | | | | | | Change-Id: I06b86b413984c07f6be98120450bc859dab271c1
| | * Compositor: Don't send illegal leave eventsJohan Klokkhammer Helsing2018-09-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a client doesn't bind to an output, don't try to send leave events for it. ...similarly to how we don't send enter events for it. weston-simple-egl is one such client. [ChangeLog][Compositor] Fixed a bug that caused some clients to abort in libwayland when a surface left an output. Change-Id: Ia7f4c21a7d766092dfb8a20c56fa1128a3046f97 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * Compositor: Fix OpenGL textures deleted prematurelyJohan Klokkhammer Helsing2018-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Fixed a bug where destroying a WaylandQuickItem would delete the OpenGL texture for all other WaylandQuickItems using that surface. The texture QWaylandBufferRef::toOpenGLTexture returns is owned by the buffer (documented public API), so setting QQuickWindow::TextureOwnsGLTexture in QWaylandTextureProvider is wrong. Task-number: QTBUG-70163 Change-Id: I831f2aa81ed20c08d4d87bccac33650ab86d19c8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>