xwm: Don't clear the selection if it has no text type available
authorDerek Foreman <derekf@osg.samsung.com>
Mon, 1 Feb 2016 20:36:57 +0000 (14:36 -0600)
committerBryce Harrington <bryce@bryceharrington.org>
Fri, 5 Feb 2016 00:10:36 +0000 (16:10 -0800)
commit4e18448286ff27942ed3ad8fda568008c14eeff7
tree368a36bf1dd68e06adede9420024d3fae79693ef
parent22b1f93432c775b6ed077c15a19e9e734a2806a5
xwm: Don't clear the selection if it has no text type available

weston maintains a copy of the most recently selected "thing" - it picks
the first available type when it copies, and saves that one only.

When an application quits weston will make the saved selection active.

When xwm sees the selection set it will check if any of the offered types
are text.  If no text type is offered it will clear the selection.

weston then interprets this in the same way as an application exiting and
causing the selection to be unset, and we get caught in a live lock with
both weston and xwayland consuming as much cpu as they can.

The simple fix is to just remove the test for text presence.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
xwayland/selection.c