Allow an application to "steal" the focus
- From: rastersoft <raster rastersoft com>
- To: gnome-shell-list <gnome-shell-list gnome org>
- Subject: Allow an application to "steal" the focus
- Date: Tue, 23 Aug 2016 20:58:26 +0200
Hi all:
I'm creating a guake-like terminal using vala and Gtk3: a drop-down
terminal that is shown in all workspaces when you press an specific key.
Everything goes fine except for a little detail: I'm unable to ensure
that the terminal window gets the keyboard focus.
When I press the key for the first time the window appears and it gets
the focus; but if I hide it, change to another window, and press the key
again, the terminal window is shown, but it doesn't get the focus.
I tried everything: grab_focus() method, show-hide-show, present()
method, setting the window type hint... but none work.
Installing the "Steal my focus" extension
(https://extensions.gnome.org/extension/234/steal-my-focus/) seems to
work, but there should be a way to allow to do that without modifying
gnome shell.
Does somebody know the answer to this problem?
Thanks.
--
Nos leemos
RASTER (Linux user #228804)
raster rastersoft com http://www.rastersoft.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]