mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
Read-only mirror of https://gitlab.gnome.org/GNOME/mutter
6c8f6afdc4
When a modal transient is unmanaging, most likely the parent of the modal transient should be focused. In Wayland, a MetaWindow is created when a shell surface role (like xdg_toplevel) is created, but a window cannot be shown until a buffer is attached. If a client would create two modal transients and make them both have the same parent, but only one get a buffer attached (i.e. shown), when unmanaging the modal transient that was showing, when finding a new focus candidate, the stacking code will ignore the not-to-be-shown buffer-less modal transient when finding a good candidate for focusing. In the case described here, this means it will find the parent of the unmanaging modal transient. This newly chosen candidate will then be passed to meta_window_focus(); meta_window_focus() will then try to find any modal transient to focus instead, will find the one without any buffer, then fail to focus it because it cannot be mapped, thus making meta_window_focus() not focus anything. Since meta_window_focus() didn't change any focus state, the assert in meta_window_unmanage() checking that the unmanaging window isn't focused anymore will be hit, causing mutter to abort. For now, fix this by checking whether the modal transient can actually be focused in meta_window_focus(). For X11 client windows, a window will be defined to be focusable always, but for Wayland client windows, a window will be determined focusable only if it has a buffer attached. In the future, we should probably do a more thorough refactorization of focus handling to get rid of any X11 - Wayland differences. https://bugzilla.gnome.org/show_bug.cgi?id=757568 |
||
---|---|---|
clutter | ||
cogl | ||
data | ||
doc | ||
po | ||
src | ||
tools | ||
.gitignore | ||
autogen.sh | ||
configure.ac | ||
COPYING | ||
Makefile.am | ||
mutter.doap | ||
NEWS |