[mutter/meego-1.0: 18/30] meta_display_get_expected_focus_window()



commit c501125ca9e2a1c2a8119375615bafd9a2ee4c1e
Author: Tomas Frydrych <tf linux intel com>
Date:   Thu Apr 15 13:25:16 2010 +0100

    meta_display_get_expected_focus_window()
    
    Accessor for the MetaDisplay expected focus window; this is necessary if a
    plugin needs to restore focus to where the WM expected it to be.

 src/core/display.c    |   18 +++++++++++++++++-
 src/include/display.h |    1 +
 2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 66e3f7a..d308513 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -5320,7 +5320,23 @@ meta_display_get_focus_window (MetaDisplay *display)
   return display->focus_window;
 }
 
-int 
+/**
+ * meta_display_get_expected_focus_window:
+ * @display: a #MetaDisplay
+ *
+ * Get the window that we last set input focus on; this is not necessarily the
+ * same as the window which currently has focus; the latter can be obtained
+ * using meta_display_get_focus_window().
+ *
+ * Return Value: (transfer none): The expected focus window
+ */
+MetaWindow *
+meta_display_get_expected_focus_window (MetaDisplay *display)
+{
+  return display->expected_focus_window;
+}
+
+int
 meta_display_get_damage_event_base (MetaDisplay *display)
 {
   return display->damage_event_base;
diff --git a/src/include/display.h b/src/include/display.h
index b5c8e4b..5bd38a2 100644
--- a/src/include/display.h
+++ b/src/include/display.h
@@ -75,6 +75,7 @@ gboolean meta_display_has_shape (MetaDisplay *display);
 MetaScreen *meta_display_screen_for_root (MetaDisplay *display,
                                           Window       xroot);
 MetaWindow *meta_display_get_focus_window (MetaDisplay *display);
+MetaWindow *meta_display_get_expected_focus_window (MetaDisplay *display);
 
 gboolean  meta_display_xwindow_is_a_no_focus_window (MetaDisplay *display,
                                                      Window xwindow);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]