<html>
<head>
<base href="https://bugzilla.gnome.org/" />
</head>
<body><span class="vcard"><a href="page.cgi?id=describeuser.html&login=ofourdan%40redhat.com" title="Olivier Fourdan <ofourdan@redhat.com>"> <span class="fn">Olivier Fourdan</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - [Wayland] Focused window under application first window"
href="https://bugzilla.gnome.org/show_bug.cgi?id=780820">bug 780820</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Component</td>
<td>Backend: Wayland
</td>
<td>wayland
</td>
</tr>
<tr>
<td style="text-align:right;">Version</td>
<td>3.22.x
</td>
<td>3.24.x
</td>
</tr>
<tr>
<td style="text-align:right;">Assignee</td>
<td>gtk-bugs@gtk.org
</td>
<td>mutter-maint@gnome.bugs
</td>
</tr>
<tr>
<td style="text-align:right;">Product</td>
<td>gtk+
</td>
<td>mutter
</td>
</tr>
<tr>
<td style="text-align:right;">QA Contact</td>
<td>gtk-bugs@gtk.org
</td>
<td>mutter-maint@gnome.bugs
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [Wayland] Focused window under application first window"
href="https://bugzilla.gnome.org/show_bug.cgi?id=780820#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [Wayland] Focused window under application first window"
href="https://bugzilla.gnome.org/show_bug.cgi?id=780820">bug 780820</a>
from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=ofourdan%40redhat.com" title="Olivier Fourdan <ofourdan@redhat.com>"> <span class="fn">Olivier Fourdan</span></a>
</span></b>
<pre>Moving to mutter.
The newly mapped window is not considered in get_default_focus_window() as
called from meta_stack_get_default_focus_window() because
meta_window_should_be_showing() return FALSE, and this is specific to Wayland
backend because the window has no buffer attached *yet*:
1598 gboolean
1599 meta_window_should_be_showing (MetaWindow *window)
1600 {
1601 #ifdef HAVE_WAYLAND
1602 if (window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND &&
1603 !meta_wayland_surface_get_buffer (window->surface))
1604 return FALSE;
1605 #endif
1606
1607 /* Windows should be showing if they're located on the
1608 * active workspace and they're showing on their own workspace. */
1609 return (meta_window_located_on_workspace (window,
window->screen->active_workspace) &&
1610 meta_window_showing_on_its_workspace (window));
1611 }
As a result, the old window is focused and raised instead, and when the new
window is eventually mapped, it is focused and not raised in
meta_focus_window().
So we end up with the focused window being placed underneath the non-focused
window.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>