diff options
author | Ken Moore <moorekou@gmail.com> | 2020-05-06 16:03:47 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2020-05-06 16:03:47 -0400 |
commit | 82901d366a7c6bfa4d4b7510f292abccc58b33d6 (patch) | |
tree | a5b53da08e19e4225f60dc7627471730e3e86bfd /src-qt5/core/libLumina/LuminaX11.cpp | |
parent | Convert to QElapsedTimer for a debugging timer. (diff) | |
download | lumina-82901d366a7c6bfa4d4b7510f292abccc58b33d6.tar.gz lumina-82901d366a7c6bfa4d4b7510f292abccc58b33d6.tar.bz2 lumina-82901d366a7c6bfa4d4b7510f292abccc58b33d6.zip |
Ensure that the xorg DPMS system is only enabled when the screensaver comes on.
It does not seem to have the same input/activity checks that the screensaver uses
Diffstat (limited to 'src-qt5/core/libLumina/LuminaX11.cpp')
-rw-r--r-- | src-qt5/core/libLumina/LuminaX11.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src-qt5/core/libLumina/LuminaX11.cpp b/src-qt5/core/libLumina/LuminaX11.cpp index 3262e16d..6a71f629 100644 --- a/src-qt5/core/libLumina/LuminaX11.cpp +++ b/src-qt5/core/libLumina/LuminaX11.cpp @@ -27,6 +27,7 @@ #include <xcb/xcb_aux.h> #include <xcb/composite.h> #include <xcb/damage.h> +#include <xcb/dpms.h> //XLib includes #include <X11/extensions/Xdamage.h> @@ -184,6 +185,17 @@ void LXCB::SetCurrentWorkspace(int number){ xcb_ewmh_request_change_showing_desktop(&EWMH, QX11Info::appScreen(), number); } +//Display Power Management System (DPMS) +// ===== enableDPMS() ===== +void LXCB::enableDPMS(){ + xcb_dpms_enable(QX11Info::connection()); +} + +// ===== disableDPMS() ===== +void LXCB::disableDPMS(){ + xcb_dpms_disable(QX11Info::connection()); +} + // === WindowClass() === QString LXCB::WindowClass(WId win){ if(DEBUG){ qDebug() << "XCB: WindowClass()" << win; } |