I'm trying to get the title of the active window using Rust and gdk
but I can only find gtk::set_title
without gtk::get_title
.
Asked
Active
Viewed 713 times
0

Shepmaster
- 388,571
- 95
- 1,107
- 1,366

Baron Leonardo
- 329
- 3
- 13
-
Sure it's there. https://docs.rs/gtk/0.8.1/gtk/trait.GtkWindowExt.html#tymethod.get_title – Đorđe Zeljić Apr 17 '20 at 16:01
-
That's `gtk::GtkWindow` I want `gdk::Window`, `GtKWindow.get_title()` get will get the title you set for your application, but `gdk::Window.get_title()` should get the title of whatever window is running. – Baron Leonardo Apr 17 '20 at 16:07
-
1Are you sure the functionality even exists in `gdk`? I can find [`gdk_window_set_title`](https://developer.gnome.org/gdk3/stable/gdk3-Windows.html#gdk-window-set-title), but not `gdk_window_get_title`. – mcarton Apr 17 '20 at 16:25
-
1It doesn't exist and and that has sense. Read this https://www.linuxquestions.org/questions/programming-9/gdk_window_get_title-623001/ – Đorđe Zeljić Apr 17 '20 at 16:41
-
1Also, this can be useful too https://stackoverflow.com/questions/4166169/get-active-gtk-window-in-python – Đorđe Zeljić Apr 17 '20 at 16:48
-
how can I mark this question as unsolvable ? – Baron Leonardo Apr 17 '20 at 17:05
-
1@BaronLeonardo You can reply to your own question saying the feature doesn't exist. – mcarton Apr 17 '20 at 18:23