Bug 364358 - XInput2 cursor polling only reacts on motions
Summary: XInput2 cursor polling only reacts on motions
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (other bugs)
Version First Reported In: 5.6.4
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-15 19:05 UTC by Gregor Mi
Modified: 2016-09-03 12:37 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gregor Mi 2016-06-15 19:05:41 UTC
On search how to make mouse clicks visible for screen recordings I found this video (https://www.youtube.com/watch?v=RQ5v1dyTzi8) about the KWin "Mouse Click Animation" desktop effect.

It seems to work only when the mouse is dragged. If I only click without movement, there is no visual effect.
Comment 1 Martin Flöser 2016-06-16 05:56:20 UTC
So you want it to also visualize the movement? May I ask why?
Comment 2 Thomas Lübking 2016-06-16 06:15:11 UTC
The bug reads like more as if the click is only registered when accompanied by a move event.
Could be due to XI2 only signalling the latter (where the polling code was time based)
Comment 3 Gregor Mi 2016-06-16 10:01:18 UTC
> The bug reads like more as if the click is only registered when accompanied by a move event.

Thomas' interpretation is the correct one.
Comment 4 Thomas Lübking 2016-06-16 14:49:36 UTC
Not tested, but cursor.cpp:390, X11Cursor::doStartMousePolling() lacks

XISetMask(mask1, XI_RawButtonPress);
XISetMask(mask1, XI_RawButtonRelease);
Comment 5 Martin Flöser 2016-09-03 12:37:03 UTC
This got fixed recently:

commit 71c996fe33d0b4032c0e71293a1c283d69b9c2f8
Author: Martin Gräßlin <mgraesslin@kde.org>
Date:   Thu Aug 11 12:55:25 2016 +0200

    Select also raw button press/release in XInput2 based polling
    
    Summary:
    The mouse polling is also used to detect mouse button press/release
    events. This is used e.g. by the MouseClickEffect. The XInput2 filter
    only selected for Raw Motion events which means mouse button events
    are missed in case it's not combined with a motion.
    
    This change makes the input filter also select for raw button press
    and release events. To support this the X11EventFilter needed to
    be adjusted to support multiple generic event types to filter for.