Reputation: 178
window = self.builder.get_object("main-window")
print window.get_focus()
print window.has_focus()
print window.is_active()
print window.has_toplevel_focus()
Terminal output:
<MainWindow object at 0x28c26e0 (Mainwindow at 0x26a1210)>
False
False
False
So I got the right answer on get_focus(), but when I ask, MainWindows has the focus it is return with False. Why?
Upvotes: 0
Views: 164
Reputation: 49019
get_focus()
returns the widget that would have focus if your top level window got focus.
Upvotes: 1