Some apps cause mutter to hang in meta_window_x11_focus -> meta_stack_get_default_focus_window
Some apps (like JetBrain's java apps) can lead to an hanging shell when dialogs are closed.
See:
Screencast_2019-07-03_00_27_06
Relevant trace is:
#10 0x00007fc929805cc3 in
meta_stack_get_default_focus_window
(stack=stack@entry=0x55c3f44b73b0, workspace=workspace@entry=0x55c3f4481190, not_this_one=not_this_one@entry=0x55c3f74be3f0) at ../src/core/stack.c:1264
No locals.
#11 0x00007fc92982ba9e in
meta_window_x11_focus
(window=0x55c3f74be070, timestamp=21028465) at ../src/x11/window-x11.c:904
focus_window = 0x55c3f74be3f0
x11_display = 0x55c3f4492aa0
workspace = 0x55c3f4481190
stack = 0x55c3f44b73b0
window_x11 = <optimized out>
priv = <optimized out>
#12 0x00007fc92981308f in
meta_window_focus
(window=0x55c3f74be070, timestamp=21028465) at ../src/core/window.c:4785
workspace_manager = 0x55c3f44b5b40
modal_transient = <optimized out>
__func__ = "meta_window_focus"
#13 0x00007fc929815ece in
focus_ancestor_or_top_window
(workspace=0x55c3f4481190, not_this_one=not_this_one@entry=0x55c3f74bee70, timestamp=timestamp@entry=21028465) at ../src/core/workspace.c:1399
window = 0x55c3f74be070
#14 0x00007fc929817484 in
meta_workspace_focus_default_window
(workspace=<optimized out>, not_this_one=not_this_one@entry=0x55c3f74bee70, timestamp=timestamp@entry=21028465) at ../src/core/workspace.c:1282
No locals.
#15 0x00007fc92981050e in
meta_window_unmanage
(window=window@entry=0x55c3f74bee70, timestamp=timestamp@entry=21028465) at ../src/core/window.c:1530
workspace_manager = 0x55c3f44b5b40
tmp = <optimized out>
__func__ = "meta_window_unmanage"
#16 0x00007fc92981d48c in
handle_other_xevent
(x11_display=x11_display@entry=0x55c3f4492aa0, event=event@entry=0x7ffd2db9c0d0) at ../src/x11/events.c:1368
timestamp = 21028465
display = 0x55c3f43e0010
workspace_manager = 0x55c3f44b5b40
modified = <optimized out>
window = 0x55c3f74bee70
property_for_window = <optimized out>
frame_was_receiver = <optimized out>
bypass_gtk = 0
#17 0x00007fc92981e39b in
meta_x11_display_handle_xevent
(event=0x7ffd2db9c0d0, x11_display=0x55c3f4492aa0) at ../src/x11/events.c:1821
input_event = <optimized out>
display = 0x55c3f43e0010
backend = <optimized out>
modified = 31484367
bypass_compositor = 0
bypass_gtk = 0
cursor_tracker = <optimized out>
display = <optimized out>
backend = <optimized out>
modified = <optimized out>
bypass_compositor = <optimized out>
bypass_gtk = <optimized out>
input_event = <optimized out>
cursor_tracker = <optimized out>
window = <optimized out>
#18
xevent_filter
(xevent=0x7ffd2db9c0d0, event=<optimized out>, data=0x55c3f4492aa0) at ../src/x11/events.c:1859
x11_display = 0x55c3f4492aa0
This can be reproduced with this .metatest
:
new_client 0 x11
create 0/1
show 0/1
new_client 1 x11
create 1/1
show 1/1
create 1/2 csd
set_parent 1/2 1
accept_focus 1/2 false
show 1/2
create 1/3 csd
set_parent 1/3 2
accept_focus 1/3 false
show 1/3
create 1/4 csd
set_parent 1/4 3
accept_focus 1/4 false
show 1/4
create 1/5 csd
set_parent 1/5 3
show 1/5
wait
assert_focused 1/5
assert_stacking 0/1 1/1 1/2 1/3 1/4 1/5
destroy 1/5
dispatch
assert_focused none
assert_stacking 0/1 1/1 1/2 1/3 1/4
sleep 250
assert_focused none
assert_stacking 0/1 1/1 1/2 1/3 1/4
destroy 1/3
wait
assert_focused none
assert_stacking 0/1 1/1 1/2 1/4
Related to commit f71151a5
Edited by Marco Trevisan