<html>
<head>
<base href="https://bugzilla.gnome.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - regression in menu positioning on wayland"
href="https://bugzilla.gnome.org/show_bug.cgi?id=769402#c11">Comment # 11</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - regression in menu positioning on wayland"
href="https://bugzilla.gnome.org/show_bug.cgi?id=769402">bug 769402</a>
from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=jadahl%40gmail.com" title="Jonas Ådahl <jadahl@gmail.com>"> <span class="fn">Jonas Ådahl</span></a>
</span></b>
<pre>(In reply to William Hua from <a href="show_bug.cgi?id=769402#c10">comment #10</a>)
<span class="quote">> Review of <span class=""><a href="attachment.cgi?id=332693&action=diff" name="attach_332693" title="gdkwindow: Use toplevel for getting root cords in move_to_rect()">attachment 332693</a> <a href="attachment.cgi?id=332693&action=edit" title="gdkwindow: Use toplevel for getting root cords in move_to_rect()">[details]</a></span> <a href='review?bug=769402&attachment=332693'>[review]</a> [review]:
>
> Thanks, just a couple questions, but these patches do fix the problem.
>
> I'm still a bit hesitant to alter the default implementation for the sake of
> the Wayland backend, which will have its own implementation at some point.
> But if it still needs a lot of work, we can do it to fix the regression. I
> didn't see any problems with this patch under X11 or Mir.</span >
Well, we could add a dumb implementation to the Wayland backend right now, but
it'd regress sligthly (for example a window placed at poisition (0, 0) on a
single monitor gets mostly the correct menu placement simply because the real
position happens to be the same as the "fake root coordinate".
<span class="quote">>
> ::: gdk/gdkwindowimpl.c
> @@ +187,3 @@
> + {
> + if (_gdk_window_is_toplevel (window))
> +{
>
> Is this needed if we already know window->window_type == GDK_WINDOW_CHILD?</span >
I'm not entirely sure. I used the same loop semantics as
gdk_window_get_toplevel() which includes this part.
<span class="quote">>
> @@ +191,3 @@
> + gdk_window_coords_to_parent (window, xf, yf, &xf, &yf);
> +
> + gdouble yf = y;
>
> Should we use gdk_window_get_effective_parent (window) instead?
>
> The docs for gdk_window_coords_to_parent () say that for off-screen windows,
> it converts to the window's embedder instead.</span >
Good point. Should probably use gdk_window_get_effective_parent() above then as
well.</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>