From 3f6cb8812b709989cb56d14a6da0de7ee07f8a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 16 Nov 2015 16:14:10 +0100 Subject: [PATCH] [backends/wayland] ShellSurface opened as a toplevel instead of fullscreen Going towards nested setup. --- backends/wayland/wayland_backend.cpp | 15 +++------------ backends/wayland/wayland_backend.h | 1 - 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/backends/wayland/wayland_backend.cpp b/backends/wayland/wayland_backend.cpp index c99a540111..f578b3380a 100644 --- a/backends/wayland/wayland_backend.cpp +++ b/backends/wayland/wayland_backend.cpp @@ -308,7 +308,6 @@ WaylandBackend::~WaylandBackend() void WaylandBackend::init() { - connect(this, &WaylandBackend::shellSurfaceSizeChanged, this, &WaylandBackend::checkBackendReady); connect(m_registry, &Registry::compositorAnnounced, this, [this](quint32 name) { m_compositor->setup(m_registry->bindCompositor(name, 1)); @@ -441,10 +440,11 @@ void WaylandBackend::createSurface() m_seat->setInstallCursor(true); } if (m_shell->isValid()) { - // map the surface as fullscreen m_shellSurface = m_shell->createSurface(m_surface, this); - m_shellSurface->setFullscreen(); connect(m_shellSurface, &ShellSurface::sizeChanged, this, &WaylandBackend::shellSurfaceSizeChanged); + m_shellSurface->setSize(initialWindowSize()); + m_shellSurface->setToplevel(); + setReady(true); } } @@ -456,15 +456,6 @@ QSize WaylandBackend::shellSurfaceSize() const return QSize(); } -void WaylandBackend::checkBackendReady() -{ - if (!shellSurfaceSize().isValid()) { - return; - } - disconnect(this, &WaylandBackend::shellSurfaceSizeChanged, this, &WaylandBackend::checkBackendReady); - setReady(true); -} - Screens *WaylandBackend::createScreens(QObject *parent) { return new WaylandScreens(this, parent); diff --git a/backends/wayland/wayland_backend.h b/backends/wayland/wayland_backend.h index 89bfac8098..d6f9b0c2f3 100644 --- a/backends/wayland/wayland_backend.h +++ b/backends/wayland/wayland_backend.h @@ -134,7 +134,6 @@ private: void initConnection(); void createSurface(); void destroyOutputs(); - void checkBackendReady(); wl_display *m_display; KWayland::Client::EventQueue *m_eventQueue; KWayland::Client::Registry *m_registry;