it doesn't receive the focus when unhide

Bug #805870 reported by Juan Simón on 2011-07-05
This bug affects 15 people
Affects Status Importance Assigned to Milestone

Bug Description

Ubuntu Lucid 64 bits
Terminator bzr version rev. 1210
Compiz enabled

I have defined F12 key to hide/unhide window. If I have the focus in any application and I press F12, Terminator is showed but it hasn't the focus.

Related branches

Chris Jones (cmsj) wrote :

Could you attach the output of terminator -d please?

Changed in terminator:
status: New → Incomplete
Alin Andrei (nilarimogard) wrote :

Same happens here on Ubuntu 11.04 (I'm also using Terminator with with a keyboard shortcut for hiding/unhiding it). I see the initial reported didn't reply so here's the output for "terminator -d" on my computer:

noclass::parse_options: OptionParse::parse_options: command line options: {'profile': None, 'nodbus': None, 'execute': None, 'layout': 'default', 'dummy': None, 'geometry': None, 'fullscreen': None, 'debug_methods': None, 'maximise': None, 'debug': 1, 'debug_classes': None, 'version': None, 'working_directory': None, 'borderless': None, 'forcedtitle': None, 'command': None, 'hidden': None, 'role': None}
ConfigBase::load: ConfigBase::load: config already loaded
Config::set_profile: Config::set_profile: Changing profile to default
ConfigBase::get_item: ConfigBase::get_item: dbus found in globals: True
function::with_proxy: dbus client call: new_window
function::with_proxy: dbus client call: terminal_hsplit
function::with_proxy: dbus client call: terminal_vsplit
function::with_proxy: dbus client call: get_terminals
DBusService::__init__: Borg::__init__: Preparing borg state for DBusService
DBusService::prepare_attributes: Checking for bus name availability: net.tenshu.Terminator0x154d881c
DBusService::prepare_attributes: bus name unavailable: net.tenshu.Terminator0x154d881c
noclass::<module>: Unable to become master process, requesting a new window

Alin Andrei (nilarimogard) wrote :

By the way, maybe this helps: besides a key to hide/unhide Terminator, I also use "hide on lose focus". I think that has something to do with this...

Davim (davim) wrote :

I do not use "hide on lose focus" and I have the same problem...

klonuo (klonuo) wrote :

It seems is Compiz related:

Run Compiz Settings Manager -> General Options -> Focus & Raise Behaviour and set Focus Prevention Level to Off.

Alin Andrei (nilarimogard) wrote :

But this also occurs in GNOME Shell which doesn't use Compiz

klonuo (klonuo) wrote :

Andrei, I'm running almost 2 days without issue. It even remembers which terminal split window had last focus

[Ubuntu 11.04]

Michael Flanagan (micflan) wrote :

Running Linux Mint 12 here and I also have this problem.

Setting the Focus Prevention to OFF, as klomnuo suggested, does not seem to have solved anything for me.

I've also experienced the problem in Ubuntu 11.04 and 11.10. It's enough to make the "Quake mode" browser unusable, unfortunately.

Ben ( wrote :

same problem here on Ubuntu 11.10 32bit with gnome-shell.

This is how I can reproduce it:
- First I don't have any applications/windows opened.
- I have terminator hidden opened
- Then I start an application (gedit)
- Then I start a different application (banshee)
- Then I switch back to the first application (gedit)
- Then I press the toggle hide key (F12) to bring terminator back (unhide)
-> terminator shows up, but doesn't grab focus, so when I type the text appears in the first application (gedit).
(to make terminator grab focus I have to hide it and unhide it again (toggle twice))

It's a real killer of this beautiful feature :S

Pavel Khlebovich (pas-anddev) wrote :

This affects me as well on Ubuntu 12.04 Alpha with Compiz/Unity as WM.

This is how to reproduce it:
- Open any window (I reproduced it with gedit, Chrome and Nautilus)
- Open terminator window and hide it with hotkey
- Press any key (i.e. down arrow) in application opened in step one, or hold it down
- Immediately press hotkey to unhide window
-> terminator appears unfocused

Like for Ben, toggle twice fixes the issue.

The attached patch fixes the issue for me. Immediately after show() focus() with timestamp is invoked, the same way it's done in Guake.

Tom Smith (takeontom) wrote :

Tried to recreate on Quantel using pas-anddev's steps and could not replicate.

Using Unity on a pretty much virgin machine.

$ lsb_release -rd; apt-cache policy terminator
Description: Ubuntu quantal (development branch)
Release: 12.10
  Installed: 0.96-0ubuntu1
  Candidate: 0.96-0ubuntu1
  Version table:
 *** 0.96-0ubuntu1 0
        500 quantal/universe amd64 Packages
        100 /var/lib/dpkg/status

Rubén Rodríguez (ruben-gnu) wrote :


Extra tip: to get the terminal to focus when pressing the hotkey:
- for Compiz: open Compiz Settings Manager -> General Options -> Focus & Raise Behaviour and set "Focus Prevention Level" to Off.
- GNOME Shell: in GNOME Tweak Tool -> Windows and set "Window focus mode" to "Sloppy".

Worked for me, not sure if doing that will bring regressions in other places, though.

KARTHIK (kannankarthik1992) wrote :

I too can confirm the same problem in Unity 12.04. Following Ruben's suggestion seems to solve the problem for now. But a fix needs to done immediately.

Zach (zthornbury) wrote :

I'm using Openbox as my window manager and having this problem too. Is there a way to implement Ruben's fix in it? There's a way to focus a NEW window when it appears, but unhiding Terminator doesn't count as a new window.

Changed in terminator:
importance: Undecided → Medium
milestone: none → 1.0
Changed in terminator:
status: Incomplete → Fix Committed
3DRaven (3draven) wrote :

In terminator 0.97~ppa2 same problem. In alternate terminal "tilda" all Ok.
But, Compiz Settings Manager -> General Options -> Focus & Raise Behaviour and set "Focus Prevention Level" to Off - solved the problem.

We need to do so that would not be a problem at all!

Sparhawk (sparhawkthesecond) wrote :

Not sure if this is fixed upstream, but in 0.97-1ubuntu1 I get this problem in KDE 4.11.2 (Kubuntu 13.10). I have a bit more info to add. If I alt+tab to another window, then attempt to show terminator, then I hit this bug. However, if I immediately hide then show terminator, I regain focus as expected.

Workaround in KDE: navigate to System Settings > Workspace Appearance and Behaviour > Window Behaviour > Focus > Focus stealing prevention.

Change setting from Low to None.

FWIW tilda, guake and yakuake were all fine without this setting change.

wangzhiming (forwzm) wrote :

This problem persists for Ubuntu14.04 .
It's really frastructing if not solution is provided.
Life saving solution:

Extra tip: to get the terminal to focus when pressing the hotkey:
- for Compiz: open Compiz Settings Manager -> General Options -> Focus & Raise Behaviour and set "Focus Prevention Level" to Off.
- GNOME Shell: in GNOME Tweak Tool -> Windows and set "Window focus mode" to "Sloppy".


Changed in terminator:
status: Fix Committed → Fix Released

This patch doesn't work for me (terminatorlib/ I've changed lines 307-311 to:
                from gi.repository import GdkX11
                t = GdkX11.x11_get_server_time(self.get_window())
            except AttributeError:
                t = 0

Now it works like a charm!
Terminator 1.90-1 on Debian

@Saber Rastikerdar: Don't know if you will see this comment, but just in case. Thanks for the fix, but I just stumbled over it because of working on and this ticket is long closed I didn't see it.

Ideally you should have opened a new ticket, so I didn't miss/lose track of it.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers