+/**
+ * hildon_program_common_toolbar_topmost_window:
+ * @window: A @HildonWindow to be informed about its new common toolbar
+ * @data: Not used, it is here just to respect the API
+ *
+ * Checks if the window is the topmost window of the program and in
+ * that case forces the window to take the common toolbar.
+ **/
+static void
+hildon_program_common_toolbar_topmost_window (gpointer window, gpointer data)
+{
+ if (HILDON_IS_WINDOW (window) &&
+ hildon_window_get_is_topmost (HILDON_WINDOW (window)))
+ {
+ hildon_window_take_common_toolbar (HILDON_WINDOW (window));
+ }
+}
+