summaryrefslogtreecommitdiff
path: root/src/plugins/shellintegration/xdg-shell
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-03-11 14:02:12 +0100
committerJohan Helsing <johan.helsing@qt.io>2019-03-14 14:37:51 +0000
commit617b0b063155523aa7affcdaa5aa3effac646124 (patch)
treeb9fc8490501dbb793d274006772bcef667199f05 /src/plugins/shellintegration/xdg-shell
parent1607b8bb38e57d9d5ebdd075a9b1f3f992c5cfde (diff)
downloadqtwayland-617b0b063155523aa7affcdaa5aa3effac646124.tar.gz
Client: Make QWaylandWindow's wl_surface inheritance private
QWaylandWindow inheriting wl_surface is a leftover from the old days, and today it is sometimes causing great problems. Especially on xdg_shell and other shells where the wl_surface needs to recreated with a different role if the QWindow::type changes. This is currently worked around by calling reset() on the surface, which will destroy the wl_surface, and emit some necessary events and signals. However, much of the rest of the code still assumes that a QWaylandWindow maps directly to a single wl_surface which won't change over the lifetime of the QWaylandWindow. Today, it would make sense to implement this with composition rather than inheritance. This is a major undertaking and so this is the first small step; hide the inheritance in QWaylandWindow's public API. This makes it much more visible when and where the rest of the QPA plugin is using it, so we can eventually move it into its own class later. Task-number: QTBUG-74373 Change-Id: I257729e33c3a5368cef4bb1e16148ba392e65bd2 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Diffstat (limited to 'src/plugins/shellintegration/xdg-shell')
-rw-r--r--src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
index 78b7b45c..acce08b5 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
@@ -455,7 +455,7 @@ QWaylandXdgShell::~QWaylandXdgShell()
QWaylandXdgSurface *QWaylandXdgShell::getXdgSurface(QWaylandWindow *window)
{
- return new QWaylandXdgSurface(this, get_xdg_surface(window->object()), window);
+ return new QWaylandXdgSurface(this, get_xdg_surface(window->wlSurface()), window);
}
void QWaylandXdgShell::xdg_wm_base_ping(uint32_t serial)