[unity 5.6] Pressing Alts steals focus from current widget, cannot compose characters with AltGr

Bug #943851 reported by Roman Yepishev on 2012-03-01
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Compiz Core
High
Daniel van Vugt
Unity
Fix Released
Undecided
Unassigned
Unity Distro Priority
High
Unassigned
compiz (Ubuntu)
Undecided
Unassigned
unity (Ubuntu)
Undecided
Unassigned

Bug Description

unity: 5.4.0+bzr2041ubuntu0+654

STR:

1. Open firefox
2. Put the cursor into address bar, notice that widget is highlighted as it received keyboard focus.
3. Press and hold AltGr

Actual results:
At the moment of pressing the widget loses the focus and you cannot type into that field easily.

Expected results:
Neither Alt nor AltGr should change the focus state.

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 x86_64
ApportVersion: 1.93-0ubuntu2
Architecture: amd64
CompizPlugins: [core,composite,opengl,decor,resize,gnomecompat,compiztoolbox,colorfilter,mousepoll,grid,imgpng,vpswitch,snap,regex,move,place,wall,animation,unitymtgrabhandles,workarounds,session,expo,ezoom,fade,scale,unityshell]
CrashDB: unity
Date: Thu Mar 1 10:55:34 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120225)
SourcePackage: unity
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Roman Yepishev (rye) wrote :
summary: - [unity 5.6] Pressing Alts steals focus from current widged, cannot
+ [unity 5.6] Pressing Alts steals focus from current widget, cannot
compose characters with AltGr
Revision history for this message
Sebastien Bacher (seb128) wrote :

I can confirm the bug with compiz 1:0.9.7.0~bzr3025-r3029-p737~precise1 (staging version from yesterday), it doesn happen with r2995 (precise) or r3025 (unity-team/ppa), reassigning to compiz

affects: unity → compiz
Revision history for this message
Sebastien Bacher (seb128) wrote :

Weird, the bug has compiz 1:0.9.7.0~bzr3025-0ubuntu1~ppa1 in its Dependencies.txt, I can't confirm with that version though :-(

Didier Roche (didrocks) on 2012-03-01
affects: unity → unity-distro-priority
Changed in unity-distro-priority:
status: New → Fix Committed
importance: Undecided → High
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Confirmed. Unfortunately Alt presently triggers an active synchronous keyboard grab, in order to tell the difference between Alt taps and Alt+other_key. This grab sends events causing the current widget to lose focus.

The only two solutions to this bug I can think of are:

1. Don't bind the lone "Alt" key to the HUD in Unity 5. This is a Unity team design decision.

2. Rewrite the tapping detection in compiz to not use active grabs. Unfortunately I have tried this several times over the past month and again today and not yet succeeded.

no longer affects: compiz-core
affects: compiz → compiz-core
Changed in compiz-core:
status: New → Confirmed
status: Confirmed → Triaged
Changed in unity:
status: New → Confirmed
Changed in compiz-core:
importance: Undecided → High
Changed in unity (Ubuntu):
status: New → Confirmed
Changed in compiz (Ubuntu):
status: New → Confirmed
Revision history for this message
Roman Yepishev (rye) wrote :

Can we make compiz differentiate between Alt and AltGr?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It may be possible. However compiz is not explicitly binding to AltGr at all. It's just telling Xorg that it wants to bind to all keys called "Alt", and Xorg has decided that "Alt" includes AltGr too.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Maybe we can tell compiz to bind to just Alt_L (left Alt key) and that will make it ignore AltGr and the rest... ?

tags: added: alt-key
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

That could be a solution I guess.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I'm planning some other fixes to keyboard handling in compiz that might also fix this. However the changes are not small or simple...

Changed in compiz-core:
assignee: nobody → Daniel van Vugt (vanvugt)
status: Triaged → In Progress
Changed in compiz-core:
milestone: none → 0.9.7.2
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Merged into lp:compiz-core at revision 3046

Changed in compiz-core:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.7.0+bzr3035-0ubuntu1

---------------
compiz (1:0.9.7.0+bzr3035-0ubuntu1) 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: Confirmed → Fix Released
Tim Penhey (thumper) on 2012-03-14
Changed in unity:
status: Confirmed → Fix Committed
status: Fix Committed → Fix Released
Changed in compiz-core:
status: Fix Committed → Fix Released
Changed in unity-distro-priority:
status: Fix Committed → Fix Released
Changed in unity (Ubuntu):
status: Confirmed → Fix Released
Changed in compiz-core:
status: Fix Released → Fix Committed
Changed in compiz-core:
status: Fix Committed → Fix Released
Revision history for this message
Roman Yepishev (rye) wrote :

It looks like i can still reproduce this in firefox - http://paste.ubuntu.com/900641/ - switching to layout with compose key and pressing altGr triggers a blur event.

Revision history for this message
Ivan (trurl-master) wrote :

I'm still able to reproduce Roman's example: http://jsfiddle.net/c2Hbv/6/

Ubuntu 12.04 i686
Unity 5.12
Firefox 13.0.1

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug is Fix Released. If you still have problems then please report new bugs.

Revision history for this message
Hanusz leszek (leszek-skynet) wrote :

A new bug report has been created:
https://bugs.launchpad.net/compiz-core/+bug/1233458

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

Other bug subscribers