kogmbh/WebODF — pull request #520 by peitschie (2014-04-07 05:23:23+00:00)
Title: Resynchronize the window selection on any local cursor update

The window selection should be synchronised every time the local user's cursor is moved. When the local user's selection is modified using the keyboard, the event trap never loses focus, so the focus event is not fired, meaning the window selection was not being reset.

Now, the local cursor's update event is directly subscribed to, and if the document has focus, the window selection is reset. Note, if the document does not have focus, no reset will occur to prevent focus stealing.

Fixes a regression introduced in 8de8dde.