summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandxdgsurface.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Create and destroy the shell surface when showing and hidingGiulio Camuffo2016-11-171-9/+10
| | | | | | | | | | | | | | | | | | This changes the shell surface handling for windows, and instead of creating the shell surface at initialization time, and then attaching a null buffer to hide it, it creates the shell surface on setVisible(true), and destroys it on setVisible(false). This fixes hiding when using xdg_shell, as that interface defines that attaching a null buffer to an xdg_surface is an error. Also this should help with bugged EGL drivers which attach a buffer after eglSwapBuffers() returns, which used to cause a newly hidden window to get a new valid buffer after we attached a null one, showing it again. Task-number: QTBUG-47902 Change-Id: I8e0a0442319a98cc1361803ea7be1d079b36fc8c Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'qt/5.6' into 5.7Paul Olav Tvete2016-11-101-1/+3
|\ | | | | | | Change-Id: I1efd16d6c5f939d61001376c3b010eae1927595b
| * Don't create new xdg surfaces in updateTransientParentJohan Klokkhammer Helsing2016-11-091-1/+3
| | | | | | | | | | Change-Id: I1644a75269fec40644f02eeb275d9e6b98995c0e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-111-4/+5
|\| | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylanddisplay.cpp src/client/qwaylanddisplay_p.h src/client/qwaylandxdgpopup_p.h Change-Id: If86ea09971773dc6c541f07819459a90e8ab73a0
| * Make wl_shell and xdg_shell use the QWaylandShellIntegration interfaceJohan Klokkhammer Helsing2016-08-091-4/+5
| | | | | | | | | | | | | | | | This simplifies the code in QWaylandDisplay and hopefully makes it easier to implement a prioritized shell selection mechanism later. Change-Id: I2bb3a13f8acedb60a6606cb3a8b5b228095eadf9 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-011-1/+14
|\| | | | | | | Change-Id: I75a8ddc0652f3c6f438ef98e940c9357450d29c6
| * Use xdg_shell configure events to determine active windowJohan Klokkhammer Helsing2016-07-041-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the xdg_shell protocol, the compositor is allowed to set multiple active windows. Qt's model, however, allows only a single active window. In order to map between the models, a list of the compositor's active windows is kept in QWaylandDisplay in the order they were activated. Hence, the front of this list will always be the most recently activated window, and it will be mapped as Qt's active window. Previously keyboard focus was used to determine the active window, this method has been disabled for xdg_shell. Functionality for delaying the call to QWindowSystemInterface::handleWindowActivated has been moved from QWaylandInputDevice::Keyboard to QWaylandDisplay so the implementations can share the workaround. Task-number: QTBUG-53702 Change-Id: I878151f9c52ed09a8d6571c6208920436c3ca8fc Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-301-13/+10
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylandinputcontext_p.h src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h Change-Id: Iac517e1985e4e67d7ca00ca4c10dcda9dd9079f9
| * Client: Fix incorrect size when maximizing using xdg_shellJohan Klokkhammer Helsing2016-06-161-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When maximizing xdg_shell clients, the clients would call QPlatformWindow::setGeometry() with frame margins included, resulting in a window that was bigger than what was requested by the compositor. The reason for this, was that QWaylandXdgSurface would subtract the frame margins from the width and height only when the resizing state was set, not when the maximized state was set. Later, margins were added again before QWaylandWindow::configure was called. This resulted in margins being subtracted and then added back for the resizing state, while for the maximized state margins were only added and never subtracted. This behavior has now been simplified so only size including window frame is tracked. This is what we receive in the XdgSurface::configure event anyway, and also what QWaylandWindow::configure expects. Change-Id: I0629e7e79a5367fa872743c6d025bfab8a4f2866 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-221-6/+4
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/compositor/compositor_api/qwaylandcompositor.h src/compositor/compositor_api/qwaylandquickcompositor.h src/compositor/compositor_api/qwaylandsurfaceitem.h src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration_p.h Change-Id: I094128be314d2c3d4fe350fa7a162e37da34ae10
| * Fix client xdg_surface not handling all states from configure eventJohan Klokkhammer Helsing2016-03-151-6/+4
| | | | | | | | | | | | | | The code used sizeof(state) when it should have been sizeof(*state). Change-Id: Id1714a5e90e6c58850023424726de26719a69046 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-201-14/+20
|/ | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I76ae5d3e64f096eb3163d6163a38d68c7c1ca756 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* xdg-shell: upgrade to support current version (weston-1.8.0)Philippe Coval2015-09-231-10/+13
| | | | | | | | | | | | | | | Handle transition from Normal to Maximize then Fullscreen and back to Maximized. Avoid to maximize if no requested size The protocol file is a raw copy of Source: http://cgit.freedesktop.org/wayland/weston/plain/protocol/xdg-shell.xml?id=1.8.0 Minor Nitpick fixes (arrays of bytes, conditionnal or test, c++ function call) Task-number: QTBUG-47327 Change-Id: Ib508e2166cc1337fd93454f30814136839cffa29 (cherry picked from commit 6906a6445c0cbf9d11f8d5d32b181f558a2292c9) Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* QWaylandXdgSurface/QWaylandWlShellSurface: Fix warnings about CT ↵Friedemann Kleint2015-09-151-2/+2
| | | | | | | | | | | | | | | | initialization order. qwaylandxdgsurface.cpp: In constructor 'QtWaylandClient::QWaylandXdgSurface::QWaylandXdgSurface(xdg_surface*, QtWaylandClient::QWaylandWindow*)': qwaylandxdgsurface.cpp:55:31: warning: base 'QtWayland::xdg_surface' will be initialized after [-Wreorder] qwaylandxdgsurface.cpp:55:31: warning: base 'QtWaylandClient::QWaylandShellSurface' [-Wreorder] qwaylandxdgsurface.cpp:48:1: warning: when initialized here [-Wreorder] qwaylandwlshellsurface.cpp: In constructor 'QtWaylandClient::QWaylandWlShellSurface::QWaylandWlShellSurface(wl_shell_surface*, QtWaylandClient::QWaylandWindow*)': qwaylandwlshellsurface.cpp:55:31: warning: base 'QtWayland::wl_shell_surface' will be initialized after [-Wreorder] qwaylandwlshellsurface.cpp:55:31: warning: base 'QtWaylandClient::QWaylandShellSurface' [-Wreorder] qwaylandwlshellsurface.cpp:49:1: warning: when initialized here [-Wreorder] Change-Id: If7ed49fa6f788db7407b5ee82aa252e19e2d4747 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Update copyright headersJani Heikkinen2015-02-171-22/+14
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I5a74d32515c3f1fe7aa1916f4241c92832510f8c Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Namespace the platform pluginsGiulio Camuffo2015-01-291-0/+4
| | | | | | | | | | | | 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>
* xdg-shell: upgrade to support current version (weston-1.6.0)Philippe Coval2014-12-281-56/+56
| | | | | | | | | | | | | | | 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>
* Rename QWaylandDecoration => QWaylandAbstractDecorationRobin Burchell2014-09-231-1/+1
| | | | | | | This is in preparation for decoration plugins. Change-Id: Idb322a7a5cbc2eb5bf2cce019073f9f4fb46297f Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Add a way to have out of source shell integrationsGiulio Camuffo2014-08-071-0/+36
| | | | | | | | | | | | | | | | | | Some platforms (especially non-desktop ones) may use a custom Wayland shell extension, more tailored to the form factor than the generic and desktoppy wl_shell or xdg_shell. Instead of stuffing N protocol implementations in the QPA plugin use a plugin architecture to allow them to live out of tree. When creating a shell surface the QT_WAYLAND_SHELL_INTEGRATION env variable will be checked, and if it points to a valid plugin that will be used to create the shell surface, falling back to wl_shell or xdg_shell if no plugin is specified. Change-Id: I05019174bb915199dd726f5fdcc0385ef846e8de Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Philippe Coval <rzr@gna.org> Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* xdg-shell: upgrade to support current version (weston-1.5.0)Philippe Coval2014-06-201-13/+47
| | | | | | | | | | | The protocol file is a raw copy of Source: http://cgit.freedesktop.org/wayland/weston/plain/protocol/xdg-shell.xml?id=1.5.0 Task-number: QTBUG-38633/related Change-Id: I41ca2f89c09a8b6348ce2fbf6d59f44b4c8134df Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Philippe Coval <rzr@gna.org>
* Add minimize feature to QWindow using wayland's xdg-shellPhilippe Coval2014-06-091-0/+173
The feature is disabled by default, and can be enabled at runtime by exporting QT_WAYLAND_USE_XDG_SHELL env variable. This patch relies on presence of protocol file which has been imported from weston-1.4.0 sources, until the xdg-shell is merge into wayland itself. Because xdg-shell is experimental, code fallback to WaylandShell if no XdgShell but keep in mind those shells are exclusive. Since xdg-shell and wayland-shell share most of the API, some factorization is done by an (empty) abstraction class to keep the code more readable. Despite xdg-shell introduces new popups concept, they're not used on this change for maitainance purpose. Notes: * This change depends on presence of xdg-shell protocol file. * You can check a demo video (qt-tizen-cinematic-experience-20140430-rzr) of the test case at : https://www.youtube.com/watch?v=pY_XXvKc_0E# * Use Super+Tab to show window again if hidden Task-number: QTBUG-38633/part/2of2 Change-Id: I2d7ed85bea1847d82439fdfc893a3dbb2581c14a Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>