diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt index f2d5d82de9..8bc5fe4699 100644 --- a/docs/reference/gtk/gtk3-sections.txt +++ b/docs/reference/gtk/gtk3-sections.txt @@ -5086,6 +5086,7 @@ gtk_window_group_new gtk_window_group_add_window gtk_window_group_remove_window gtk_window_group_list_windows +gtk_window_group_get_current_grab gtk_window_group_get_current_device_grab GTK_IS_WINDOW_GROUP diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols index becdd71b6e..84c10a14fd 100644 --- a/gtk/gtk.symbols +++ b/gtk/gtk.symbols @@ -4545,6 +4545,7 @@ gtk_window_group_get_type G_GNUC_CONST gtk_window_group_new gtk_window_group_remove_window gtk_window_group_list_windows +gtk_window_group_get_current_grab gtk_window_group_get_current_device_grab gtk_window_has_group gtk_window_has_toplevel_focus diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 37e1bed48f..874f08b038 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -7904,10 +7904,19 @@ gtk_window_has_group (GtkWindow *window) return window->group != NULL; } -/* Return the current grab widget of the given group +/** + * gtk_window_group_get_current_current_grab: + * @window_group: a #GtkWindowGroup + * + * Gets the current grab widget of the given group, + * see gtk_grab_add(). + * + * Returns: the current grab widget of the group + * + * Since: 2.22 */ GtkWidget * -_gtk_window_group_get_current_grab (GtkWindowGroup *window_group) +gtk_window_group_get_current_grab (GtkWindowGroup *window_group) { if (window_group->grabs) return GTK_WIDGET (window_group->grabs->data); diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h index 1a36d67051..3b4543b168 100644 --- a/gtk/gtkwindow.h +++ b/gtk/gtkwindow.h @@ -415,7 +415,7 @@ void _gtk_window_constrain_size (GtkWindow *window, gint height, gint *new_width, gint *new_height); -GtkWidget *_gtk_window_group_get_current_grab (GtkWindowGroup *window_group); +GtkWidget *gtk_window_group_get_current_grab (GtkWindowGroup *window_group); void _gtk_window_group_add_device_grab (GtkWindowGroup *window_group, GtkWidget *widget, GdkDevice *device,