[Avila] keyboard input lost after app switching

Bug #1532862 reported by Victor Tuson Palau
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Pocket Desktop
Fix Released
Critical
Michał Sawicz
Canonical System Image
Fix Released
Critical
Michał Sawicz
Mir
Invalid
Critical
Unassigned
The Avila project
Fix Committed
Critical
Unassigned
qtmir (Ubuntu)
Invalid
Critical
Unassigned
unity8 (Ubuntu)
Fix Released
Critical
Michael Zanetti

Bug Description

Steps:
Open Gedit from puritine v0.5
in Desktop mode type something in a document
Use alt-tab to switch to another app, example scope window
Use alt-tabl to switch back to gedit.

Expect:
can continue typing in the doc

Actual:
when typing menu navigation is trigger (menus are open like an alt key is stucked)
same behaviour on xchat and gimp.

Environment:
Avila using USB OTG keyboard and mouse
-------------
confirmed this occurs on N7 with bt keyboard as well

Tags: ue

Related branches

Changed in avila:
importance: Undecided → Critical
kevin gunn (kgunn72)
Changed in canonical-devices-system-image:
milestone: none → ww04-2016
assignee: nobody → kevin gunn (kgunn72)
importance: Undecided → Critical
Changed in mir:
importance: Undecided → Critical
Changed in canonical-pocket-desktop:
importance: Undecided → Critical
assignee: nobody → kevin gunn (kgunn72)
Revision history for this message
kevin gunn (kgunn72) wrote :

adding unity8/qtmir as this could be a focus related issue?

Changed in qtmir (Ubuntu):
importance: Undecided → Critical
Changed in unity8 (Ubuntu):
importance: Undecided → Critical
kevin gunn (kgunn72)
description: updated
Jason Yen (jasonyen)
Changed in avila:
milestone: none → ww04-2016
Jason Yen (jasonyen)
tags: added: ue
Revision history for this message
Michael Zanetti (mzanetti) wrote :

OK, I've reproduced this. Adding my notes here:

* After alt+tab, focus is successfully put back to the app. It works with touch apps.
* In the case of gedit, the focus *is* being put back to gedit, however, inside the XMir container the focus gets messed up.
* after alt+tab back to gedit, the arrow keys are still functional, pressing left/right/down/up will navigate to the menu

=> This makes me think that pressing the alt key, for the alt+tab, will also cause the xmir app to act on it and with that focus the menu bar.

Following that, a single alt press inside the app should unfocus the menu bar and allow typing in gedit again. Testing that on my N7 with BT keyboard confirms this.

Now I'm not 100% sure yet if this is an issue in unity or the xmir container. Will try to figure what the correct behaviour should be.

Michał Sawicz (saviq)
Changed in unity8 (Ubuntu):
assignee: nobody → Michael Zanetti (mzanetti)
status: New → Incomplete
status: Incomplete → In Progress
Revision history for this message
Michael Zanetti (mzanetti) wrote :

Ok. I finally have a branch that is functional and fixes the issue properly. Just need to add some tests as the logic on holding back the Alt key and re-injecting it is non-trivial. Stay tuned for a linked branch.

Michał Sawicz (saviq)
Changed in canonical-pocket-desktop:
assignee: kevin gunn (kgunn72) → Michał Sawicz (saviq)
Changed in canonical-devices-system-image:
assignee: kevin gunn (kgunn72) → Michał Sawicz (saviq)
status: New → In Progress
Changed in canonical-pocket-desktop:
status: New → In Progress
Changed in qtmir (Ubuntu):
status: New → Invalid
Changed in mir:
status: New → Invalid
Changed in avila:
status: New → In Progress
assignee: nobody → Michał Sawicz (saviq)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity8 - 8.11+16.04.20160129-0ubuntu1

---------------
unity8 (8.11+16.04.20160129-0ubuntu1) xenial; urgency=medium

  [ Albert Astals Cid ]
  * Audio Preview Button: Don't gain focus on press (LP: #1517830)
  * Better attempt at sanitization
  * Better looking application scopes for wide screens
  * Call printSettings correctly
  * Card test: Limit the precision we ask for doubles to be equal
  * Convert while into tryCompareFunction
  * Do not use the same filepath parameter for all the card creator
    createQmlObject calls (LP: #1536379)
  * Fix some test shells being unstable in the armhf builders
  * Make revealByEdgePush more stable
  * More reliable compares
  * Move the mouse over the bfb before waiting for rendering
  * Remove the DDAs constrains for every test
  * Set the background source size to the max we'll need + new
    background (LP: #1539011)

  [ Andrea Cimitan ]
  * Dynamically change click scope card size according to size (LP:
    #1536745)
  * Should fix lazyimage test failures on fast machines

  [ CI Train Bot ]
  * Fix card tests on the phone
  * Update translation template

  [ Daniel d'Andrada ]
  * Desktop stage rotates only to follow screen orientation (LP:
    #1515977)

  [ Lukáš Tinkl ]
  * Hide/reveal the mouse pointer on touch/mouse events renamed:
    plugins/Utils/HomeKeyWatcher.cpp =>
    plugins/Utils/WindowInputMonitor.cpp plugins/Utils/HomeKeyWatcher.h
    => plugins/Utils/WindowInputMonitor.h
    tests/mocks/Utils/HomeKeyWatcher.qml =>
    tests/mocks/Utils/WindowInputMonitor.qml
    tests/plugins/Utils/HomeKeyWatcherTest.cpp =>
    tests/plugins/Utils/WindowInputMonitorTest.cpp

  [ Michael Terry ]
  * Synchronize the mouse-cursor-speed and touchpad-cursor-speed
    properties with USC. (LP: #1536383)

  [ Michael Zanetti ]
  * Add InputMethod to secondary screen
  * Add a virtual Touchpad while external screen is connected
  * Make big tablets switch to windowed mode by plugging a kbd only (LP:
    #1535399)
  * Prevent alt key presses from being dispatched to the app on alt+tab
    (LP: #1532862)

  [ Michał Sawicz ]
  * Make qmluitests.sh more robust and allow parallel test execution
  * Skip SessionBackendTest::testLogin1Capabilities until we talk to a
    mock instead (LP: #1532112, #1532113)

 -- Michał Sawicz <email address hidden> Fri, 29 Jan 2016 11:53:27 +0000

Changed in unity8 (Ubuntu):
status: In Progress → Fix Released
tags: added: lt-blocker
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
kevin gunn (kgunn72)
Changed in avila:
status: In Progress → Fix Released
Changed in canonical-pocket-desktop:
status: In Progress → Fix Released
Changed in avila:
status: Fix Released → Fix Committed
assignee: Michał Sawicz (saviq) → nobody
Revision history for this message
Terence Eden (edent) wrote :

How do I install this fix? Have updated to OTA10.1 - but the problem still seems to be there.

Revision history for this message
Michael Zanetti (mzanetti) wrote :

@edent: The fix is already in OTA-10.1. If you see this problem still, please open a new bug report and provide detailed steps on how to reproduce.

tags: removed: lt-blocker
Michał Sawicz (saviq)
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
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.