Simulate mouse movement on unmap of popups and subsurfaces
This commit is contained in:
parent
f90ff8303b
commit
11234529db
4 changed files with 18 additions and 2 deletions
|
|
@ -35,6 +35,15 @@ void CInputManager::onMouseWarp(wlr_pointer_motion_absolute_event* e) {
|
|||
m_bLastInputTouch = false;
|
||||
}
|
||||
|
||||
void CInputManager::simulateMouseMovement() {
|
||||
timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
m_vLastCursorPosFloored = m_vLastCursorPosFloored - Vector2D(1, 1); // hack: force the mouseMoveUnified to report without making this a refocus.
|
||||
mouseMoveUnified(now.tv_sec * 1000 + now.tv_nsec / 10000000);
|
||||
|
||||
m_tmrLastCursorMovement.reset();
|
||||
}
|
||||
|
||||
void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
||||
static auto* const PFOLLOWMOUSE = &g_pConfigManager->getConfigValuePtr("input:follow_mouse")->intValue;
|
||||
static auto* const PMOUSEDPMS = &g_pConfigManager->getConfigValuePtr("misc:mouse_move_enables_dpms")->intValue;
|
||||
|
|
|
|||
|
|
@ -7,12 +7,14 @@
|
|||
#include "../../helpers/Timer.hpp"
|
||||
#include "InputMethodRelay.hpp"
|
||||
|
||||
enum eClickBehaviorMode {
|
||||
enum eClickBehaviorMode
|
||||
{
|
||||
CLICKMODE_DEFAULT = 0,
|
||||
CLICKMODE_KILL
|
||||
};
|
||||
|
||||
enum eMouseBindMode {
|
||||
enum eMouseBindMode
|
||||
{
|
||||
MBIND_INVALID = -1,
|
||||
MBIND_MOVE = 0,
|
||||
MBIND_RESIZE
|
||||
|
|
@ -72,6 +74,7 @@ class CInputManager {
|
|||
|
||||
Vector2D getMouseCoordsInternal();
|
||||
void refocus();
|
||||
void simulateMouseMovement();
|
||||
|
||||
void setKeyboardLayout();
|
||||
void setPointerConfigs();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue