I have two overlapping Gtk-windows open. How can I change the focus via button clicking to get the hidden Gtk-window on top?
Any advice would be very welcome.
Carsten
I have two overlapping Gtk-windows open. How can I change the focus via button clicking to get the hidden Gtk-window on top?
Any advice would be very welcome.
Carsten
Focus is decided by the window manager -> Just click on the window?
Of course I can change the focus e.g. via +Tab (Windows10) or it is possible to get information from the statusbar and then select the wanted window.
However I want to change the active Gtk window via button action. Especially when the second window is hidden by a larger one.
Nevertheless thank you for your quick reply
There are some functions in Gtk to interact with the WM, but it’s tricky. I never used it, but you could look into:
https://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-present
For gtk_window_present
you have to do:
present(win::GtkWindow)
There’s also grab_focus(w::GtkWidget)
but that might be only for widgets inside windows.
Thank you for reply. This was what I am looking for.
For grab_focus(w::GtkWidget)
I did not found any information. What’s the use of it?
Hi Carsten,
Have you managed to change the code programmatically?
None of the solutions work for me.