Mir

Focus is lost completely when the focussed window closes

Bug #1474132 reported by William Hua
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mir
Won't Fix
High
Unassigned
MirAL
Status tracked in Trunk
Release
Fix Released
High
Alan Griffiths
Trunk
Fix Released
High
Alan Griffiths

Bug Description

When a child surface is created, we get two MirSurfaceEvents with the attribute mir_surface_attrib_focus: one for unfocusing the parent, the other for focusing the child. So the child has the focus.

When the focused child is released, the parent doesn't re-acquire the focus, i.e. we only get a MirSurfaceEvent unfocusing the child. Here's a sample event log:

SURFACE
 Attribute focus
 Value 0
SURFACE
 Attribute focus
 Value 1
MOTION
 Device 12
 Action up
 Modifiers
 Button State
 Offset (164.000000, 70.000000)
 Event Time 1436820860654839000
MOTION
 Device 12
 Action motion
 Modifiers
 Button State
 Offset (164.000000, 70.000000)
 Event Time 1436820860654839000
KEY
 Device 11
 Action down
 Modifiers
 Key Code 65307
 Scan Code 1
 Event Time 1436820867212029000
SURFACE
 Attribute focus
 Value 0
SURFACE
 Attribute 5
 Value 0

Related branches

tags: added: input
tags: added: gtk-mir
Changed in mir:
assignee: nobody → Alberto Aguirre (albaguirre)
Changed in mir:
assignee: Alberto Aguirre (albaguirre) → nobody
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

In the case of Xmir, clients (the X server) need to be able to specify what sibling window/surface should be focused next.

App's are quite frustrating to use with the keyboard while we can't implement XSetInputFocus() and focus regularly gets lost completely.

Changed in mir:
status: New → Confirmed
importance: Undecided → High
tags: added: xmir
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

So two things are required here:

1. More sane demo server behaviour, such that we're never left with zero focussed surfaces.

2. A client API for setting/hinting/requesting what to focus (required by Xmir to navigate between multiple windows like when closing an Open File dialog and returning to the app). Or even when closing a tooltip; please return me to the app!

summary: - Parent surfaces don't re-acquire input focus when a focused child is
- released
+ Focus is lost completely when the focussed window closes
Changed in mir:
assignee: nobody → Alan Griffiths (alan-griffiths)
Changed in mir:
milestone: none → 0.22.0
status: Confirmed → In Progress
Changed in mir:
milestone: 0.22.0 → 0.23.0
Changed in miral:
status: New → Fix Committed
assignee: nobody → Alan Griffiths (alan-griffiths)
importance: Undecided → High
Kevin DuBois (kdub)
Changed in mir:
milestone: 0.23.0 → 0.24.0
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.24.0

Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
status: Fix Committed → In Progress
Kevin DuBois (kdub)
Changed in mir:
milestone: 0.24.0 → 0.25.0
Changed in mir:
status: In Progress → Fix Committed
status: Fix Committed → In Progress
Changed in mir:
assignee: Alan Griffiths (alan-griffiths) → nobody
milestone: 0.25.0 → none
status: In Progress → Won't Fix
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I'm a bit concerned if Mir isn't getting a fix for this. How long before the fix in MirAL is the fix in Mir?

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.