Commit 9202df97 authored by Bharadwaj Raju's avatar Bharadwaj Raju 📚 Committed by Maximilian Schiller
Browse files

Fix Yakuake icon appearing in taskbar through Qt::Tool window flag

So far we've been setting _NET_WM_STATE_SKIP_TASKBAR ourselves, but
Qt messes with this, leading to race conditions where it still
appears in the taskbar. This sets the Qt::Tool window flag, which
will set it via Qt itself, and won't be clobbered. An old hack has
been removed, as it isn't needed anymore.

Also makes show animation match retract animation.

BUG: 360037
parent 21ad0b56
......@@ -61,7 +61,7 @@
#endif
MainWindow::MainWindow(QWidget *parent)
: KMainWindow(parent, Qt::CustomizeWindowHint | Qt::FramelessWindowHint)
: KMainWindow(parent, Qt::CustomizeWindowHint | Qt::FramelessWindowHint | Qt::Tool)
{
QDBusConnection::sessionBus().registerObject(QStringLiteral("/yakuake/window"), this, QDBusConnection::ExportScriptableSlots);
......@@ -1147,25 +1147,6 @@ void MainWindow::changeEvent(QEvent *event)
KMainWindow::changeEvent(event);
}
bool MainWindow::event(QEvent *event)
{
if (event->type() == QEvent::Expose) {
// FIXME TODO: We can remove this once we depend on Qt 5.6.1+.
// See: https://bugreports.qt.io/browse/QTBUG-26978
applyWindowProperties();
#if (QT_VERSION > QT_VERSION_CHECK(5, 5, 0))
} else if (event->type() == QEvent::PlatformSurface) {
const QPlatformSurfaceEvent *pSEvent = static_cast<QPlatformSurfaceEvent *>(event);
if (pSEvent->surfaceEventType() == QPlatformSurfaceEvent::SurfaceCreated) {
applyWindowProperties();
}
#endif
}
return KMainWindow::event(event);
}
bool MainWindow::focusNextPrevChild(bool)
{
return false;
......
......@@ -93,7 +93,6 @@ protected:
void moveEvent(QMoveEvent *) override;
void changeEvent(QEvent *event) override;
void closeEvent(QCloseEvent *event) override;
bool event(QEvent *event) override;
bool focusNextPrevChild(bool) override;
virtual bool queryClose() override;
......
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