Repository: gtk-rs/gtk3-rs (language: rust)

Issue:
Window::focus should be renamed focused_widget



Discussion / hints:

Fix patch:
diff --git a/gtk/Gir.toml b/gtk/Gir.toml
index 72ef550a39e6..c9bdbb71f89e 100644
--- a/gtk/Gir.toml
+++ b/gtk/Gir.toml
@@ -2925,6 +2925,9 @@ manual_traits = ["GtkWindowExtManual"]
         [[object.function.parameter]]
         name = "geometry"
         const = true
+    [[object.function]]
+    name = "get_focus"
+    rename = "focused_widget"
     [[object.signal]] # workaround for https://github.com/gtk-rs/gtk/issues/985
     name = "set-focus"
         [[object.signal.parameter]]
diff --git a/gtk/src/auto/window.rs b/gtk/src/auto/window.rs
index d23d0789b864..049589f0d808 100644
--- a/gtk/src/auto/window.rs
+++ b/gtk/src/auto/window.rs
@@ -812,7 +812,7 @@ pub trait GtkWindowExt: 'static {
 
     #[doc(alias = "gtk_window_get_focus")]
     #[doc(alias = "get_focus")]
-    fn focus(&self) -> Option<Widget>;
+    fn focused_widget(&self) -> Option<Widget>;
 
     #[doc(alias = "gtk_window_get_focus_on_map")]
     #[doc(alias = "get_focus_on_map")]
@@ -1405,7 +1405,7 @@ impl<O: IsA<Window>> GtkWindowExt for O {
         }
     }
 
-    fn focus(&self) -> Option<Widget> {
+    fn focused_widget(&self) -> Option<Widget> {
         unsafe { from_glib_none(ffi::gtk_window_get_focus(self.as_ref().to_glib_none().0)) }
     }
 


Test patch: