Desktop doesn't get keyboard focus

Bug #1427636 reported by Evandro P. Alves
30
This bug affects 13 people
Affects Status Importance Assigned to Milestone
Compiz
Fix Released
Medium
Christopher Townsend
0.9.11
Confirmed
Medium
Christopher Townsend
compiz (Ubuntu)
Fix Released
Medium
Christopher Townsend

Bug Description

When a window application is open, the desktop icons can get mouse focus but the keyboard event are send to the last window. Trying renaming or deleting files on the desktop with the keyboard is impossible in this scenario.

I have the focus mode "follow the mouse", but reverting to the default setting has the same problem.

Also have a look at this question on Ask Ubuntu

http://askubuntu.com/questions/514930/unity-14-04-desktop-does-not-take-focus-for-focus-under-mouse

I'm using Ubuntu 14.10 but this problem also happened on 14.04 (and I think in older versions too)

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: unity 7.3.1+14.10.20141016-0ubuntu1
ProcVersionSignature: Ubuntu 3.16.0-31.41-generic 3.16.7-ckt5
Uname: Linux 3.16.0-31-generic x86_64
ApportVersion: 2.14.7-0ubuntu8.2
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CurrentDesktop: Unity
Date: Tue Mar 3 11:21:00 2015
InstallationDate: Installed on 2015-02-10 (20 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Release amd64 (20141022.1)
SourcePackage: unity
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Evandro P. Alves (evandro-pa) wrote :
Revision history for this message
Christopher Townsend (townsend) wrote :

I can only seem to reproduce this when I have "General Options->Focus & Raise Behavior->Click To Focus" unchecked.

I believe this is a Compiz issue and was probably introduced when I tried to handle the Gtk X input stuff introduced in 14.04, which has been a total pain.

I'll give it a look and see if I can come up with a solution for this without breaking everything else.

affects: unity (Ubuntu) → compiz (Ubuntu)
Changed in compiz:
status: New → Triaged
Changed in compiz (Ubuntu):
status: New → Triaged
Changed in compiz:
importance: Undecided → Medium
Changed in compiz (Ubuntu):
importance: Undecided → Medium
Changed in compiz:
assignee: nobody → Christopher Townsend (townsend)
Changed in compiz (Ubuntu):
assignee: nobody → Christopher Townsend (townsend)
Changed in compiz:
milestone: none → 0.9.12.2
Revision history for this message
Christopher Townsend (townsend) wrote :

Actually, this isn't the Gtk grabbing stuff. This has been in Compiz since 2008! I agree that the desktop should be focused if the mouse is over it. I wonder why more people haven't brought up this issue...

At any rate, I'm going to add a config option to allow the behavior as it currently is, but default to the "focus desktop" behavior.

Revision history for this message
Evandro P. Alves (evandro-pa) wrote :

Thanks Christopher for having a look at this. Sorry that I don't have the knowledge to help :(

I also missed why there weren't more questions about this on the internet too!?

Changed in compiz:
status: Triaged → In Progress
Changed in compiz (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.12.1+15.04.20150330-0ubuntu1

---------------
compiz (1:0.9.12.1+15.04.20150330-0ubuntu1) vivid; urgency=medium

  [ Chris Townsend ]
  * Change default behavior of focus-follows-mouse where the desktop
    will get focus when the mouse is over it. Also add option to allow
    old behavior. (LP: #1427636)
  * Clear out the lastMask vars when using the mouse to resize. (LP:
    #1348254)

  [ Eleni Maria Stea ]
  * Minor optimisation fix: Replaced glLoadIdentity, glMultMatrixf with
    glLoadMatrixf to avoid the unnecessary matrix multiplication:
    identity * some projection matrix

  [ Kevin Lange ]
  * WinRules plugin: boost arbitrary window size limits to something
    more reasonable (LP: #1431923)

  [ Stephen M. Webb ]
  * animations plugin: fixed a potential null pointer dereference (LP:
    #1101573)
 -- CI Train Bot <email address hidden> Mon, 30 Mar 2015 15:58:21 +0000

Changed in compiz (Ubuntu):
status: In Progress → Fix Released
Stephen M. Webb (bregma)
Changed in compiz:
status: In Progress → Fix Committed
Revision history for this message
Evandro P. Alves (evandro-pa) wrote :

Congrats everyone on solving this so fast! Hope I'll get the fix on Vervet :)

Revision history for this message
Peter Clifton (pcjc2) wrote :

My hero Christopher... (stumbled upon this fix I'd been missing for AGES whilst reviewing updates).

Revision history for this message
TomasHnyk (sup) wrote :

There was an old bug that I just made a duplicate of this one (for those wondering that noone bothered to fill a bug before).

Thanks for fixing this. However, this only escalates bug 1453757 (even though I am not sure if that is not a regression - I think id did not use to happen on 14.04).

Stephen M. Webb (bregma)
Changed in compiz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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