openbox new window doesn't receive focus

Bug #957808 reported by Iakov Davydov on 2012-03-17
42
This bug affects 9 people
Affects Status Importance Assigned to Milestone
openbox (Ubuntu)
Medium
Unassigned

Bug Description

In my rc.xml I have the following lines:
    <keybind key="W-Return">
      <action name="execute">
        <execute>gnome-terminal</execute>
      </action>
    </keybind>
If there is no gnome-terminal windows yet then pressing W-Return opens new
gnome-terminal and focuses it.
But if there is already one window exist and it is not
focused than focus stays within the other window.
This happens not only with gnome-terminal but also with other software like chromium.
This happend after update to version 3.5.0.
Also the focus settings:
  <focus> <focusNew>yes</focusNew> <followMouse>no</followMouse>
   <focusLast>yes</focusLast>
    <underMouse>no</underMouse>
    <focusDelay>200</focusDelay>
    <raiseOnFocus>no</raiseOnFocus>
  </focus>

Steps to reproduce:
1. open gnome-terminal
2. open other window (and focus it)
3. press W-Return

What should happen:
new gnome-terminal should start and receive focus

What happens:
new gnome-terminal starts but doesn't receives focus

This issue was already fixed in git: http://git.openbox.org/?p=dana/openbox.git;a=commitdiff;h=3b9fce92e0afab89a46080f525e4392bc4c01aa5
but I couldn't create a patch since git sources are different from 3.5.0 version.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: openbox 3.5.0-2ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-18.29-generic 3.2.9
Uname: Linux 3.2.0-18-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 1.94.1-0ubuntu2
Architecture: amd64
Date: Sat Mar 17 13:44:21 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120316)
ProcEnviron:
 TERM=xterm
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: openbox
UpgradeStatus: No upgrade log present (probably fresh install)

Iakov Davydov (iakov-davydov) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openbox (Ubuntu):
status: New → Confirmed
Zoffix Znet (zoffix) wrote :

I have the same problem. The focus seems to work fine until you click on the desktop. Then it breaks, and somehow gets restored eventually if you click a few windows.

Then if you click on the desktop again, new windows don't get focused again.

Lukasz (thelvyn-32) wrote :

Adding <startupnotify><enabled>true</enabled></startupnotify> solved this problem for me.

if you use lxterminal this works, it fails with gnome-terminal

On Sun, Jun 17, 2012 at 1:44 PM, Lukasz <email address hidden> wrote:
> Adding  <startupnotify><enabled>true</enabled></startupnotify> solved
> this problem for me.
>
> --
> You received this bug notification because you are a member of Lubuntu
> Packages Team, which is subscribed to openbox in Ubuntu.
> https://bugs.launchpad.net/bugs/957808
>
> Title:
>  openbox new window doesn't receive focus
>
> Status in “openbox” package in Ubuntu:
>  Confirmed
>
> Bug description:
>  In my rc.xml I have the following lines:
>      <keybind key="W-Return">
>        <action name="execute">
>          <execute>gnome-terminal</execute>
>        </action>
>      </keybind>
>  If there is no gnome-terminal windows yet then pressing W-Return opens new
>  gnome-terminal and focuses it.
>  But if there is already one window exist and it is not
>  focused than focus stays within the other window.
>  This happens not only with gnome-terminal but also with other software like chromium.
>  This happend after update to version 3.5.0.
>  Also the focus settings:
>    <focus>    <focusNew>yes</focusNew>    <followMouse>no</followMouse>
>     <focusLast>yes</focusLast>
>      <underMouse>no</underMouse>
>      <focusDelay>200</focusDelay>
>      <raiseOnFocus>no</raiseOnFocus>
>    </focus>
>
>
>  Steps to reproduce:
>  1. open gnome-terminal
>  2. open other window (and focus it)
>  3. press W-Return
>
>  What should happen:
>  new gnome-terminal should start and receive focus
>
>  What happens:
>  new gnome-terminal starts but doesn't receives focus
>
>  This issue was already fixed in git:  http://git.openbox.org/?p=dana/openbox.git;a=commitdiff;h=3b9fce92e0afab89a46080f525e4392bc4c01aa5
>  but I couldn't create a patch since git sources are different from 3.5.0 version.
>
>  ProblemType: Bug
>  DistroRelease: Ubuntu 12.04
>  Package: openbox 3.5.0-2ubuntu2
>  ProcVersionSignature: Ubuntu 3.2.0-18.29-generic 3.2.9
>  Uname: Linux 3.2.0-18-generic x86_64
>  NonfreeKernelModules: nvidia
>  ApportVersion: 1.94.1-0ubuntu2
>  Architecture: amd64
>  Date: Sat Mar 17 13:44:21 2012
>  InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120316)
>  ProcEnviron:
>   TERM=xterm
>   PATH=(custom, user)
>   LANG=en_US.UTF-8
>   SHELL=/bin/bash
>  SourcePackage: openbox
>  UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/openbox/+bug/957808/+subscriptions

Bernhard (b.a.koenig) wrote :

Other applications which have this bug are a new instance of Thunar (when one is already open) and GPicView.

Julien Lavergne (gilir) on 2013-06-30
Changed in openbox (Ubuntu):
status: Confirmed → In Progress
importance: Undecided → Medium
assignee: nobody → Julien Lavergne (gilir)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openbox - 3.5.0-7ubuntu1

---------------
openbox (3.5.0-7ubuntu1) saucy; urgency=low

  * debian/patches
   - 91_fix_loose_focus.patch: From upstream, focus the windows when the
     execute action is run (LP: #957808).
 -- Julien Lavergne <email address hidden> Sun, 30 Jun 2013 20:05:36 +0200

Changed in openbox (Ubuntu):
status: In Progress → Fix Released
Sworddragon (sworddragon) wrote :

After upgrading to openbox 3.5.0-7ubuntu1 I'm still able to reproduce this problem. Can somebody confirm this?

Julien Lavergne (gilir) wrote :

Currently, the real fix seems to be here : http://git.openbox.org/?p=dana/openbox.git;a=commitdiff;h=3b9fce92e0afab89a46080f525e4392bc4c01aa5
but I can't see what branch is. I can't see it in master, I fear it's in a dead branch. If we want it in, upstream need to merge it in master branch.

Changed in openbox (Ubuntu):
status: Fix Released → New
assignee: Julien Lavergne (gilir) → nobody
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openbox (Ubuntu):
status: New → Confirmed
Changed in openbox (Ubuntu):
status: Confirmed → Fix Released
Sworddragon (sworddragon) wrote :

Sure that this problem is already fixed? Because I'm still able to reproduce this bug on openbox 3.5.2-3.

taiebot65 (dedreuil) wrote :

I am also able to reproduce this on 14.10. It is quite a problem when using a dock as the dock is disappearing when i close a window while it should stay focus.

Sworddragon (sworddragon) wrote :

Still reproducible with Ubuntu 15.10 dev with openbox 3.6.0-1 (sometimes the window gets the focus and sometimes not).

Sworddragon (sworddragon) wrote :

Edit: It seems I can't change the status back to "Confirmed".

White_Rabbit (radiocane) wrote :

Reproducible with Lubuntu 16.04 xenial. Specifically, I'm experiencing this with lxterminal and thunderbird's reminders.

White_Rabbit (radiocane) wrote :

One of openbox authors says it's not their fault https://bugzilla.icculus.org/show_bug.cgi?id=5419#c12

I've worked around this following the advice at
https://wiki.archlinux.org/index.php/openbox#Windows_load_behind_the_active_window

I added
<application class="*">
  <focus>yes</focus>
</application>

inside the already existing <applications></applications> section of ~/.config/openbox/lubuntu-rc.xml

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.