Re: Setting focus to newly shown window
- From: Johannes Bauer <dfnsonfsduifb gmx de>
- To: gtk-app-devel-list gnome org
- Subject: Re: Setting focus to newly shown window
- Date: Sun, 31 Jan 2016 01:01:29 +0100
On 20.01.2016 08:55, Marius Gedminas wrote:
On Tue, Jan 19, 2016 at 10:10:09PM +0100, Johannes Bauer wrote:
I've done some GTK programming in the ancient past and am just now
starting again with GTK3, Glade and pygtk. Wow, the project has come a
long way. It's absolutely amazing and so much simpler than in the past.
I love it.
(I think you mean PyGObject, since PyGTK doesn't support GTK+ 3.x.)
True!
Isn't info_window.show() doing what you want? Newly-opened windows
appear on top and get keyboard focus.
Hm, they didn't in my example, even though I had newer shown it before.
If the window was already visible, and you just want to bring it to
front, try info_window.present(). The window manager (i.e. gnome-shell)
may feel free to ignore your request, on the grounds of focus stealing
prevention -- in that case you'll get a notification about the window
wanting attention.
Works perfectly, thanks to you (and Phil and John) for the clarification.
Best regards,
Johannes
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]