Add option to check for mouse button press

Implemented only for Windows for now.
This commit is contained in:
WarmUpTill
2022-12-18 15:26:16 +01:00
committed by WarmUpTill
parent f7afb9c446
commit ea826f1be0
10 changed files with 238 additions and 48 deletions

View File

@@ -1,4 +1,5 @@
#include "platform-funcs.hpp"
#include "hotkey.hpp"
#include <X11/Xlib.h>
#include <X11/Xatom.h>
@@ -46,6 +47,10 @@ static XScreenSaverAllocInfoFunc allocSSFunc = nullptr;
static XScreenSaverQueryInfoFunc querySSFunc = nullptr;
bool canGetIdleTime = false;
std::chrono::high_resolution_clock::time_point lastMouseLeftClickTime{};
std::chrono::high_resolution_clock::time_point lastMouseMiddleClickTime{};
std::chrono::high_resolution_clock::time_point lastMouseRightClickTime{};
Display *disp()
{
if (!xdisplay) {