When last window on workspace doesn't accept focus, the keyboard doesn't react at any keypress

Bug #948371 reported by Mathieu Comandon
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Compiz
Invalid
Undecided
Unassigned
Compiz Core
Invalid
Undecided
Unassigned
compiz (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

How to reproduce :

- Have a workspace with only one window
- Close it
- Try to switch on a another workspace or use any keyboard shortcut : nothing happens
- Only way to get back to a working configuration is to switch to another application by clicking an app in the launcher

I don't always experience this bug, i'm having it right now on my desktop but not on my laptop (both running precise). I've experienced it on other machines and on Oneiric too.

I've asked a question about this on AskUbuntu a while ago ( http://askubuntu.com/questions/89046/keyboard-shortcuts-dont-work-when-no-window-left-on-current-workspace ) at that time I had a rather exotic desktop configuration, but now I run Unity with almost no setting changed and it still happens.

=== update ===

This bug happends when there is a sticky window on the desktop that doesn't accept focus (covergloobus does that, but I've also written a short Python program in comment #15 that can trigger the bug)

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: compiz 1:0.9.7.0~bzr2995-0ubuntu5
ProcVersionSignature: Ubuntu 3.2.0-17.27-generic 3.2.6
Uname: Linux 3.2.0-17-generic x86_64
NonfreeKernelModules: nvidia
.proc.driver.nvidia.gpus.0: Error: [Errno 21] Is a directory: '/proc/driver/nvidia/gpus/0'
.proc.driver.nvidia.registry: Binary: ""
.proc.driver.nvidia.version:
 NVRM version: NVIDIA UNIX x86_64 Kernel Module 295.20 Mon Feb 6 21:07:30 PST 2012
 GCC version: gcc version 4.6.2 (Ubuntu/Linaro 4.6.2-16ubuntu1)
.tmp.unity.support.test.0:

ApportVersion: 1.94-0ubuntu1
Architecture: amd64
CompizPlugins: [core,composite,opengl,compiztoolbox,decor,imgpng,resize,mousepoll,regex,vpswitch,wall,snap,place,move,session,gnomecompat,unitymtgrabhandles,grid,animation,mag,expo,fade,workarounds,ezoom,scale,unityshell]
CompositorRunning: compiz
Date: Tue Mar 6 20:55:14 2012
DistUpgraded: Log time: 2011-10-28 19:49:58.245809
DistroCodename: precise
DistroVariant: ubuntu
DkmsStatus:
 nvidia-current, 295.20, 3.2.0-17-generic, x86_64: installed
 nvidia-current, 295.20, 3.2.0-18-generic, x86_64: installed
 vboxhost, 4.1.8, 3.2.0-17-generic, x86_64: installed
 vboxhost, 4.1.8, 3.2.0-18-generic, x86_64: installed
GraphicsCard:
 NVIDIA Corporation GF114 [GeForce GTX 560] [10de:1201] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: Giga-byte Technology Device [1458:352a]
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
JockeyStatus:
 xorg:nvidia_current - NVIDIA accelerated graphics driver (Proprietary, Enabled, In use)
 xorg:nvidia_current_updates - NVIDIA accelerated graphics driver (post-release updates) (Proprietary, Disabled, Not in use)
MachineType: Gigabyte Technology Co., Ltd. EP45-UD3R
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-17-generic root=UUID=b46add23-a90b-494a-a3bf-a0b7a3cc4c46 ro quiet splash vt.handoff=7
SourcePackage: compiz
UpgradeStatus: Upgraded to precise on 2011-11-08 (118 days ago)
dmi.bios.date: 01/25/2010
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F12
dmi.board.name: EP45-UD3R
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrF12:bd01/25/2010:svnGigabyteTechnologyCo.,Ltd.:pnEP45-UD3R:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnEP45-UD3R:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: EP45-UD3R
dmi.sys.vendor: Gigabyte Technology Co., Ltd.
version.compiz: compiz 1:0.9.7.0~bzr2995-0ubuntu5
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.30-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 8.0.1-0ubuntu2
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 8.0.1-0ubuntu2
version.nvidia-graphics-drivers: nvidia-graphics-drivers N/A
version.xserver-xorg-core: xserver-xorg-core 2:1.11.4-0ubuntu4
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.6.99.901+git20120126-0ubuntu2
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20111219.aacbd629-0ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.17.0-1ubuntu4
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20111201+b5534a1-1build2

Revision history for this message
Mathieu Comandon (strycore) wrote :
Revision history for this message
Mathieu Comandon (strycore) wrote :

As said in the original report, I am able to reproduce this on another machine at work, also on Precise.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in compiz (Ubuntu):
status: New → Confirmed
Revision history for this message
Kent Asplund (hoglet) wrote :

I get the same problem in (x)ubuntu 11:10 when using compiz. Compiz is getting key press as I can rotate the desktop cube with <Ctrl>-<Alt> + mouse but it is not getting to the xfce-application that handles keyboard shortcuts.

Revision history for this message
Mathieu Comandon (strycore) wrote :

It may be another bug, as you're still able to trigger compiz shortcuts but it's possible that you're able to switch desktops because it's a keyboard+mouse shortcuts. Does other compiz keyboard only shortcuts work when you close the last window on the current workspace ?

I currently can't reproduce it on my desktop machine, but I does not necessarily means it's been fixed as I still can't figure out what is triggering this bug in the first place.

Revision history for this message
Kent Asplund (hoglet) wrote :

For me the problem disappears if un-installing overlay-scrollbar and liboverlay-scrollbar.

I think Compiz keyboard only shortcuts works. I Successfully tried with, <ctrl>-<alt> + arrows to switch workspace.

Revision history for this message
Mathieu Comandon (strycore) wrote :

If compiz shortcuts work, then I believe that this is a separate bug.

On my side, I'm starting to believe that the bug is caused by CoverGloobus (or some CoverGloobus window type + compiz). More testing needed but I seem to be on something.

Revision history for this message
Kent Asplund (hoglet) wrote :

Do you still have the problem if you un-install overlay-scrollbar and liboverlay-scrollbar?

Revision history for this message
Kent Asplund (hoglet) wrote :

OK, problem reappeared even though I had overlay-scrollbar uninstalled. :(

And now I can not use compiz keyboard shortcuts on a blank workspace, exactly like you. Merde!

I do not have any CoverGloobus installed that I know of though.

Revision history for this message
Kent Asplund (hoglet) wrote :

Sorry, for spamming....

I realized why I thought it was working before: The bug is ONLY triggered when closing the last window on a workspace. Going to an empty workspace is not causing the keyboard to stop responding. Well, technically the keyboard still works as I can use keyboard modifiers with mouse still.

Revision history for this message
Mathieu Comandon (strycore) wrote :

I've had the bug with and without overlay scrollbars, and I don't think there any relationship with it.

You may not have CoverGloobus, but you may have some other programs which show what we wouldn't consider to be a real window. Maybe Conky, or some other desktop widget, or some panel app. You said you were running xubuntu, maybe the XFCE panel's window type is the same as CoverGloobus'.

Revision history for this message
Mathieu Comandon (strycore) wrote :

If you have ccsm installed, you can check the type of windows by configuring an option requiring a window name or type (such as the window decoration plugin).
After you click the + button, select "Window type" in the dialog then click "Grab".

Do you have other "Dock" type windows on your empty desktop (CoverGloobus and Unity's panel are both dock windows)

Revision history for this message
Mathieu Comandon (strycore) wrote :

Got it

I've located the problem and it is related to sticky windows. The following piece of code makes the bug reproducible all the time.

import gtk

class StickyWindow(gtk.Window):
    def __init__(self):
        super(StickyWindow, self).__init__()
        label = gtk.Label("Hello")
        label.show()
        self.add(label)
        self.set_default_size(200, 200)

        self.set_property('accept-focus', False)

        self.show()
        self.stick()

    def main(self):
        gtk.main()

if __name__ == "__main__":
    sticky = StickyWindow()
    sticky.main()

Revision history for this message
Mathieu Comandon (strycore) wrote :

oh and one more thing, it's not sticky windows only, it's sticky windows with 'accept-focus' property set to False.

Revision history for this message
Mathieu Comandon (strycore) wrote :

Marking as triaged and editing the title, since the cause of the bug is known

summary: - After closing last window on workspace, the keyboard doesn't react at
- any keypress
+ When last window on workspace doesn't accept focus, the keyboard doesn't
+ react at any keypress
description: updated
Changed in compiz-core:
status: New → Confirmed
Revision history for this message
Mathieu Comandon (strycore) wrote :

I can't seem to reproduce the bug in Archlinux (compiz 0.8.8) and I don't remember encountering this bug in Ubuntu when the 0.8.x series was used so this is likely to be a regression introduced in compiz 0.9.x

Revision history for this message
Kim Nguyễn (kim.nguyen) wrote :

I suffer from the same bug using compiz+unity. A workaround is to ask nautilus to draw the desktop by setting:

org.gnome.desktop.background.show-desktop-icons = true

with gesettings/dconf-editor. This way the nautilus window will stay on every desktop and since it accepts the focus, keyboard events are properly handled by compiz.

Note that having nautilus draw the background is the default behaviour IIRC, thus this bug might go unnoticed by most people.
(it's still possible to have nautilus draw the background and not show any icon).

Revision history for this message
Kent Asplund (hoglet) wrote :

I now have the same behaviour with Xfwm4 also! It might be that this is not an compiz issue.

Changed in compiz:
status: New → Confirmed
Revision history for this message
Tomas Mrozek (u-mail-j) wrote :

I confirm the bug is still present (in Ubuntu 14.04). In my case me having Gis Weather running on the desktop makes the bug to manifest.

Revision history for this message
Eleni Maria Stea (hikiko) wrote :

We couldn't reproduce this bug and since it's quite old I marked it as Invalid. If you still get the problem in one of the supported Ubuntu releases, please feel free to re-open it and update the description. Thank you!

Changed in compiz:
status: Confirmed → Invalid
Changed in compiz-core:
status: Confirmed → Invalid
Changed in compiz (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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