xwayland: Be smarter about picking seats for move/resize
authorKristian Høgsberg <krh@bitplanet.net>
Wed, 30 Apr 2014 23:10:14 +0000 (16:10 -0700)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 30 Apr 2014 23:10:16 +0000 (16:10 -0700)
commit052ef4e7bcd8929b5bceafa2beb76be43fc32822
treed0bfc984ecd8b7d62fb4d6340b2f24cacd6b61d4
parenta4b620e7e76f966586f4165b811a0c33de0214ac
xwayland: Be smarter about picking seats for move/resize

If we're going to move or resize an xwayland surface, we used to just
pick the first seat in the list for doing the move/resize.  Ideally we
can map from the XInput device doing the click to the corresponding
weston_seat, but that requires using xcb xinput, which isn't well supported.

Instead, lets use a simple heuristic that just picks the pointer that
most recently delivered a button event to the window in question.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73807
xwayland/window-manager.c