diff options
author | Ilya Fedin <fedin-ilja2010@ya.ru> | 2022-10-23 00:01:33 +0400 |
---|---|---|
committer | Ilya Fedin <fedin-ilja2010@ya.ru> | 2022-10-23 17:19:05 +0400 |
commit | f3a6f3c502536c0bac7f845d8f1e3179aa1a0365 (patch) | |
tree | aecacfce845c0a646aa5e3cc91d228483a7ba1e4 /src/client | |
parent | 47ebd2ae5e40f5d1228edd3a35d0272dcf545585 (diff) |
Implement window alert with xdg-activation
This is implemented by not specifying serial, as mentioned in
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/9#note_854977
Tested on KDE Plasma
Change-Id: I4ef0975040bbce581b615b0318f90601e080235c
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/qwaylandshellsurface_p.h | 3 | ||||
-rw-r--r-- | src/client/qwaylandwindow.cpp | 14 | ||||
-rw-r--r-- | src/client/qwaylandwindow_p.h | 3 |
3 files changed, 20 insertions, 0 deletions
diff --git a/src/client/qwaylandshellsurface_p.h b/src/client/qwaylandshellsurface_p.h index 5e2695109..8f176e281 100644 --- a/src/client/qwaylandshellsurface_p.h +++ b/src/client/qwaylandshellsurface_p.h @@ -71,6 +71,9 @@ public: virtual void setXdgActivationToken(const QString &token); virtual void requestXdgActivationToken(quint32 serial); + virtual void setAlertState(bool enabled) { Q_UNUSED(enabled); } + virtual bool isAlertState() const { return false; } + virtual QString externWindowHandle() { return QString(); } inline QWaylandWindow *window() { return m_window; } diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 4fd012de2..c8d5121f6 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -502,6 +502,20 @@ void QWaylandWindow::setMask(const QRegion &mask) mSurface->commit(); } +void QWaylandWindow::setAlertState(bool enabled) +{ + if (mShellSurface) + mShellSurface->setAlertState(enabled); +} + +bool QWaylandWindow::isAlertState() const +{ + if (mShellSurface) + return mShellSurface->isAlertState(); + + return false; +} + void QWaylandWindow::applyConfigureWhenPossible() { QMutexLocker resizeLocker(&mResizeLock); diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h index 298f3f2df..2e68cc2e4 100644 --- a/src/client/qwaylandwindow_p.h +++ b/src/client/qwaylandwindow_p.h @@ -143,6 +143,9 @@ public: void setMask(const QRegion ®ion) override; + void setAlertState(bool enabled) override; + bool isAlertState() const override; + qreal scale() const; qreal devicePixelRatio() const override; |