mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-27 18:03:48 -07:00
added general:cursor_inactive_timeout
This commit is contained in:
@@ -14,12 +14,16 @@ void CInputManager::onMouseMoved(wlr_pointer_motion_event* e) {
|
||||
wlr_cursor_move(g_pCompositor->m_sWLRCursor, &e->pointer->base, DELTA.x * sensitivity, DELTA.y * sensitivity);
|
||||
|
||||
mouseMoveUnified(e->time_msec);
|
||||
|
||||
m_tmrLastCursorMovement.reset();
|
||||
}
|
||||
|
||||
void CInputManager::onMouseWarp(wlr_pointer_motion_absolute_event* e) {
|
||||
wlr_cursor_warp_absolute(g_pCompositor->m_sWLRCursor, &e->pointer->base, e->x, e->y);
|
||||
|
||||
mouseMoveUnified(e->time_msec);
|
||||
|
||||
m_tmrLastCursorMovement.reset();
|
||||
}
|
||||
|
||||
void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
||||
@@ -205,6 +209,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
||||
void CInputManager::onMouseButton(wlr_pointer_button_event* e) {
|
||||
wlr_idle_notify_activity(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sSeat.seat);
|
||||
|
||||
m_tmrLastCursorMovement.reset();
|
||||
|
||||
const auto PKEYBOARD = wlr_seat_get_keyboard(g_pCompositor->m_sSeat.seat);
|
||||
|
||||
if (!PKEYBOARD) { // ???
|
||||
@@ -383,6 +389,8 @@ void CInputManager::newMouse(wlr_input_device* mouse) {
|
||||
|
||||
g_pCompositor->m_sSeat.mouse = PMOUSE;
|
||||
|
||||
m_tmrLastCursorMovement.reset();
|
||||
|
||||
Debug::log(LOG, "New mouse created, pointer WLR: %x", mouse);
|
||||
}
|
||||
|
||||
|
@@ -4,6 +4,7 @@
|
||||
#include <list>
|
||||
#include "../../helpers/WLClasses.hpp"
|
||||
#include "../../Window.hpp"
|
||||
#include "../../helpers/Timer.hpp"
|
||||
|
||||
class CInputManager {
|
||||
public:
|
||||
@@ -52,6 +53,8 @@ public:
|
||||
|
||||
SKeyboard* m_pActiveKeyboard = nullptr;
|
||||
|
||||
CTimer m_tmrLastCursorMovement;
|
||||
|
||||
private:
|
||||
|
||||
uint32_t m_uiCapabilities = 0;
|
||||
|
Reference in New Issue
Block a user