From 5655dd3fdf90f678dd26059e8cdfbfcfc8f8aa6c Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 1 Oct 2021 11:48:17 +0900 Subject: korganizer: do not show reminders on top of a locked screen. This resolves isue #60. Signed-off-by: Michele Calgaro --- korganizer/korgac/alarmdialog.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'korganizer') diff --git a/korganizer/korgac/alarmdialog.cpp b/korganizer/korgac/alarmdialog.cpp index cc0bb2838..b38e6a794 100644 --- a/korganizer/korgac/alarmdialog.cpp +++ b/korganizer/korgac/alarmdialog.cpp @@ -544,7 +544,21 @@ void AlarmDialog::wakeUp() } if ( activeReminders ) + { + DCOPRef screensaver("kdesktop", "KScreensaverIface"); + DCOPReply reply = screensaver.call("isBlanked"); + bool res = true; + if (reply.isValid()) { + reply.get(res); + } show(); + if (res) + { + // Lower the dialog if the screensaver is active or its status unknown. + // This prevents reminders to show on a locked screen. + lower(); + } + } setTimer(); showDetails(); emit reminderCount( activeCount() ); -- cgit v1.2.1