[regression] Pressing alt doesn't show the menu title bar in top panel

Bug #943194 reported by Didier Roche on 2012-02-29
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Compiz Core
Daniel van Vugt
Fix Released
Sam Spilsbury
Unity Distro Priority
Sam Spilsbury
compiz (Ubuntu)
unity (Ubuntu)
Sam Spilsbury

Bug Description

With latest 5.6 RC:
1. press alt
-> nothing is shown in the top panel (still have the title bar)

what should happen:
-> seeing the menu

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: unity 5.4.0+bzr2041ubuntu0+654
ProcVersionSignature: Ubuntu 3.2.0-17.27-generic 3.2.6
Uname: Linux 3.2.0-17-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 1.93-0ubuntu2
Architecture: i386
CompizPlugins: [core,composite,opengl,compiztoolbox,decor,vpswitch,snap,mousepoll,resize,place,move,wall,grid,regex,imgpng,session,gnomecompat,animation,fade,unitymtgrabhandles,workarounds,scale,expo,ezoom,unityshell]
CrashDB: unity
Date: Wed Feb 29 12:38:39 2012
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427)
SourcePackage: unity
UpgradeStatus: Upgraded to precise on 2011-11-30 (91 days ago)

Related branches

Didier Roche (didrocks) wrote :
Changed in unity:
milestone: none → 5.6.0
status: New → Triaged
importance: Undecided → Critical
Changed in unity (Ubuntu):
status: New → Triaged
importance: Undecided → Critical

downgraded as high as it's not a regression from 5.4 but before. Seems to happen with gtk3, gtk2 and xul apps.

summary: - [regression] Pressing alt doesn't show the menu title bar in top panel
+ [regression from oneiric] Pressing alt doesn't show the menu title bar
+ in top panel
description: updated
Changed in unity:
importance: Critical → High
Changed in unity (Ubuntu):
importance: Critical → High
summary: - [regression from oneiric] Pressing alt doesn't show the menu title bar
- in top panel
+ [regression] Pressing alt doesn't show the menu title bar in top panel
Didier Roche (didrocks) wrote :

ok, so from the report:
- gtk2, xul apps didn't work before
- gtk3 were working and is not working anymore, the regression is here.

Changed in unity-distro-priority:
status: New → Fix Committed
importance: Undecided → High
Chris Coulson (chrisccoulson) wrote :

We have code for handling Alt keydown in firefox and thunderbird here: http://bazaar.launchpad.net/~extension-hackers/globalmenu-extension/trunk/view/head:/extensions/globalmenu/components/src/uGlobalMenuBar.cpp#L494, but we don't see these events when running in Unity now.

Disabling the shortcut for the HUD fixes it

Omer Akram (om26er) wrote :

with yesterday trunk it was working for atleast gtk3 apps for me but now today with latest trunk build it does not with any.

Changed in compiz-core:
status: New → Triaged
Changed in compiz-core:
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in compiz-core:
milestone: none →
status: Triaged → In Progress
importance: Undecided → High
Daniel van Vugt (vanvugt) wrote :

I have spent all day on this and it seems we have a choice of either:
  (a) Tap detection for the Alt key working (as it does now), and no KeyPress event for "Alt" reaching other apps until Alt+other_key is pressed; or
  (b) Tap detection not working, and the Alt KeyPress event reaching other apps immediately.

Technically, the issue seems to be that it is impossible to replay the initial Alt press to the app, either because that is under a passive grab and you can't replay passively grabbed key events, or because it's an xbkEvent (not an XKeyEvent). You can however choose to ignore such events with XUngrabKeyboard, but that completely breaks tap detection (removing the synchronous grab).

I have two suggestions:

1. To retain tapping and keep compiz how it is ((a)), and modify the existing Alt key Initiate callback in Unity to send a signal to the panel to show the menu when Alt has been held down for a second or so. The same as the Launcher already does when Super is held down to show the shortcuts. Sorry I don't have a Unity-5 dev environment to do this right now. But it should be simple in theory.

2. Alternatively, we could disable the Alt-only keybinding for now as mentioned in comment #4. That would not only solve this bug but also bug 943851, bug 943456 and bug 943223.

Theoretically, another solution to most of these Alt bugs is to rewrite the compiz tap detection using passive grabs. However, I have tried that several times over the past month and tried again today. Still couldn't get that approach working.

Changed in compiz-core:
assignee: Daniel van Vugt (vanvugt) → nobody
status: In Progress → Triaged
milestone: → none
Daniel van Vugt (vanvugt) wrote :

Sadly, I think bug 943851 is a much bigger reason why we shouldn't bind the HUD (or anything) to just Alt for now. But this bug is another good reason.

Changed in unity:
assignee: nobody → Sam Spilsbury (smspillaz)
Changed in compiz-core:
assignee: nobody → Sam Spilsbury (smspillaz)
Changed in unity (Ubuntu):
assignee: nobody → Sam Spilsbury (smspillaz)
Changed in unity-distro-priority:
assignee: nobody → Sam Spilsbury (smspillaz)
Daniel van Vugt (vanvugt) wrote :

I've now tested the idea I had last night to try and make compiz use purely passive grabs for tap detection. It doesn't work half the time. For some strange reason XGrabKey (keycode=AnyKey, modifiers=Alt) returns success but then fails to actually grab Alt+any_other_key or to report any such key events.

Essentially, the biggest problem with the current tap detection is that it uses an active grab. As soon as you start the active grab, that causes a focus change. And that focus change causes the underlining/highlighting of any menu that would be triggered by pressing Alt to be cancelled immediately. This is the same root cause as bug 943851.

Tim Penhey (thumper) on 2012-03-04
Changed in unity:
status: Triaged → In Progress
Daniel van Vugt (vanvugt) wrote :

Fix (workaround) committed into lp:unity at revision 2049

Changed in unity:
status: In Progress → Fix Committed
tags: added: alt-key
Changed in compiz-core:
assignee: Sam Spilsbury (smspillaz) → Daniel van Vugt (vanvugt)
status: Triaged → In Progress
Changed in compiz-core:
milestone: none →
Daniel van Vugt (vanvugt) wrote :

Merged into lp:compiz-core at revision 3046
(but apparently still needs further work to support non-GTK3 apps)

Changed in compiz-core:
status: In Progress → Fix Committed
Daniel van Vugt (vanvugt) wrote :

In progress again. The first version of the fix only seems to work with GTK-3 menus. Not GTK-2.

Changed in compiz-core:
status: Fix Committed → In Progress
Daniel van Vugt (vanvugt) wrote :

Second fix committed into lp:compiz-core at revision 3048

Changed in compiz-core:
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:

compiz (1: precise; urgency=low

  [ Łukasz 'sil2100' Zemczak ]
  * New upstream snapshot:
    - Fix gtk-window-decorator crash upon demaximizing a window (LP: #930071)
    - Fix core keybindings (LP: #930412)
    - Fixes compiz crash with SIGSEGV on shutdown (LP: #931283)
    - Plugins can't tell the difference between a key-tap and modifier
      key-release (LP: #925293)
    - compiz-core r3001 (and 3002) ftbfs (LP: #933226)
    - Semi-maximized windows have no shadow or frame (LP: #924736)
    - Untranslated strings in gtk-window-decorator (LP: #780505)
    - Initialize the _NET_WM_STATE_FOCUSED (LP: #932087)
    - [regression] Customized shortcuts don't work (LP: #931927)
    - Window stacking problem (LP: #936675)
    - Quickly demaximized windows can receive maximized window decorations if
      they were initially maximized (LP: #936778)
    - Maximized windows do not get shadows at all (LP: #936774)
    - [regression] Launcher, top panel and keyboard un-responsive after using
      any Super-x shortcut (LP: #934058)
    - No draggable border if mutter isn't installed (LP: #936781)
    - Fix compiz crash with SIGSEGV in XDefineCursor() (LP: #936487)
    - Fixes memory leak at DecorWindow::updateSwitcher() (LP: #940115)
    - Unresolved symbols in plugins cause compiz to exit (LP: #938478)
    - Fix compiz spending about 51% of its CPU time in CompRegion
      construction/destruction (LP: #940139)
    - Fix Conditional jump or move depends on uninitialised value(s) in
      decor_match_pixmap (LP: #940066)
    - Fix 'show desktop' behaviour (LP: #871801)
    - Tweak algorithm used to cast shadows on maximized windows (LP: #936784)
    - "Svg" and "Png" should be "SVG and "PNG" (LP: #942890)
    - Fix invalid memory usage after free() in DecorWindow (LP: #943116)
    - Fix alt + F10 (LP: #943223)
  * Removed cherry-picked patches
  * debian/patches/fix_944631.patch:
    - Always replay the keyboard if something was grabbed and didn't trigger
      an action and don't trigger actions which aren't added accidentally
      (LP: #943612) (LP: #944631)
  * debian/patches/fix_923683.patch:
    - Backports a patch which prevents the shift race condition

  [ Didier Roche ]
  * debian/patches/fix_alt_pressing.patch:
    - Patch from ddv to fix all the regressions with the alt key fix and other
      (LP: #943851, #945373)
    - Fix Quicklist are not showing if right-clicking a launcher icon in Expo
      mode if triggered by Super + S (LP: #944979)
  * debian/patches/fix_806255.patch:
    - Unity/compiz intercepts keystrokes from grabbed windows (LP: #806255)
  * debian/patches/fix_943194.patch:
    - second part for the alt key fix (LP: #943194)
  * debian/patches/additional_alt_tapping_fix.patch:
    - again another alt tapping related fix for some regressions from the
      previous branch. Taken from "tapping-panacea" upstream branch.
 -- Didier Roche <email address hidden> Mon, 12 Mar 2012 10:22:10 +0100

Changed in compiz (Ubuntu):
status: New → Fix Released
Didier Roche (didrocks) on 2012-03-12
Changed in unity:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :
Download full text (4.1 KiB)

This bug was fixed in the package unity - 5.6.0-0ubuntu1

unity (5.6.0-0ubuntu1) precise; urgency=low

  * New upstream release.
    - compiz crashed with SIGSEGV in g_type_check_instance_cast()
      (LP: #862972)
    - compiz crashed with SIGABRT in __gnu_cxx::__verbose_terminate_handler()
      (LP: #926793)
    - compiz crashed with SIGSEGV in gdk_pixbuf_get_width() (LP: #937421)
    - Unity causes ibus to not work correctly (spaces incorrectly placed)
      (LP: #880876)
    - Dash - update Dash keyboard shortcuts so the 'CTRL + TAB' switches
      between Lenses and 'TAB' by itself moves the focus between categories
      (LP: #891648)
    - HUD - closing a window with <Alt>+<F4> opens the hud (LP: #923410)
    - unity-applications-daemon crashed with SIGSEGV in
      dee_sequence_model_free_row() (LP: #916356)
    - Launcher, Window Management - Launcher reveal should not be triggered
      when dragging a window (LP: #928805)
    - lenses are loaded on start, should be lazy loaded (LP: #929506)
    - Trash icon jumps about when trying to drag an icon onto it (LP: #932365)
    - HUD loses keypresses for the first second after opening (LP: #932906)
    - HUD doesn't give the focus back to the active application after dash/hud
      use (LP: #934061)
    - Launcher - unpinned apps show with empty pips in the launcher as if they
      exist on another workspace (LP: #937898)
    - Unity Dash should support Keywords parameter in .desktop (formerly X
      -GNOME-Keywords or X-AppInstall-Keywords) (LP: #941231)
    - Support FD.o Desktop Actions spec (LP: #942042)
    - Unity hangs when touching my touchpad/trackpad (LP: #942625)
    - [regression] Pressing alt doesn't show the menu title bar in top panel
      (LP: #943194)
    - Alt + F (or other mnemonic) doesn't work in gnome-terminal (LP: #943239)
    - [unity 5.6] Using Alt+F1 or Alt+F2 sends a ";3P" or ";3Q" to the active
      windows (LP: #943456)
    - [unity 5.6] holding alt and pressing a direction opens the alt-tab list
      in a buggy way (LP: #943902)
    - [unity-5.6] can't enter accents (^o->) in the dash since recent updates
      (LP: #944674)
    - Dash - Keyboard navigation for search filters is broken (LP: #844033)
    - Dash - If mouse highlights one icon in grid, keyboard navigation
      highlights another, so there are 2 highlighted icons (LP: #817436)
    - Alt+Tab default delay of 150ms is too long (LP: #888636)
    - Keyboard shortcut - F10 shortcut is used to show menu and this is wrong
      (LP: #878492)
    - Dash - Currently the app lens doesn't show applications that are
      available for purchase (LP: #916121)
    - Chromium is running, but not showing in launcher or alt-tab.
      (LP: #918474)
    - Dash - Different states of rating stars, and dimensions (LP: #924884)
    - alt-tab confused by a multiple instances of an application on different
      workspaces (LP: #925484)
    - Launcher - Icons are not colorized properly (LP: #930949)
    - Remove glow from Alt-tab edge and Search Field image assets
      (LP: #933578)
    - "Left Mouse Drag" and "Middle Mouse Drag" should be translatable
      (LP: #930510)
    - Launcher switcher...


Changed in unity (Ubuntu):
status: Triaged → Fix Released
Changed in compiz-core:
status: Fix Committed → Fix Released
Didier Roche (didrocks) on 2012-04-17
Changed in unity-distro-priority:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers