Dialogs with parents should be modal i.e. they receive focus when the parent is clicked

Bug #1626659 reported by Alan Griffiths
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MirAL
Fix Released
High
Alan Griffiths

Bug Description

miral-shell --window-management-trace --startup qterminal

Pull up the "About" window:

[2016-09-22 17:51:58.112692] miral::Window Management: place_new_surface app_info={application=QtUbuntu, windows={, , QTerminal, }}, requested_specification={name=, type=dialog, top_left=(600, 362), size=(100, 30), output_id=0, state=restored, min_width=0, min_height=0, max_width=16777215, max_height=16777215, parent=QTerminal, top_left=(600, 362), size=(100, 30)} -> {name=, type=dialog, top_left=(600, 372), size=(100, 30), output_id=0, state=restored, min_width=0, min_height=0, max_width=16777215, max_height=16777215, parent=QTerminal, top_left=(600, 372), size=(100, 30)}

There we have a dialog with a parent.

Click on the parent:

Expected: the dialog retains (or gets) focus
Actual: The terminal window becomes active

[2016-09-22 18:00:28.242225] miral::Window Management: advise_begin
[2016-09-22 18:00:28.242367] <DEBUG> miral::Window Management: handle_pointer_event
[2016-09-22 18:00:28.242412] miral::Window Management: window_at cursor=(436, 220) -> QTerminal
[2016-09-22 18:00:28.242506] miral::Window Management: advise_focus_lost window_info={name=About Qt, type=dialog, state=restored, restore_rect=((600, 372), (100, 30)), parent=1, children={0x7f4300013690}, min_width=236, min_height=224, max_width=236, max_height=224, width_inc=1, height_inc=1, min_aspect={0, 4294967295}, max_aspect={4294967295, 0}, preferred_orientation=15, output_id=0}
[2016-09-22 18:00:28.242552] miral::Window Management: advise_focus_gained window_info={name=QTerminal, type=normal, state=restored, restore_rect=((330, 212), (640, 480)), parent=0, children={0x7f430000f0a0, , About Qt}, min_width=320, min_height=209, max_width=16777215, max_height=16777215, width_inc=1, height_inc=1, min_aspect={0, 4294967295}, max_aspect={4294967295, 0}, preferred_orientation=15, output_id=0}
[2016-09-22 18:00:28.242569] miral::Window Management: raise_tree root=QTerminal
[2016-09-22 18:00:28.242596] miral::Window Management: advise_raise window_info={QTerminal, 0x7f430000f0a0, , About Qt, 0x7f4300013690}
[2016-09-22 18:00:28.242632] miral::Window Management: select_active_window hint=QTerminal -> QTerminal

The spec:

"If the surface has a child dialog, the deepest descendant dialog should receive input focus."

Related branches

Changed in miral:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → Alan Griffiths (alan-griffiths)
Changed in miral:
milestone: none → 0.2
Changed in miral:
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.