Commit 3b0afdbf authored by David Jarvie's avatar David Jarvie

Cancel any screen saver when an alarm is displayed

parent 6533a3a1
Pipeline #38681 passed with stage
in 16 minutes and 26 seconds
......@@ -76,6 +76,7 @@ find_package(KF5GlobalAccel ${KF5_MIN_VERSION} REQUIRED)
find_package(KF5GuiAddons ${KF5_MIN_VERSION} REQUIRED)
find_package(KF5Holidays ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5I18n ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5IdleTime ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5JobWidgets ${KF5_MIN_VERSION} REQUIRED)
find_package(KF5KCMUtils ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5KIO ${KF5_MIN_VERSION} CONFIG REQUIRED)
......
......@@ -3,6 +3,7 @@ KAlarm Change Log
=== Version 3.1.0 (KDE Applications 20.12) --- 25 October 2020 ===
+ Add option to show alarm message as a notification instead of in a window [KDE Bug 345922]
+ Don't execute display alarms while desktop notifications are inhibited.
+ Cancel any screen saver when an alarm is displayed.
=== Version 3.0.3 (KDE Applications 20.08.3) --- 25 October 2020 ===
+ Prevent resources being disabled at logout [KDE Bug 427722]
......
......@@ -173,6 +173,7 @@ target_link_libraries(kalarm_bin
KF5::GlobalAccel
KF5::GuiAddons
KF5::Holidays
KF5::IdleTime
KF5::KIOWidgets
KF5::Notifications
KF5::NotifyConfig
......
......@@ -18,6 +18,7 @@
#include <KAboutData>
#include <KLocalizedString>
#include <KIdleTime>
#ifdef RESTORE_NOTIFICATIONS
#include <KConfigGroup>
#include <KConfigGui>
......@@ -360,6 +361,9 @@ void MessageNotification::showDisplay()
qCDebug(KALARM_LOG) << "MessageNotification::showDisplay: sendEvent";
sendEvent();
mShown = true;
// Ensure that the screen wakes from sleep, in case the window manager
// doesn't do this when the notification is displayed.
KIdleTime::instance()->simulateUserActivity();
}
if (!mDisplayComplete && !mErrorWindow() && mAlarmType() != KAAlarm::INVALID_ALARM)
mHelper->displayComplete(false); // reschedule
......
......@@ -34,6 +34,7 @@
#include <KTextEdit>
#include <KWindowSystem>
#include <KSqueezedTextLabel>
#include <KIdleTime>
#if KDEPIM_HAVE_X11
#include <KWindowInfo>
#include <netwm.h>
......@@ -827,6 +828,9 @@ void MessageWindow::display()
if (Preferences::messageButtonDelay() == 0)
move(0, 0);
MainWindowBase::show();
// Ensure that the screen wakes from sleep, in case the window manager
// doesn't do this when the window is displayed.
KIdleTime::instance()->simulateUserActivity();
}
}
......
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