compositor: Add an API to query if the stage is focused

gnome-shell needs to know whether the stage window is focused so
it can synchronize between stage window focus and Clutter key actor
focus. Track all X windows, even those without MetaWindows, when
tracking the focus window, and add a compositor-level API to determine
when the stage is focused.

https://bugzilla.gnome.org/show_bug.cgi?id=700735
This commit is contained in:
Jasper St. Pierre
2013-05-24 17:58:55 -04:00
parent 7fdfbad6d4
commit 96221e6c04
4 changed files with 34 additions and 5 deletions

View File

@@ -113,6 +113,9 @@ struct _MetaDisplay
* or event that caused this.
*/
MetaWindow *focus_window;
/* For windows we've focused that don't necessarily have an X window,
* like the no_focus_window or the stage X window. */
Window focus_xwindow;
gulong focus_serial;
/* last timestamp passed to XSetInputFocus */