Commit 999b619b authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[Touchpad KCM] Revoke touchpad enabled/disabled notification before sending a new one

BUG: 387590
FIXED-IN: 5.16.0

Differential Revision: https://phabricator.kde.org/D21439
parent 85359e1d
......@@ -226,7 +226,11 @@ void TouchpadDisabler::mousePlugged()
void TouchpadDisabler::showNotification(const QString &name, const QString &text)
{
KNotification::event(name, text, QPixmap(), //Icon is specified in .notifyrc
if (m_notification) {
m_notification->close();
}
m_notification = KNotification::event(name, text, QPixmap(), //Icon is specified in .notifyrc
0,
KNotification::CloseOnTimeout,
"kcm_touchpad"); // this has to match the name of the .notifyrc file
......
......@@ -23,8 +23,10 @@
#include <QTimer>
#include <QDBusServiceWatcher>
#include <QDBusPendingCallWatcher>
#include <QPointer>
#include <KDEDModule>
#include <KNotification>
#include "touchpadbackend.h"
#include "kdedsettings.h"
......@@ -78,6 +80,8 @@ private:
bool m_workingTouchpadFound;
bool m_keyboardActivity, m_mouse;
QPointer<KNotification> m_notification;
bool m_preparingForSleep = false;
};
......
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