input: Don't send modifiers if client doesn't have a pointer resource
authorKristian Høgsberg <krh@bitplanet.net>
Wed, 9 Oct 2013 17:54:03 +0000 (10:54 -0700)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 9 Oct 2013 22:01:18 +0000 (15:01 -0700)
commitcb406f1afd560762f60c27f7a88fd9f65c15041f
tree9fee0e791945a3b0bc1b38542b4ffb8050223015
parentb4659eb15959091ab8bab8e20ed66233d39922fa
input: Don't send modifiers if client doesn't have a pointer resource

This fixes an uninitialized serial error, were we could send out the
modifier event even if the client didn't have a pointer resource.  We
send out the modifier event to let clients know the modifer mask when
they receive a pointer button event.  Thus, if the client doesn't have
a pointer we don't need to send the modifier event.

Additionally we would send out the modifier event with an
uninitialized serial number.

Finally, this commit restores the order of sending the modifier event
before the enter, like it used to be.  Not likely to be an issue,
since the client will always receive the modifier event before any
button event, but it's a little nicer to give the client the modifier
events before it receives any pointer events.
src/input.c