Commit fd53315f authored by Marco Martin's avatar Marco Martin
Browse files

more hacks for proper display

remove the old remains of wl_shell usage
parent f9e441ef
......@@ -30,7 +30,6 @@
#include <KWayland/Client/plasmashell.h>
#include <KWayland/Client/registry.h>
#include <KWayland/Client/surface.h>
#include <KWayland/Client/shell.h>
FullScreenOverlay::FullScreenOverlay(QQuickWindow *parent)
: QQuickWindow(parent)
......@@ -72,23 +71,12 @@ void FullScreenOverlay::initWayland()
m_plasmaShellSurface->setSkipTaskbar(true);
}
);
/*
connect(registry, &Registry::shellAnnounced, this,
[this, registry] (quint32 name, quint32 version) {
m_shellInterface = registry->createShell(name, version, this);
if (!m_shellInterface) {
return;
}
//bshah: following code results in error...
//wl_surface@67: error 0: ShellSurface already created
//Wayland display got fatal error 71: Protocol error
//Additionally, errno was set to 71: Protocol error
m_shellSurface = m_shellInterface->createSurface(m_surface, this);
}
);*/
registry->setup();
connection->roundtrip();
//HACK: why the first time is shown fullscreen won't work?
showFullScreen();
hide();
}
bool FullScreenOverlay::event(QEvent *e)
......@@ -101,6 +89,10 @@ bool FullScreenOverlay::event(QEvent *e)
if (pe->surfaceEventType() == QPlatformSurfaceEvent::SurfaceCreated) {
//KWindowSystem::setState(winId(), NET::SkipTaskbar | NET::SkipPager | NET::FullScreen);
// setWindowStates(Qt::WindowFullScreen);
if (m_plasmaShellSurface) {
m_plasmaShellSurface->setSkipTaskbar(true);
}
if (!m_acceptsFocus) {
setFlags(flags() | Qt::FramelessWindowHint|Qt::WindowDoesNotAcceptFocus);
//KWindowSystem::setType(winId(), NET::Dock);
......@@ -108,6 +100,10 @@ bool FullScreenOverlay::event(QEvent *e)
setFlags(flags() | Qt::FramelessWindowHint);
}
}
} else if (e->type() == QEvent::Show) {
if (m_plasmaShellSurface) {
m_plasmaShellSurface->setSkipTaskbar(true);
}
}
return QQuickWindow::event(e);
......
......@@ -28,8 +28,6 @@ namespace Client
class PlasmaWindow;
class PlasmaShell;
class PlasmaShellSurface;
class Shell;
class ShellSurface;
class Surface;
}
}
......@@ -54,10 +52,8 @@ protected:
private:
void initWayland();
KWayland::Client::PlasmaShellSurface *m_plasmaShellSurface = nullptr;
KWayland::Client::ShellSurface *m_shellSurface = nullptr;
KWayland::Client::Surface *m_surface = nullptr;
KWayland::Client::PlasmaShell *m_plasmaShellInterface = nullptr;
KWayland::Client::Shell *m_shellInterface = nullptr;
bool m_acceptsFocus = true;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment