aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop/src-screensaver
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core/lumina-desktop/src-screensaver')
-rw-r--r--src-qt5/core/lumina-desktop/src-screensaver/LScreenSaver.cpp13
-rw-r--r--src-qt5/core/lumina-desktop/src-screensaver/LScreenSaver.h1
2 files changed, 10 insertions, 4 deletions
diff --git a/src-qt5/core/lumina-desktop/src-screensaver/LScreenSaver.cpp b/src-qt5/core/lumina-desktop/src-screensaver/LScreenSaver.cpp
index 9b8aa649..8cf78fdf 100644
--- a/src-qt5/core/lumina-desktop/src-screensaver/LScreenSaver.cpp
+++ b/src-qt5/core/lumina-desktop/src-screensaver/LScreenSaver.cpp
@@ -8,6 +8,7 @@
#include <QScreen>
#include <QApplication>
+#include <LSession.h>
#define DEBUG 0
LScreenSaver::LScreenSaver() : QWidget(0,Qt::BypassWindowManagerHint | Qt::WindowStaysOnTopHint){
@@ -102,14 +103,18 @@ void LScreenSaver::checkInputEvents(){
change = true;
}
//Check the last keyboard input timestamp
- //unsigned int timecode = WM_Get_User_Time( WM_Get_Active_Window() );
- unsigned int timecode = 0; //Not done yet - read the _NET_WM_USER_TIME number on the active window
+ WId active = LSession::handle()->XCB->WM_Get_Active_Window();
+ if(active != lastActiveWindow){
+ lastActiveWindow = active;
+ change = true;
+ }
+ unsigned int timecode = LSession::handle()->XCB->WM_Get_User_Time(active);
if(timecode > lastTimeCode){
lastTimeCode = timecode;
change = true;
}
- //If there was an input event detected, update timers and such
- if(change){ newInputEvent(); }
+ //If there was an input event detected (or a window is currently full-screen), update timers and such
+ if(change || LSession::handle()->XCB->WindowIsFullscreen(active) ){ newInputEvent(); }
}
void LScreenSaver::ShowScreenSaver(){
diff --git a/src-qt5/core/lumina-desktop/src-screensaver/LScreenSaver.h b/src-qt5/core/lumina-desktop/src-screensaver/LScreenSaver.h
index 571eea18..5d154e64 100644
--- a/src-qt5/core/lumina-desktop/src-screensaver/LScreenSaver.h
+++ b/src-qt5/core/lumina-desktop/src-screensaver/LScreenSaver.h
@@ -26,6 +26,7 @@ private:
LLockScreen *LOCKER;
QPoint lastMousePos;
unsigned int lastTimeCode;
+ WId lastActiveWindow;
int cBright;
bool SSRunning, SSLocked, updating;
bgstack15