Go to file
Jonas Ådahl 6c8f6afdc4 window: Fix focus of unmappable modal transient's parent
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
2016-09-01 21:09:10 +08:00
clutter clutter/evdev: Fix absolute pointer motion events 2016-08-30 15:48:30 +08:00
cogl Use _NO_CONTEXT when creating images for EGL_WAYLAND_BUFFER_WL 2016-08-29 16:31:36 +02:00
data build: Say good-bye to intltool 2016-08-19 11:04:48 +02:00
doc Remove gtk-doc 2015-07-06 00:52:18 -07:00
po Updated Serbian translation 2016-08-28 11:13:33 +02:00
src window: Fix focus of unmappable modal transient's parent 2016-09-01 21:09:10 +08:00
tools Clean up the source tree 2014-03-18 20:37:35 -04:00
.gitignore wayland: Add support for the xdg-foreign protocol 2016-08-22 21:03:41 +08:00
autogen.sh build: Drop deprecated autogen.sh variables 2015-03-04 21:00:48 +01:00
configure.ac Bump version to 3.21.91 2016-08-30 00:58:08 +02:00
COPYING Updated obsolete FSF postal address in COPYING 2014-01-13 11:35:48 -05:00
Makefile.am Fix the merged build 2016-04-27 20:37:47 +02:00
mutter.doap doap: add <programming-language> 2014-07-31 17:50:28 +02:00
NEWS Bump version to 3.21.91 2016-08-30 00:58:08 +02:00