compositor: properly restore keyboard_focus in notify_keyboard_focus()
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Fri, 16 Mar 2012 15:25:11 +0000 (17:25 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 21 Mar 2012 02:43:55 +0000 (22:43 -0400)
commit71b1d0c91de5ac06c480f2695690f3ee9fd6885d
treee9d36b60d564002d917fb48a11efb35a1e80971c
parent96b0abd88a9f1d5ae9828a71cfdaad1d68afcca9
compositor: properly restore keyboard_focus in notify_keyboard_focus()

Commit f992b2fc removed the saved keyboard focus logic to fix a crash
when the saved surface is destroyed. However, setting keyboard focus to
the first surface on the list ends up trying to set the focus to the
cursor surface most of the time. The end result is a NULL keyboard
focus.

This patch restores the saved keyboard focus logic and fixes the crash
mentioned above using a destroy listener.
src/compositor.c
src/compositor.h