Some changes

- uncomment to make it frameless window hint
- set window state to fullscreen
This commit is contained in:
Bhushan Shah 2018-02-11 16:15:57 +05:30
parent 02fd43edb8
commit 0d626dc7ad

View file

@ -35,8 +35,8 @@
FullScreenPanel::FullScreenPanel(QQuickWindow *parent) FullScreenPanel::FullScreenPanel(QQuickWindow *parent)
: QQuickWindow(parent) : QQuickWindow(parent)
{ {
//setFlags(Qt::FramelessWindowHint); setFlags(Qt::FramelessWindowHint);
//setWindowState(Qt::WindowFullScreen); setWindowState(Qt::WindowFullScreen);
// connect(this, &FullScreenPanel::activeFocusItemChanged, this, [this]() {qWarning()<<"hide()";}); // connect(this, &FullScreenPanel::activeFocusItemChanged, this, [this]() {qWarning()<<"hide()";});
connect(this, &QWindow::activeChanged, this, &FullScreenPanel::activeChanged); connect(this, &QWindow::activeChanged, this, &FullScreenPanel::activeChanged);
initWayland(); initWayland();
@ -72,6 +72,7 @@ void FullScreenPanel::initWayland()
m_plasmaShellSurface->setSkipTaskbar(true); m_plasmaShellSurface->setSkipTaskbar(true);
} }
); );
/*
connect(registry, &Registry::shellAnnounced, this, connect(registry, &Registry::shellAnnounced, this,
[this, registry] (quint32 name, quint32 version) { [this, registry] (quint32 name, quint32 version) {
@ -85,7 +86,7 @@ void FullScreenPanel::initWayland()
//Additionally, errno was set to 71: Protocol error //Additionally, errno was set to 71: Protocol error
m_shellSurface = m_shellInterface->createSurface(m_surface, this); m_shellSurface = m_shellInterface->createSurface(m_surface, this);
} }
); );*/
registry->setup(); registry->setup();
connection->roundtrip(); connection->roundtrip();
} }
@ -94,10 +95,7 @@ void FullScreenPanel::showEvent(QShowEvent *event)
{ {
using namespace KWayland::Client; using namespace KWayland::Client;
QQuickWindow::showEvent(event); QQuickWindow::showEvent(event);
setWindowState(Qt::WindowFullScreen);
if (m_shellSurface) {
m_shellSurface->setFullscreen();
}
} }