input: inhibit mouse events to client when a binding has consumed it

This introduces a new state to a seat's mouse struct, 'consumed'. It
is set on a mouse *press* event that is claimed by a mouse binding.

It is cleared after a mouse *release* event.

While set, *no* mouse motion or button events are sent to the client
application.
This commit is contained in:
Daniel Eklöf 2020-08-22 13:35:36 +02:00
parent 11cb08f1b5
commit 3ddc17937f
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 62 additions and 36 deletions

View file

@ -178,6 +178,7 @@ struct seat {
int col;
int row;
int button;
bool consumed; /* True if a button press was consumed - i.e. if a binding claimed it */
int count;
int last_button;