plugins/shakecursor: Ignore pointer motion events when the pointer is constrained
The main motivation is to prevent the shake cursor from triggering in video games. It's not a bullet-proof solution though.
This commit is contained in:
parent
1eb95982dc
commit
aaa35d455c
1 changed files with 5 additions and 0 deletions
|
@ -13,6 +13,7 @@
|
|||
#include "opengl/gltexture.h"
|
||||
#include "opengl/glutils.h"
|
||||
#include "plugins/shakecursor/shakecursorconfig.h"
|
||||
#include "pointer_input.h"
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -76,6 +77,10 @@ void ShakeCursorEffect::pointerEvent(MouseEvent *event)
|
|||
return;
|
||||
}
|
||||
|
||||
if (input()->pointer()->isConstrained()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (const auto shakeFactor = m_shakeDetector.update(event)) {
|
||||
update(Transaction{
|
||||
.position = m_cursor->pos(),
|
||||
|
|
Loading…
Reference in a new issue